[petsc-users] Mixing PETSc Parallelism with Serial MMG3D Workflow

Stefano Zampini stefano.zampini at gmail.com
Fri Apr 18 09:09:36 CDT 2025


If you have a vector distributed on the original mesh, then you can use the
SF returned by DMPlexGetGatherDM and use that in a call to
DMPlexDistributeField

Il giorno ven 18 apr 2025 alle ore 17:02 neil liu <liufield at gmail.com> ha
scritto:

> Dear PETSc developers and users,
>
> I am currently exploring the integration of MMG3D with PETSc. Since MMG3D
> supports only serial execution, I am planning to combine parallel and
> serial computing in my workflow. Specifically, after solving the linear
> systems in parallel using PETSc:
>
>    1.
>
>    I intend to use DMPlexGetGatherDM to collect the entire mesh on the
>    root process for input to MMG3D.
>    2.
>
>    Additionally, I plan to gather the error field onto the root process
>    using VecScatter.
>
> However, I am concerned that the nth value in the gathered error vector
> (step 2) may not correspond to the nth element in the gathered mesh (step
> 1). Is this a valid concern?
>
> Do you have any suggestions or recommended practices for ensuring correct
> correspondence between the solution fields and the mesh when switching from
> parallel to serial mode?
>
> Thanks,
>
> Xiaodong
>


-- 
Stefano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250418/7a323446/attachment.html>


More information about the petsc-users mailing list