[petsc-users] DMPlexTransform with DMForest
David Salac
dsalac at gmail.com
Wed Jun 4 09:52:03 CDT 2025
Hello PETSc team,
I am trying to extrude some cells from a mesh that comes from a
DMForest. The DMForest is converted to a DMPlex which is then being used
in a modified version of DMPlexExtrude (patch is included). The issue is
the DMForest to DMPlex conversion switches the stratum ordering. It
appears that DMPlexTransform assumes that you have the standard DMPlex
ordering: Cells->Vertices->Edges in 2D. The plex that comes from
DMForest has Cells->Edges->Vertices. This results in an edge being
incorrectly flagged as outside of the range of edges.
I'm including a minimal code showing this. Sample output and the error
message is also shown below.
Thanks,
Dave
Original Plex:
0: [100,221)
1: [221,441)
2: [0,100)
Before Extrude Box: +0.000000e+00, +1.000000e+00 +0.000000e+00,
+1.000000e+00
After Extrude Box: -1.000000e-01, +1.100000e+00 -1.000000e-01,
+1.100000e+00
Converted Plex:
0: [320,441)
1: [100,320)
2: [0,100)
Before Extrude Box: +0.000000e+00, +1.000000e+00 +0.000000e+00,
+1.000000e+00
[0]PETSC ERROR: --------------------- Error Message
--------------------------------------------------------------
[0]PETSC ERROR: PETSc has generated inconsistent data
[0]PETSC ERROR: Point 100 is not a segment [221, 441)
[0]PETSC ERROR: See https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!cKv8WrCLXVqU9jE_pHlDNyVtTMk8aT2xxJcPTjksuQP4PiWtA5Kv8E0Ph8jKhOm7MbkM6qFHmK3R5N4y_sQ$ for trouble shooting.
[0]PETSC ERROR: PETSc Development Git Revision: v3.23.3-199-g3b15527e756
Git Date: 2025-06-03 15:20:49 +0000
[0]PETSC ERROR: ./ex with 1 MPI process(es) and PETSC_ARCH
arch-ablate-opt on libuse.eng.buffalo.edu by davidsal Wed Jun 4
10:39:41 2025
[0]PETSC ERROR: Configure options: --with-64-bit-indices=0
--download-metis --download-mpich --download-p4est --download-parmetis
--download-scalapack --download-slepc --download-tetgen
--download-triangle --download-zlib --with-debugging=0 --with-libpng
--with-slepc PETSC_ARCH=arch-ablate-opt --with-fortran-bindings=0
[0]PETSC ERROR: #1 DMPlexTransformGetTargetPoint() at
/home/davidsal/Research/petsc/src/dm/impls/plex/transform/interface/plextransform.c:1003
[0]PETSC ERROR: #2 DMPlexTransformSetConeSizes() at
/home/davidsal/Research/petsc/src/dm/impls/plex/transform/interface/plextransform.c:1400
[0]PETSC ERROR: #3 DMPlexTransformApply() at
/home/davidsal/Research/petsc/src/dm/impls/plex/transform/interface/plextransform.c:2385
[0]PETSC ERROR: #4 DMPlexExtrude() at
/home/davidsal/Research/petsc/src/dm/impls/plex/plexextrude.c:82
[0]PETSC ERROR: #5 extrudeMesh() at ex.c:34
[0]PETSC ERROR: #6 main() at ex.c:86
[0]PETSC ERROR: No PETSc Option Table entries
[0]PETSC ERROR: ----------------End of Error Message -------send entire
error message to petsc-maint at mcs.anl.gov----------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extrude.patch
Type: text/x-patch
Size: 3981 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250604/b35c1971/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex.c
Type: text/x-csrc
Size: 3838 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250604/b35c1971/attachment-0001.bin>
More information about the petsc-users
mailing list