On Thu, Feb 15, 2018 at 5:43 PM, Mohammad Hassan Baghaei < mhbagh...@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:knep...@gmail.com] > *Sent:* Friday, February 16, 2018 6:34 AM > *To:* Mohammad Hassan Baghaei <mhbagh...@mail.sjtu.edu.cn> > *Cc:* PETSc <petsc-users@mcs.anl.gov> > *Subject:* Re: [petsc-users] Dealing with DMPlexDistribute() > > > > On Thu, Feb 15, 2018 at 4:40 PM, Mohammad Hassan Baghaei < > mhbagh...@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/>