<div dir="ltr">Dear All,<div><br></div><div>I want to generate a prismatic mesh from a base spherical surface mesh. I first refine the base icosahedron sequential mesh to some extent, distribute the mesh, continue the refinement in parallel, project the mesh to a unit sphere, and then finally extrude the mesh. The following is the code I am using. As the extrusion is performed in parallel, the extruded mesh seems to be broken as shown in the attached figure. May I know how to get an intact extruded mesh in parallel? Also, is it possible to make mesh refinement respect the spherical surface geometry, without having to project it using a function as shown below?<div><div><br></div><div>Thanks,</div><div>Bhargav</div><div><br></div><div>/* refine the sequential mesh first */<br>                       for (int r = 0; r < numRefinePre; ++r) {<br>                          DM rdm = NULL;<br>                                DMRefine(dm, MPI_COMM_WORLD, &rdm);<br>                               DMDestroy(&dm);<br>                           dm = rdm;<br>                       }<br><br>                         /* project to a unit sphere */<br>                        ierr = ProjectToUnitSphere(dm); CHKERRQ(ierr);<br><br>                      /* create and distribute DM */<br>                        ierr = DMPlexDistribute(dm, 0, NULL, &dmDist);CHKERRQ(ierr);<br>                      if (dmDist) {<br>                                DMDestroy(&dm);<br>                           dm   = dmDist;<br>                        }<br><br>                   /* refine the mesh in parallel */<br>                     for (int r = 0; r < numRefine; ++r) {<br>                             DM rdm = NULL;<br>                                DMRefine(dm, MPI_COMM_WORLD, &rdm);<br>                               DMDestroy(&dm);<br>                           dm = rdm;<br>                       }<br><br>                         /* project to a unit sphere */<br>                        ierr = ProjectToUnitSphere(dm); CHKERRQ(ierr);<br><br>                      ierr = DMPlexExtrude(dm, numLayers-1, radialThickness, PETSC_FALSE, NULL, PETSC_TRUE, &dm3D);CHKERRQ(ierr);<br><br>                     if (dm3D) {<br>                          DMDestroy(&dm);<br>                           dm = dm3D;<br>                     }<br></div><div><br></div></div></div></div>

<br>
<div><hr></div><font face="Arial" size="1">This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.</font>