[petsc-users] src/ksp/ksp/examples/tutorials/ex22.c

Matthew Knepley knepley at gmail.com
Sun Sep 4 10:50:39 CDT 2011


On Sun, Sep 4, 2011 at 10:08 AM, Алексей Рязанов <ram at ibrae.ac.ru> wrote:

> Hello!
> Help me please to solve my tiny problem with dmmg.
>
> In the example src/ksp/ksp/examples/tutorials/ex22.c, which is discussed on
> the 111th page of users manual, we use function
> (line 36):
> DACreate3d(PETSC_COMM_WORLD,DA_NONPERIODIC,DA_STENCIL_STAR,-3,-3,-3,PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE,1,1,0,0,0,&da);
> to "*create the DA that stores information about the coarsest grid you
> wish to use*".
> We can see that negative dimension values (-M, -N, -P) are used  "*to
> indicate that it may be set to a different value from the command line with
> -da_grid_x <M> -da_grid_y <N> -da_grid_z <P>". *
> The question is: when I use -da_grid_ M,N,P options as the size of the
> coarsest matrix, what's the size of the finest (most accurate, original
> problem) matrix?
>
> I've tried to clear this up, using VecVew on the residual vector and
> figured out, that when i'm using M,N,P as input parameters (so define the
> coarsest grid as field of M*N*P dots), I get the residual vector of size
> (4*M-3)*(4*N-3)*(4*P-3).
> Is my result correct?  If yes, could you please explain why it happens in
> this way.
>

When refinement happens, it adds a vertex between any two vertices, starting
with the mesh you provide.

   Matt


> Sorry if my question is incorrect. I could mix up everything at all.
> Thanks in advance!
>
> --
> Best regards,
> Alexey Ryazanov
> ______________________________________
> Nuclear Safety Institute of Russian Academy of Sciences
>
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110904/5f0bace8/attachment-0001.htm>


More information about the petsc-users mailing list