[petsc-users] Triangle geometry data as input to DM object to generate a mesh

Anthony Vergottis a.vergottis at ucl.ac.uk
Mon Nov 11 12:35:40 CST 2013


Thank you very much.

Best regards,
Anthony


On 11 November 2013 18:21, Matthew Knepley <knepley at gmail.com> wrote:

> On Mon, Nov 11, 2013 at 11:46 AM, Anthony Vergottis <a.vergottis at ucl.ac.uk
> > wrote:
>
>> Dear All,
>>
>> I would like some assistance on how a mesh is created using Triangle with
>> the DM objects. Specifically how does one input the geometry of the
>> computational domain into PETSc/DM objects to then generate a 2D triangular
>> mesh? Is there a function that can do such a thing? Currently I have hard
>> coded all mesh I/O but I would like to make things a bit cleaner if its
>> possible.
>>
>
> The default 2D mesh generator in PETSc is Triangle. If you have a 1D
> boundary, you can generate the 2D mesh using
>
>   DMPlexGenerate(boundaryDM, NULL, PETSC_FALSE, &dm)
>
> or PETSC_TRUE if you want edges included. I suggest using
> DMPlexCreateFromDAG() if you have programmatically
> constructed your boundary, or DMPlexCreateFromCellList() if you get your
> boundary from a meshing tool.
>
>   Thanks,
>
>      Matt
>
>
>> Thanks in advance for any help.
>>
>> Best regards,
>> Anthony
>>
>
>
>
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131111/ac2f8065/attachment.html>


More information about the petsc-users mailing list