[petsc-dev] The problem about running an example in PETSc
Jed Brown
jedbrown at mcs.anl.gov
Sun May 19 16:07:01 CDT 2013
Lulu Liu <lulu.liu at kaust.edu.sa> writes:
> ierr = DMDACreate(comm, da);CHKERRQ(ierr);
> ierr = DMDASetDim(*da, 3);CHKERRQ(ierr); // <-- fix this
> line
> ierr = DMDASetSizes(*da, M, N, P);CHKERRQ(ierr);
> ierr = DMDASetNumProcs(*da, m, n, p);CHKERRQ(ierr);
> ierr = DMDASetBoundaryType(*da, bx, by, bz);CHKERRQ(ierr);
> ierr = DMDASetDof(*da, dof);CHKERRQ(ierr);
> ierr = DMDASetStencilType(*da, stencil_type);CHKERRQ(ierr);
> ierr = DMDASetStencilWidth(*da, s);CHKERRQ(ierr);
> ierr = DMDASetOwnershipRanges(*da, lx, ly, lz);CHKERRQ(ierr);
> /* This violates the behavior for other classes, but right now users
> expect negative dimensions to be handled this way */
> ierr = DMSetFromOptions(*da);CHKERRQ(ierr); // <--- delete
> this line
> ierr = DMSetUp(*da);CHKERRQ(ierr);
> ierr = DMViewFromOptions(*da,"-dm_view");CHKERRQ(ierr); // <--- delete
> or set a prefix
>
>
> If I delete the line
>
> ierr = DMSetFromOptions(*da);CHKERRQ(ierr);
>
> which implies the partition has no overlaps when in fact I put the option
> -da_overlap 1 outside ( I need overlaps). How to fix it?
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMDASetOverlap.html
More information about the petsc-dev
mailing list