[petsc-users] DMPlexCreateFromDAG for P2 elements
Asitav Mishra
asitav at gmail.com
Wed Oct 9 09:47:25 CDT 2019
Matt,
These inputs are very useful. If you can find any examples for this that
would be great as well. (Also, looks like I've misused the word 'topology'
and 'geometry' in my text earlier.)
I look forward to hearing from you about the examples if any.
Thank you.
Asitav
On Wed, Oct 9, 2019 at 10:30 AM Matthew Knepley <knepley at gmail.com> wrote:
> On Wed, Oct 9, 2019 at 9:59 AM Asitav Mishra <asitav at gmail.com> wrote:
>
>> Matt,
>>
>> Please excuse me for not having stated it clearly. Of course, ultimately
>> residuals/Jacobians are what I'd need to evaluate using higher-order nodes.
>> I just meant my first concern is to create a mesh graph structure that can
>> be appropriately partitioned (and hopefully re-distributed) among multiple
>> processors without losing the higher order topological information of the
>> geometry, such as those in curved (higher-order) elements.
>>
>
> Okay, that is clear.
>
> So its turns out there is no topological difference between low order and
> high order geometry (that is actually
> that point, a teacup and a donut are topologically equivalent). As Stefano
> says, you need to treat the coordinates
> as just another field. Sp exactly as if you were making a solution field,
> you create the coordinate field you want.
> Then that coordinate field should be able to be input to the DM using
>
> DMGetCoordinateDM(dm, &cdm);
> <Set field information into cdm instead of dm>
> DMCreateLocalVector(cdm, &coordinatesLocal);
> <Fill in higher order coordinate values>
> DMSetCoordinatesLocal(dm, coordinatesLocal);
>
> You will probably use a DMProject*(cdm, ...) to fill in the coordinate
> values.
>
> This has not been extensively tested. I will look for the example I have
> of this.
>
> Thanks,
>
> Matt
>
>
>> Thanks,
>> Asitav
>>
>> On Wed, Oct 9, 2019 at 12:25 AM Matthew Knepley <knepley at gmail.com>
>> wrote:
>>
>>> 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/>
>>>
>>
>>
>> --
>> 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/>
>
--
Asitav Mishra, PhD
Research Engineer II, NIA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20191009/0d0f9c01/attachment-0001.html>
More information about the petsc-users
mailing list