[petsc-users] DMPlexCreateFromDAG for P2 elements

Matthew Knepley knepley at gmail.com
Tue Oct 8 23:25:41 CDT 2019


On Tue, Oct 8, 2019 at 4:45 PM Asitav Mishra via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> Stefano,
>
> Thanks a lot for your prompt response. I have a higher-order mesh, so will
> need to create my own PetscSection to add the local coordinates looks  like.
> At this point, FEM residuals and Jacobian computations are not as
> important. But, could you direct me to any examples in creating
> PetscSection for such elements?
>

Asitav,

What do you want to do with higher oder coordinate embeddings, if not
calculate residuals and Jacobians?
Are you absolutely certain that is what you need, since this is not
normally called P2.

  Thanks,

     Matt


> Thanks,
> Asitav
>
> On Tue, Oct 8, 2019 at 3:18 PM Stefano Zampini <stefano.zampini at gmail.com>
> wrote:
>
>> DMPlex abstracts the mesh topology. PetscSection defines the dofs
>> associated to the mesh entities.
>> Why do you need P2 elements? For the discrete solution or because you
>> have a high order mesh?
>>
>> If it is only for the solution, you should create a linear mesh
>> (cell-vertex only), interpolate the mesh, and then use
>> PetscFECreateDefault (
>> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/FE/PetscFECreateDefault.htm
>> )
>> +
>> DMAddField (
>> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMAddField.html
>> )
>> +
>> DMCreateDS (
>> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCreateDS.html
>> )
>>
>> Instead, if you have a high-order mesh, you should create a linear mesh,
>> and then manipulate yourself the PetscSection defining the local
>> coordinates.
>> However, I’m not sure how complete is the support for high-order meshes
>> when it comes to compute FEM residuals and assemble Jacobians
>>
>>
>> On Oct 8, 2019, at 9:54 PM, Asitav Mishra via petsc-users <
>> petsc-users at mcs.anl.gov> wrote:
>>
>> Hi,
>>
>> Does Petsc support DMPlexCreateFromDAG for 2nd order (P2) elements, or
>> any orders higher than one (P1) for that matter? I know it is possible to
>> create DMPlex mesh from GMSH files with P2 elements, but not sure how the
>> 'cone/support' structures are built. One approach is to ignore the higher
>> order nodes in an element to create the 'cones', but is there a way to
>> preserve the P2 element information in the 'cones'?
>>
>> For example: how would the depth=1 cone structure look like for a mesh
>> with two P2 triangles sharing a face?
>>             2
>>           / | \
>>         /   |   \
>>      6     |     8
>>     /       |       \
>>   /         |         \
>> 0   0    5    1    3
>>   \         |         /
>>     \       |       /
>>      4     |     7
>>         \   |   /
>>           \ | /
>>            1
>>
>> Higher order nodes: [4, 5, 6, 7, 8]. Can we construct cones with
>> cells-to-nodes (depth = 1)?:
>>
>> numPoints = [9, 2];                                             // 9
>> nodes instead of just 4?
>> coneSizes = [6, 6,    0, 0, 0, 0, 0, 0, 0, 0, 0];
>> cones        = [0, 1, 2, 4, 5, 6,    2, 1, 3, 5, 7, 8];
>> etc.
>>
>> Any help would be greatly appreciated.
>>
>> Thanks,
>> Asitav
>>
>> --
>> Asitav Mishra, PhD
>> Research Engineer II, NIA
>>
>>
>>
>
> --
> Asitav Mishra, PhD
> Research Engineer II, NIA
>


-- 
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/20191009/d71161a3/attachment-0001.html>


More information about the petsc-users mailing list