petsc-3.7.1 2016-05-15
Report Typos and Errors

DMDACreate3d

Creates an object that will manage the communication of three-dimensional regular array data that is distributed across some processors.

Synopsis

#include "petscdmda.h"    
PetscErrorCode  DMDACreate3d(MPI_Comm comm,DMBoundaryType bx,DMBoundaryType by,DMBoundaryType bz,DMDAStencilType stencil_type,PetscInt M,
               PetscInt N,PetscInt P,PetscInt m,PetscInt n,PetscInt p,PetscInt dof,PetscInt s,const PetscInt lx[],const PetscInt ly[],const PetscInt lz[],DM *da)
Collective on MPI_Comm Many br

Input Parameters

comm - MPI communicator Many br
bx,by,bz - type of ghost nodes the array have. Many brUse one of DM_BOUNDARY_NONE, DM_BOUNDARY_GHOSTED, DM_BOUNDARY_PERIODIC. Many br
stencil_type - Type of stencil (DMDA_STENCIL_STAR or DMDA_STENCIL_BOX) Many br
M,N,P - global dimension in each direction of the array (use -M, -N, and or -P to indicate that it may be set to a different value Many brfrom the command line with -da_grid_x <M> -da_grid_y <N> -da_grid_z <P>) Many br
m,n,p - corresponding number of processors in each dimension Many br(or PETSC_DECIDE to have calculated) Many br
dof - number of degrees of freedom per node Many br
s - stencil width Many br
lx, ly, lz - arrays containing the number of nodes in each cell along Many brthe x, y, and z coordinates, or NULL. If non-null, these Many brmust be of length as m,n,p and the corresponding Many brm,n, or p cannot be PETSC_DECIDE. Sum of the lx[] entries must be M, sum of Many brthe ly[] must N, sum of the lz[] must be P Many br

Output Parameter

da -the resulting distributed array object Many br

Options Database Key

-dm_view - Calls DMView() at the conclusion of DMDACreate3d() Many br
-da_grid_x <nx> - number of grid points in x direction, if M < 0 Many br
-da_grid_y <ny> - number of grid points in y direction, if N < 0 Many br
-da_grid_z <nz> - number of grid points in z direction, if P < 0 Many br
-da_processors_x <MX> - number of processors in x direction Many br
-da_processors_y <MY> - number of processors in y direction Many br
-da_processors_z <MZ> - number of processors in z direction Many br
-da_refine_x <rx> - refinement ratio in x direction Many br
-da_refine_y <ry> - refinement ratio in y direction Many br
-da_refine_z <rz>- refinement ratio in z directio Many br
-da_refine <n> - refine the DMDA n times before creating it, , if M, N, or P < 0 Many br

Many br

Notes

The stencil type DMDA_STENCIL_STAR with width 1 corresponds to the Many brstandard 7-pt stencil, while DMDA_STENCIL_BOX with width 1 denotes Many brthe standard 27-pt stencil. Many br

The array data itself is NOT stored in the DMDA, it is stored in Vec objects; Many brThe appropriate vector objects can be obtained with calls to DMCreateGlobalVector() Many brand DMCreateLocalVector() and calls to VecDuplicate() if more are needed. Many br

Keywords

distributed array, create, three-dimensional

See Also

DMDestroy(), DMView(), DMDACreate1d(), DMDACreate2d(), DMGlobalToLocalBegin(), DMDAGetRefinementFactor(),
DMGlobalToLocalEnd(), DMLocalToGlobalBegin(), DMLocalToLocalBegin(), DMLocalToLocalEnd(), DMDASetRefinementFactor(), Many brDMDAGetInfo(), DMCreateGlobalVector(), DMCreateLocalVector(), DMDACreateNaturalVector(), DMLoad(), DMDAGetOwnershipRanges() Many br

Level:beginner
Location:
src/dm/impls/da/da3.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/dm/examples/tutorials/ex3.c.html
src/dm/examples/tutorials/ex15.c.html
src/dm/examples/tutorials/ex11f90.F.html
src/dm/examples/tutorials/ex13f90.F90.html
src/ksp/ksp/examples/tutorials/ex34.c.html
src/ksp/ksp/examples/tutorials/ex42.c.html
src/ksp/ksp/examples/tutorials/ex45.c.html
src/ksp/ksp/examples/tutorials/ex22f.F.html
src/snes/examples/tutorials/ex14.c.html
src/snes/examples/tutorials/ex20.c.html
src/snes/examples/tutorials/ex48.c.html