[petsc-users] Consistent domain decomposition between DMDA and DMPLEX

Mark Adams mfadams at lbl.gov
Fri Mar 22 07:33:15 CDT 2019


Sorry, you don't clone a setType method, you clone a create method such as:

src/dm/impls/plex/plexpartition.c:PETSC_EXTERN PetscErrorCode
PetscPartitionerCreate_Simple(PetscPartitioner part)

code like:

PetscPartitionerSetType
<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/PetscPartitionerSetType.html#PetscPartitionerSetType>(PetscPartitioner
<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/PetscPartitioner.html#PetscPartitioner>,
"my_part");

will call the function that you registered with PetscPartitionerRegister.


On Fri, Mar 22, 2019 at 8:22 AM Mark Adams <mfadams at lbl.gov> wrote:

> Matt is the authority here but I think you are going to start with:
>
>
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/PetscPartitionerRegister.html
>
> Then you would clone a "setType" method, which will for one set the
> partition function. You can cache data like the regular grid metadata in
> here and then your partitioner function will pick the processor that each
> local vertex belongs to.
>
> Mark
>
> On Fri, Mar 22, 2019 at 2:20 AM Swarnava Ghosh via petsc-users <
> petsc-users at mcs.anl.gov> wrote:
>
>> Dear PETSc users and developers,
>>
>> I am new to DMPLEX and had a query regarding setting up a consistent
>> domain decomposition of two meshes in PETSc.
>> I have a structured finite difference grid, managed through DMDA. I have
>> another unstructured finite element mesh managed through DMPLEX. Now all
>> the nodes in the unstructured finite element mesh also belong to the set of
>> nodes in the structured finite difference mesh (but not necessarily
>> vice-versa), and the number of nodes in DMPLEX mesh is less than the number
>> of nodes in DMDA mesh. How can I guarantee a consistent domain
>> decomposition of the two meshes? By consistent, I mean that if a process
>> has a set of nodes P from DMDA, and the same process has the set of nodes Q
>> from DMPLEX, then Q is a subset of P.
>>
>> I look forward to your response.
>>
>> Sincerely,
>> Swarnava
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190322/08b501ce/attachment-0001.html>


More information about the petsc-users mailing list