[petsc-users] Dealing with DMPlexDistribute()
Mohammad Hassan Baghaei
mhbaghaei at mail.sjtu.edu.cn
Thu Feb 15 17:10:29 CST 2018
Oh! Thanks for your help! I am currently looking at the test examples. I would definitely try your method. In the first impression, I thought it was DMPlexDistribute() problem.
From: Matthew Knepley [mailto:knepley at gmail.com]
Sent: Friday, February 16, 2018 6:51 AM
To: Mohammad Hassan Baghaei <mhbaghaei at mail.sjtu.edu.cn>
Cc: PETSc <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] Dealing with DMPlexDistribute()
On Thu, Feb 15, 2018 at 5:43 PM, Mohammad Hassan Baghaei <mhbaghaei at mail.sjtu.edu.cn <mailto:mhbaghaei at mail.sjtu.edu.cn> > wrote:
Hi Matt
In fact, I created a routine for my specific mesh generation. I firstly, create the DMPlex object at first, then setting the chart, then doing symmetrize and interpolate. Next, I created coordinate section and giving the coordinates. After finishing giving the coordinates, I declare the distribution in routine, with this two lines:
If you are creating the whole mesh, then you want to enclose the creation steps in
if (!rank) {
<your current code for creating the chart and cones>
} else {
DMCreate()
DMSetType()
}
DMPlexSymmetrize()
DMPlexInterpolate()
There are examples of me doing this in the Plex tests.
Thanks,
Matt
DMPlexDistribute(*dm, 0, NULL, &dmDist);
if (dmDist) {DMDestroy(dm); *dm = dmDist;}
Thanks
Amir
From: Matthew Knepley [mailto:knepley at gmail.com <mailto:knepley at gmail.com> ]
Sent: Friday, February 16, 2018 6:34 AM
To: Mohammad Hassan Baghaei <mhbaghaei at mail.sjtu.edu.cn <mailto:mhbaghaei at mail.sjtu.edu.cn> >
Cc: PETSc <petsc-users at mcs.anl.gov <mailto:petsc-users at mcs.anl.gov> >
Subject: Re: [petsc-users] Dealing with DMPlexDistribute()
On Thu, Feb 15, 2018 at 4:40 PM, Mohammad Hassan Baghaei <mhbaghaei at mail.sjtu.edu.cn <mailto:mhbaghaei at mail.sjtu.edu.cn> > wrote:
Hi
I am using DMPlex as interface for mesh generation. On single core, I got around 30000 mesh cells. Whenever, I run on multiple core, say 3, in the output file for DM, VTK, I got 3 times mesh cell and point numbers. Does it mean that DMPlexDistribute() does not work properly!
Hi Amir,
It sounds like you are generating a mesh on every process. How are you generating the mesh?
Thanks,
Matt
Thanks
Amir
--
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.caam.rice.edu/~mk51/>
--
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.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180216/d8a921ea/attachment.html>
More information about the petsc-users
mailing list