On Fri, Aug 4, 2023 at 10:31 AM Brandon Denton <blden...@buffalo.edu> wrote:
> Good Morning Prof. Knepley, > > Thank you for the update. I am now able to run the code. However, it does > not appear to solve the problem correctly. The only results available are > the initial conditions (temp = 100). In the problem, one face is set to > 1400 and another face is set to 100. Since the faces are at opposite ends > of the geometry, we would expect a roughly linear temperature profile from > 1400 to 100. What am I missing to get the output to show this proper result. > 1) The inlet/outlet labels where being constructed on dmSurface. I fixed this. 2) The 14/7 faceIDs do not appear to be the ones you want. Here is corrected source. Can you look at the labels? Thanks, Matt > Thank you. > Brandon > > > ------------------------------ > *From:* Matthew Knepley <knep...@gmail.com> > *Sent:* Tuesday, August 1, 2023 10:23 AM > *To:* Brandon Denton <blden...@buffalo.edu> > *Cc:* petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov> > *Subject:* Re: [petsc-users] PETSc :: FEM Help > > Sorry about this. I signed up for a conference without the work done, with > predictable results. I have just returned home. > > There were just a few small problems. First, the labels were attached to > dmSurface, but you wanted them on dm. They got destroyed with dmSurface > before setting the BC. Second, the declarations of the point function were > missing the constant arguments. Third, the PetscFEDestroy() was missing and > extra DM creations were there. I have fixed these and am attaching the new > source. It runs for me but I have not checked the answer. > > Thanks, > > Matt > > On Wed, Jun 7, 2023 at 11:05 AM Brandon Denton via petsc-users < > petsc-users@mcs.anl.gov> wrote: > > Good Morning, > > I'm trying to verify that the CAD -> PETSc/DMPlex methods I've developed > can be used for FEM analyses using PETSc. Attached is my current attempt > where I import a CAD STEP file to create a volumetric tetrahedral > discretization (DMPlex), designate boundary condition points using > DMLabels, and solve the Laplace problem (heat) with Dirichlet conditions on > each end. At command line I indicate the STEP file with the -filename > option and the dual space degree with -petscspace_degree 2. The run ends > with either a SEGV Fault or a General MPI Communication Error. > > Could you please look over the attached file to tell me if what I'm doing > to set up the FEM problem is wrong? > > Thank you in advance for your time and help. > -Brandon > > TYPICAL ERROR MESSAGE > [0]PETSC ERROR: --------------------- Error Message > -------------------------------------------------------------- > [0]PETSC ERROR: General MPI error > [0]PETSC ERROR: MPI error 605109765 Invalid communicator, error stack: > PMPI_Comm_get_attr(344): MPI_Comm_get_attr(comm=0x0, > comm_keyval=-1539309568, attribute_val=0x7ffe75a58848, flag=0x7ffe75a58844) > failed > MPII_Comm_get_attr(257): MPIR_Comm_get_attr(comm=0x0, > comm_keyval=-1539309568, attribute_val=0x7ffe75a58848, flag=0x7ffe75a58844) > failed > MPII_Comm_get_attr(53).: Invalid communicator > [0]PETSC ERROR: WARNING! There are option(s) set that were not used! Could > be the program crashed before they were used or a spelling mistake, etc! > [0]PETSC ERROR: Option left: name:-dm_plex_refine_without_snap_to_geom > value: 0 source: command line > [0]PETSC ERROR: Option left: name:-dm_refine value: 1 source: command > line > [0]PETSC ERROR: Option left: name:-snes_monitor (no value) source: > command line > [0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting. > [0]PETSC ERROR: Petsc Development GIT revision: v3.18.5-1817-gd2497b8de4c > GIT Date: 2023-05-22 18:44:03 +0000 > [0]PETSC ERROR: ./thermal on a named XPS. by bdenton Wed Jun 7 11:03:43 > 2023 > [0]PETSC ERROR: Configure options --with-make-np=16 > --prefix=/mnt/c/Users/Brandon/software/libs/petsc/3.19.1-gitlab/gcc/11.2.0/mpich/3.4.2/openblas/0.3.17/opt > --with-debugging=false --COPTFLAGS="-O3 -mavx" --CXXOPTFLAGS="-O3 -mavx" > --FOPTFLAGS=-O3 --with-shared-libraries=1 > --with-mpi-dir=/mnt/c/Users/Brandon/software/libs/mpich/3.4.2/gcc/11.2.0 > --with-mumps=true --download-mumps=1 --with-metis=true --download-metis=1 > --with-parmetis=true --download-parmetis=1 --with-superlu=true > --download-superlu=1 --with-superludir=true --download-superlu_dist=1 > --with-blacs=true --download-blacs=1 --with-scalapack=true > --download-scalapack=1 --with-hypre=true --download-hypre=1 > --with-hdf5-dir=/mnt/c/Users/Brandon/software/libs/hdf5/1.12.1/gcc/11.2.0 > --with-valgrind-dir=/mnt/c/Users/Brandon/software/apps/valgrind/3.14.0 > --with-blas-lib="[/mnt/c/Users/Brandon/software/libs/openblas/0.3.17/gcc/11.2.0/lib/libopenblas.so]" > --with-lapack-lib="[/mnt/c/Users/Brandon/software/libs/openblas/0.3.17/gcc/11.2.0/lib/libopenblas.so]" > --LDFLAGS= --with-tetgen=true --download-tetgen=1 --download-ctetgen=1 > --download-opencascade=1 --download-egads > [0]PETSC ERROR: #1 PetscObjectName() at > /mnt/c/Users/Brandon/software/builddir/petsc-3.19.1-gitlab/src/sys/objects/pname.c:119 > [0]PETSC ERROR: #2 PetscObjectGetName() at > /mnt/c/Users/Brandon/software/builddir/petsc-3.19.1-gitlab/src/sys/objects/pgname.c:27 > [0]PETSC ERROR: #3 PetscDSAddBoundary() at > /mnt/c/Users/Brandon/software/builddir/petsc-3.19.1-gitlab/src/dm/dt/interface/dtds.c:3404 > [0]PETSC ERROR: #4 DMAddBoundary() at > /mnt/c/Users/Brandon/software/builddir/petsc-3.19.1-gitlab/src/dm/interface/dm.c:7828 > [0]PETSC ERROR: #5 main() at > /mnt/c/Users/Brandon/Documents/School/Dissertation/Software/EGADS-dev/thermal_v319/thermal_nozzle.c:173 > [0]PETSC ERROR: PETSc Option Table entries: > [0]PETSC ERROR: -dm_plex_geom_print_model 1 (source: command line) > [0]PETSC ERROR: -dm_plex_geom_shape_opt 0 (source: command line) > [0]PETSC ERROR: -dm_plex_refine_without_snap_to_geom 0 (source: command > line) > [0]PETSC ERROR: -dm_refine 1 (source: command line) > [0]PETSC ERROR: -filename ./examples/Nozzle_example.stp (source: command > line) > [0]PETSC ERROR: -petscspace_degree 2 (source: command line) > [0]PETSC ERROR: -snes_monitor (source: command line) > [0]PETSC ERROR: ----------------End of Error Message -------send entire > error message to petsc-ma...@mcs.anl.gov---------- > application called MPI_Abort(MPI_COMM_SELF, 98) - process 0 > [unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=98 > : > system msg for write_line failure : Bad file descriptor > > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ > <http://www.cse.buffalo.edu/~knepley/> > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
thermal_nozzle_new.c
Description: Binary data