pylith
pylith copied to clipboard
Output of s solution subfield for fault
Describe the bug
Output of a solution subfield for the fault triggers a PETSc error.
To Reproduce
PETSc branch: knepley/pylith
PyLith branch: baagaard/fix-output-fault-solution-field
cd examples/strikeslip-2d
pylith step01_slip.cfg
Error message
0 TS dt 0.01 time 0.
0 SNES Function norm 4.895713226482e-02
Linear solve converged due to CONVERGED_ATOL iterations 35
1 SNES Function norm 2.540378711183e-12
Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 1
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Null argument, when expecting valid pointer
[0]PETSC ERROR: Null Pointer: Parameter # 1
[0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
[0]PETSC ERROR: Petsc Development GIT revision: v3.17.4-1194-g766cdfe255 GIT Date: 2022-09-02 04:19:45 +0000
[0]PETSC ERROR: /Users/baagaard/software/unix/py310-venv/pylith-debug/bin/mpinemesis on a arch-clang-13.1_debug named IGSKCI164LM006 by baagaard Wed Oct 26 10:50:15 2022
[0]PETSC ERROR: Configure options --PETSC_ARCH=arch-clang-13.1_debug --with-debugging=1 --with-clanguage=c --with-mpi-compilers=1 --with-shared-libraries=1 --with-64-bit-points=1 --with-large-file-io=1 --with-lgrind=0 --download-chaco=1 --download-parmetis=1 --download-metis=1 --download-triangle --download-ml=1 --download-superlu=1 --with-fc=0 --download-f2cblaslapack --with-hdf5=1 --with-hdf5-include=/Users/baagaard/software/unix/hdf5-1.12/clang-13.1/include --with-hdf5-lib=/Users/baagaard/software/unix/hdf5-1.12/clang-13.1/lib/libhdf5.dylib --with-zlib=1
[0]PETSC ERROR: #1 PetscQuadratureGetData() at /Users/baagaard/software/unix/petsc-dev/src/dm/dt/interface/dt.c:255
[0]PETSC ERROR: #2 PetscFEGetCellTabulation() at /Users/baagaard/software/unix/petsc-dev/src/dm/dt/fe/interface/fe.c:791
[0]PETSC ERROR: #3 PetscDSSetUp() at /Users/baagaard/software/unix/petsc-dev/src/dm/dt/interface/dtds.c:409
[0]PETSC ERROR: #4 PetscDSGetComponentOffsets() at /Users/baagaard/software/unix/petsc-dev/src/dm/dt/interface/dtds.c:2961
[0]PETSC ERROR: #5 DMProjectPoint_Field_Private() at /Users/baagaard/software/unix/petsc-dev/src/dm/impls/plex/plexproject.c:201
[0]PETSC ERROR: #6 DMProjectPoint_Private() at /Users/baagaard/software/unix/petsc-dev/src/dm/impls/plex/plexproject.c:398
[0]PETSC ERROR: #7 DMProjectLocal_Generic_Plex() at /Users/baagaard/software/unix/petsc-dev/src/dm/impls/plex/plexproject.c:850
[0]PETSC ERROR: #8 DMProjectFieldLabelLocal_Plex() at /Users/baagaard/software/unix/petsc-dev/src/dm/impls/plex/plexproject.c:933
[0]PETSC ERROR: #9 DMProjectFieldLabelLocal() at /Users/baagaard/software/unix/petsc-dev/src/dm/interface/dm.c:8191
[0]PETSC ERROR: #10 DMProjectFieldLabel() at /Users/baagaard/software/unix/petsc-dev/src/dm/interface/dm.c:8267
[0]PETSC ERROR: #11 void pylith::meshio::OutputSubfield::projectWithLabel(const PetscVec &)() at /Users/baagaard/src/cig/pylith/libsrc/pylith/meshio/OutputSubfield.cc:221
@baagaard-usgs I made the changes in projection for cohesive cells, but it is still not going to give us what we want. The problem is that cohesive fields are defined on the cohesive edges joining the sides, not on the faces. so when we get the closure on the face, we get nothing.
It seems like we really want a different operation. I need to think about it.
@baagaard-usgs I have pushed to knepley-pylith
. Now there is no failure, but I am not sure we are getting the right data out. How do I check?
@knepley I will update some full-scale tests to check additional fields.
@knepley Output of the Lagrange multiplier seems to be working for 1 fault (still need to get the test fully implemented). I get the following error when I have 2 faults:
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Argument out of range
[0]PETSC ERROR: Cannot have zero subspaces
-- snip --
[0]PETSC ERROR: Petsc Development GIT revision: v3.19.1-206-gc29534bfe6e GIT Date: 2023-05-12 15:35:02 -0400
-- snip --
[0]PETSC ERROR: #1 PetscSpaceSetUp_Tensor() at /Users/baagaard/software/unix/petsc-dev/src/dm/dt/space/impls/tensor/spacetensor.c:148
[0]PETSC ERROR: #2 PetscSpaceSetUp() at /Users/baagaard/software/unix/petsc-dev/src/dm/dt/space/interface/space.c:235
[0]PETSC ERROR: #3 PetscSpaceGetHeightSubspace_Tensor() at /Users/baagaard/software/unix/petsc-dev/src/dm/dt/space/impls/tensor/spacetensor.c:600
[0]PETSC ERROR: #4 PetscSpaceGetHeightSubspace() at /Users/baagaard/software/unix/petsc-dev/src/dm/dt/space/interface/space.c:525
[0]PETSC ERROR: #5 PetscSpaceGetHeightSubspace_Sum() at /Users/baagaard/software/unix/petsc-dev/src/dm/dt/space/impls/sum/spacesum.c:525
[0]PETSC ERROR: #6 PetscSpaceGetHeightSubspace() at /Users/baagaard/software/unix/petsc-dev/src/dm/dt/space/interface/space.c:525
[0]PETSC ERROR: #7 PetscFEGetHeightSubspace() at /Users/baagaard/software/unix/petsc-dev/src/dm/dt/fe/interface/fe.c:1714
[0]PETSC ERROR: #8 DMProjectLocal_Generic_Plex() at /Users/baagaard/software/unix/petsc-dev/src/dm/impls/plex/plexproject.c:731
[0]PETSC ERROR: #9 DMProjectFieldLabelLocal_Plex() at /Users/baagaard/software/unix/petsc-dev/src/dm/impls/plex/plexproject.c:935
[0]PETSC ERROR: #10 DMProjectFieldLabelLocal() at /Users/baagaard/software/unix/petsc-dev/src/dm/interface/dm.c:8210
[0]PETSC ERROR: #11 DMProjectFieldLabel() at /Users/baagaard/software/unix/petsc-dev/src/dm/interface/dm.c:8288
[0]PETSC ERROR: #12 void pylith::meshio::OutputSubfield::projectWithLabel(const PetscVec &)() at /Users/baagaard/src/cig/pylith/libsrc/pylith/meshio/OutputSubfield.cc:221
PETsc branch: knepley/pylith
PyLith branch: baagaard/fix-output-fault-solution-field
cd $BUILD/tests/fullscale/linearelasticity/faults-2d
make export-data
pylith threeblocks.cfg threeblocks_quad.cfg
When I use a tet mesh (1 fault), I get the following error:
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Nonconforming object sizes
[0]PETSC ERROR: The input section point (2089) closure size 9 != dual space dimension 12 at height 1
-- snip --
[0]PETSC ERROR: Petsc Development GIT revision: v3.19.1-206-gc29534bfe6e GIT Date: 2023-05-12 15:35:02 -0400
-- snip --
[0]PETSC ERROR: #1 DMProjectLocal_Generic_Plex() at /Users/baagaard/software/unix/petsc-dev/src/dm/impls/plex/plexproject.c:803
[0]PETSC ERROR: #2 DMProjectFieldLabelLocal_Plex() at /Users/baagaard/software/unix/petsc-dev/src/dm/impls/plex/plexproject.c:935
[0]PETSC ERROR: #3 DMProjectFieldLabelLocal() at /Users/baagaard/software/unix/petsc-dev/src/dm/interface/dm.c:8210
[0]PETSC ERROR: #4 DMProjectFieldLabel() at /Users/baagaard/software/unix/petsc-dev/src/dm/interface/dm.c:8288
[0]PETSC ERROR: #5 void pylith::meshio::OutputSubfield::projectWithLabel(const PetscVec &)() at /Users/baagaard/src/cig/pylith/libsrc/pylith/meshio/OutputSubfield.cc:221
cd $BUILD/tests/fullscale/linearelasticity/faults-3d
make export-data
pylith twoblocks.cfg twoblocks_tet.cfg
Even for the hex case with one fault for which there is no error, it looks like the projection has values for displacement when we are trying to project the Lagrange multiplier field. So... we might have some indexing issues. I think we need to debug this together.
@baagaard-usgs There were many things wrong. I have pushed to knepely/pylith
. Let's try it again at the meeting.