[petsc-dev] Are odd grid numbers intentionally required for structured interpolation/refinement in 3.2.2?
Aron Ahmadia
aron.ahmadia at kaust.edu.sa
Thu Oct 20 07:46:24 CDT 2011
Lets pretend I didn't ask that question :)
And yes, that obviously makes sense. Thanks Barry.
-A
On Thu, Oct 20, 2011 at 3:42 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> On Oct 20, 2011, at 7:22 AM, Aron Ahmadia wrote:
>
> > We ended up recording mostly login information into getting into the
> supercomputer, but the slides are available here:
> http://aron.ahmadia.net/amcs312/petsc-ex50/
> >
> > What is the PETSc idiom for grabbing the fine level solution after using
> SNESGridSequence?
>
> SNESGetSolution()?
>
> Barry
>
> > I could not find any documentation about where the solutions, and the
> only way I've been able to do it so far is to set a SNESMonitor and save the
> grid out to disk when I am at high enough resolution.
> >
> > A
> >
> > On Sun, Oct 9, 2011 at 9:33 PM, Aron Ahmadia <aron.ahmadia at kaust.edu.sa>
> wrote:
> > Thanks guys, I will try to send you pictures/video after the
> demonstration this Wednesday.
> >
> > -Aron
> >
> >
> > On Sun, Oct 9, 2011 at 5:54 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> >
> > Note also you can use -da_refine <n> Then it takes the initial grid
> sizes and refines n times before creating the DA, then it does multigrid
> with n+1 levels. If you do it this way you don't have to mess around with
> figuring what numbers to put in -da_grid_x 127 or whatever.
> >
> > Barry
> >
> >
> >
> > On Oct 9, 2011, at 8:00 AM, Jed Brown wrote:
> >
> > > On Sun, Oct 9, 2011 at 05:23, Aron Ahmadia <aron.ahmadia at kaust.edu.sa>
> wrote:
> > > Jed pointed out that I should be demo-ing ex50, not ex19, so I tried to
> port my stuff over. Oddly enough, if I am using 2^n grid spacing,
> everything falls over. 2^n+1 works, though, which seems non-obvious to me.
> > >
> > > --- petsc-ex50/ex50 ‹master*➔ M⁇› » mpirun -n 4 ./ex50 -da_grid_x 65
> -da_grid_y 65 -pc_type mg -pc_mg_levels 3
> > > lid velocity = 0.000236686, prandtl # = 1, grashof # = 1
> > > Number of Newton iterations = 6
> > >
> > > ./ex50 -da_grid_x 64 -da_grid_y 64 -pc_type mg -pc_mg_levels 2
> > >
> > > lid velocity = 0.000244141, prandtl # = 1, grashof # = 1
> > > [0]PETSC ERROR: --------------------- Error Message
> ------------------------------------
> > > [0]PETSC ERROR: Arguments are incompatible!
> > > [0]PETSC ERROR: Ratio between levels: (mx - 1)/(Mx - 1) must be
> integer: mx 64 Mx 32!
> > >
> > > DMMG always started with a coarse problem and refined a given number of
> times regardless of whether linear or nonlinear multigrid is being used.
> > >
> > > Now we have
> > >
> > > -snes_grid_sequence NLEVELS
> > >
> > > which starts with whatever grid you give it and refines. If you use
> -snes_grid_sequence N -pc_type mg, then the number of levels in PCMG will be
> automatically changed inside the grid sequencing so that it references the
> same coarse level.
> > >
> > > If instead, you only do linear multigrid, then you pass
> > >
> > > -pc_type mg -pc_mg_levels N
> > >
> > > and your specified problem is _coarsened_ to produce the number of
> levels. That coarsening requires some divisbility in the grid size. The
> reason it is 2^n+1 instead of 2^n is because this example uses a
> vertex-centered instead cell-centered discretization. This is natural for
> finite differences instead of finite volumes, but either method could be
> used with either centering strategy.
> >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20111020/32258262/attachment.html>
More information about the petsc-dev
mailing list