[petsc-users] Is there anything like a "DMPlexSetCones()" ?
Ferrand, Jesus A.
FERRANJ2 at my.erau.edu
Wed May 1 18:33:57 CDT 2024
Dear PETSc team:
For a project that I'm working on, I need to manually build a DMPlex.
>From studying the source code of the various APIs in which the plex is built from some supported file format, I get that the workflow is this:
1.
DMPlexSetChart() <-- Input nCells + nVerts
2.
DMPlexSetConeSize() <-- Input ConeSize for each point in [0,nCells)
3.
DMSetUp() – Allocates memory internally.
4.
DMPlexGetCones() --> Gives you the memory onto which to write the cell connectivity.
5.
*Write connectivity*
6.
DMPlexReorderCell() <-- For each point in [0,nCells)
I'm in a situation where the memory given by step (4) is available a-priori.
I was hoping to skip steps 2, 3 , and 4 with something like a "DMPlexSetCones()", but such an API does not exist.
My current workaround is to implement steps 2 through 4 as always and have double the memory allocated in the interim (my instance + DM's internal instance).
I was thinking of looking for the name of the struct member and = it to my memory, but I can't overcome the flag check in DMSetUp() during later calls to DMPlexGetCones() or DMPlexGetTransitiveClosure().
Sincerely:
J.A. Ferrand
Embry-Riddle Aeronautical University - Daytona Beach - FL
Ph.D. Candidate, Aerospace Engineering
M.Sc. Aerospace Engineering
B.Sc. Aerospace Engineering
B.Sc. Computational Mathematics
Phone: (386)-843-1829
Email(s): ferranj2 at my.erau.edu
jesus.ferrand at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240501/9744a1af/attachment.html>
More information about the petsc-users
mailing list