[petsc-users] Parallel DMPlex
Matthew Knepley
knepley at gmail.com
Thu Sep 28 14:42:53 CDT 2023
On Thu, Sep 28, 2023 at 3:38 PM erdemguer via petsc-users <
petsc-users at mcs.anl.gov> wrote:
> Hi,
>
> I am currently using DMPlex in my code. It runs serially at the moment,
> but I'm interested in adding parallel options. Here is my workflow:
>
> Create a DMPlex mesh from GMSH.
> Reorder it with DMPlexPermute.
> Create necessary pre-processing arrays related to the mesh/problem.
> Create field(s) with multi-dofs.
> Create residual vectors.
> Define a function to calculate the residual for each cell and, use SNES.
> As you can see, I'm not using FV or FE structures (most examples do). Now,
> I'm trying to implement this in parallel using a similar approach. However,
> I'm struggling to understand how to create corresponding vectors and how to
> obtain index sets for each processor. Is there a tutorial or paper that
> covers this topic?
>
The intention was that there is enough information in the manual to do this.
Using PetscFE/PetscFV is not required. However, I strongly encourage you to
use PetscSection. Without this, it would be incredibly hard to do what you
want. Once the DM has a Section, it can do things like automatically create
vectors and matrices for you. It can redistribute them, subset them, etc.
The Section describes how dofs are assigned to pieces of the mesh (mesh
points). This is in the manual, and there are a few examples that do it by
hand.
So I suggest changing your code to use PetscSection, and then letting us
know if things still do not work.
Thanks,
Matt
> Thank you.
> Guer.
>
> Sent with Proton Mail <https://proton.me/> secure email.
>
--
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/20230928/022a0e45/attachment.html>
More information about the petsc-users
mailing list