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

DMDACreate1d

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

Synopsis

#include "petscdmda.h"   
PetscErrorCode  DMDACreate1d(MPI_Comm comm, DMBoundaryType bx, PetscInt M, PetscInt dof, PetscInt s, const PetscInt lx[], DM *da)
Collective on MPI_Comm Many br

Input Parameters

comm - MPI communicator Many br
bx - type of ghost cells at the boundary the array should have, if any. Use Many brDM_BOUNDARY_NONE, DM_BOUNDARY_GHOSTED, or DM_BOUNDARY_PERIODIC. Many br
M - global dimension of the array (use -M to indicate that it may be set to a different value Many brfrom the command line with -da_grid_x <M>) Many br
dof - number of degrees of freedom per node Many br
s - stencil width Many br
lx - array containing number of nodes in the X direction on each processor, Many bror NULL. If non-null, must be of length as the number of processes in the MPI_Comm. Many br

Output Parameter

da -the resulting distributed array object Many br

Options Database Key

-dm_view - Calls DMView() at the conclusion of DMDACreate1d() Many br
-da_grid_x <nx> - number of grid points in x direction; can set if M < 0 Many br
-da_refine_x <rx> - refinement factor Many br
-da_refine <n> - refine the DMDA n times before creating it, if M < 0 Many br

Many br

Notes

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, one-dimensional

See Also

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

Level:beginner
Location:
src/dm/impls/da/da1.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/ex8.c.html
src/dm/examples/tutorials/ex51.c.html
src/dm/examples/tutorials/ex11f90.F.html
src/ksp/ksp/examples/tutorials/ex25.c.html
src/ksp/ksp/examples/tutorials/ex28.c.html
src/ksp/ksp/examples/tutorials/ex65.c.html
src/ksp/ksp/examples/tutorials/ex44f.F90.html
src/snes/examples/tutorials/ex3.c.html
src/snes/examples/tutorials/ex21.c.html
src/snes/examples/tutorials/ex22.c.html