[petsc-users] DMAdaptLabel with triangle mesh

Matthew Knepley knepley at gmail.com
Mon Aug 31 05:55:36 CDT 2020


On Mon, Aug 31, 2020 at 5:34 AM Thibault Bridel-Bertomeu <
thibault.bridelbertomeu at gmail.com> wrote:

> Dear all,
>
> I have recently been playing around with the AMR capabilities embedded in
> PETSc for quad meshes using p4est. Based on the TS tutorial ex11, I was
> able to incorporate the AMR into a pre-existing code with different metrics
> for the adaptation process.
> Now I would like to do something similar using tri meshes. I read that
> compiling PETSc with Triangle (in 2D and Tetgen for 3D) gives access to
> refinement and coarsening capabilities on triangular meshes.When I try to
> execute the code with a triangular mesh (that i manipulate as a DMPLEX), it
> yields "Triangle 1700 has an invalid vertex index" when trying to adapt the
> mesh (the initial mesh indeed has 1700 cells). From what i could tell, it
> comes from the reconstruct method called by the triangulate method of
> triangle.c, the latter being called by either *DMPlexGenerate_Triangle *
> or *DMPlexRefine_Triangle *in PETSc, I cannot be sure.
>
> In substance, the code is the same as in ex11.c and the crash occurs in
> the first adaptation pass, i.e. an equivalent in ex11 is that it crashes
> after the SetInitialCondition in the first if (useAMR) located line 1835
> when it calls adaptToleranceFVM (which I copied basically so the code is
> the same).
>
> Is the automatic mesh refinement feature on tri meshes supposed to work or
> am I trying something that has not been completed yet ?
>

It is supposed to work, and does for some tests in the library. I stopped
using it because it is inherently serial and it is isotropic. However, it
should be fixed.
Is there something I can run to help me track down the problem?

  Thanks,

     Matt


> Thank you very much for your help, as always.
>
> Thibault Bridel-Bertomeu
>> Eng, MSc, PhD
> Research Engineer
> CEA/CESTA
> 33114 LE BARP
> Tel.: (+33)557046924
> Mob.: (+33)611025322
> Mail: thibault.bridelbertomeu at gmail.com
>


-- 
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/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200831/b8fb346f/attachment-0001.html>


More information about the petsc-users mailing list