<div dir="ltr"><div dir="ltr">On Mon, Dec 12, 2022 at 6:06 PM Yann Jobic <<a href="mailto:yann.jobic@univ-amu.fr">yann.jobic@univ-amu.fr</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I'm trying to get the coords of the dofs of a DMPlex for a PetscFE <br>
discretization, for orders greater than 1.<br>
<br>
I'm struggling to run dm/impls/plex/tutorials/ex8.c<br>
I've got the following error (with option -view_coord) :<br></blockquote><div><br></div><div>You just need to call</div><div><br></div><div>  DMGetCoordinatesLocalSetUp()</div><div><br></div><div>before the loop. I try to indicate this in the error message(). I did not call it in the example</div><div>because it is only necessary for output. We do this so that output is not synchronizing.</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
[0]PETSC ERROR: --------------------- Error Message <br>
--------------------------------------------------------------<br>
[0]PETSC ERROR: Object is in wrong state<br>
[0]PETSC ERROR: DMGetCoordinatesLocalSetUp() has not been called<br>
[0]PETSC ERROR: See <a href="https://petsc.org/release/faq/" rel="noreferrer" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>
[0]PETSC ERROR: Petsc Release Version 3.18.2, unknown<br>
[0]PETSC ERROR: <br>
/home/jobic/projet/fe-utils/petsc/fetools/cmake-build-debug/ex_closure_petsc <br>
on a  named luke by jobic Mon Dec 12 23:34:37 2022<br>
[0]PETSC ERROR: Configure options <br>
--prefix=/local/lib/petsc/3.18/p3/gcc/nompi_hdf5 --with-mpi=0 <br>
--with-debugging=1 --with-blacs=1 --download-zlib,--download-p4est <br>
--download-hdf5=1 --download-triangle=1 --with-single-library=0 <br>
--with-large-file-io=1 --with-shared-libraries=0 -CFLAGS=" -g -O0" <br>
-CXXFLAGS=" -g -O0" -FFLAGS=" -g -O0" PETSC_ARCH=nompi_gcc_hdf5<br>
[0]PETSC ERROR: #1 DMGetCoordinatesLocalNoncollective() at <br>
/home/devel/src_linux/petsc-3.18.0/src/dm/interface/dmcoordinates.c:621<br>
[0]PETSC ERROR: #2 DMPlexGetCellCoordinates() at <br>
/home/devel/src_linux/petsc-3.18.0/src/dm/impls/plex/plexgeometry.c:1291<br>
[0]PETSC ERROR: #3 main() at <br>
/home/jobic/projet/fe-utils/petsc/fetools/src/ex_closure_petsc.c:86<br>
[0]PETSC ERROR: PETSc Option Table entries:<br>
[0]PETSC ERROR: -dm_plex_box_faces 2,2<br>
[0]PETSC ERROR: -dm_plex_dim 2<br>
[0]PETSC ERROR: -dm_plex_simplex 0<br>
[0]PETSC ERROR: -petscspace_degree 1<br>
[0]PETSC ERROR: -view_coord<br>
[0]PETSC ERROR: ----------------End of Error Message -------send entire <br>
error message to petsc-maint@mcs.anl.gov----------<br>
<br>
Maybe i've done something wrong ?<br>
<br>
<br>
Moreover, i don't quite understand the function DMPlexGetLocalOffsets, <br>
and how to use it with DMGetCoordinatesLocal. It seems that <br>
DMGetCoordinatesLocal do not have the coords of the dofs, but only the <br>
nodes defining the geometry.<br>
<br>
I've made some small modifications of ex8.c, but i still have an error :<br>
[0]PETSC ERROR: --------------------- Error Message <br>
--------------------------------------------------------------<br>
[0]PETSC ERROR: Invalid argument<br>
[0]PETSC ERROR: Wrong type of object: Parameter # 1<br>
[0]PETSC ERROR: WARNING! There are option(s) set that were not used! <br>
Could be the program crashed before they were used or a spelling <br>
mistake, etc!<br>
[0]PETSC ERROR: Option left: name:-sol value: vtk:sol.vtu<br>
[0]PETSC ERROR: See <a href="https://petsc.org/release/faq/" rel="noreferrer" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>
[0]PETSC ERROR: Petsc Release Version 3.18.2, unknown<br>
[0]PETSC ERROR: <br>
/home/jobic/projet/fe-utils/petsc/fetools/cmake-build-debug/view_coords <br>
on a  named luke by jobic Mon Dec 12 23:51:05 2022<br>
[0]PETSC ERROR: Configure options <br>
--prefix=/local/lib/petsc/3.18/p3/gcc/nompi_hdf5 --with-mpi=0 <br>
--with-debugging=1 --with-blacs=1 --download-zlib,--download-p4est <br>
--download-hdf5=1 --download-triangle=1 --with-single-library=0 <br>
--with-large-file-io=1 --with-shared-libraries=0 -CFLAGS=" -g -O0" <br>
-CXXFLAGS=" -g -O0" -FFLAGS=" -g -O0" PETSC_ARCH=nompi_gcc_hdf5<br>
[0]PETSC ERROR: #1 PetscFEGetHeightSubspace() at <br>
/home/devel/src_linux/petsc-3.18.0/src/dm/dt/fe/interface/fe.c:1692<br>
[0]PETSC ERROR: #2 DMPlexGetLocalOffsets() at <br>
/home/devel/src_linux/petsc-3.18.0/src/dm/impls/plex/plexceed.c:98<br>
[0]PETSC ERROR: #3 ViewOffsets() at <br>
/home/jobic/projet/fe-utils/petsc/fetools/src/view_coords.c:28<br>
[0]PETSC ERROR: #4 main() at <br>
/home/jobic/projet/fe-utils/petsc/fetools/src/view_coords.c:99<br>
[0]PETSC ERROR: PETSc Option Table entries:<br>
[0]PETSC ERROR: -heat_petscspace_degree 2<br>
[0]PETSC ERROR: -sol vtk:sol.vtu<br>
[0]PETSC ERROR: ----------------End of Error Message -------send entire <br>
error message to petsc-maint@mcs.anl.gov----------<br>
<br>
<br>
Is dm/impls/plex/tutorials/ex8.c a good example for viewing the coords <br>
of the dofs of a DMPlex ?<br>
<br>
<br>
Thanks,<br>
<br>
Yann<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>