Actual source code: petscdmdatypes.h

petsc-3.12.5 2020-03-29
Report Typos and Errors
  1: #if !defined(PETSCDMDATYPES_H)
  2: #define PETSCDMDATYPES_H

  4:  #include <petscdmtypes.h>

  6: /*E
  7:     DMDAStencilType - Determines if the stencil extends only along the coordinate directions, or also
  8:       to the northeast, northwest etc

 10:    Level: beginner

 12: .seealso: DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMDACreate(), DMDASetStencilType()
 13: E*/
 14: typedef enum { DMDA_STENCIL_STAR,DMDA_STENCIL_BOX } DMDAStencilType;

 16: /*E
 17:     DMDAInterpolationType - Defines the type of interpolation that will be returned by
 18:        DMCreateInterpolation.

 20:    Level: beginner

 22: .seealso: DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMCreateInterpolation(), DMDASetInterpolationType(), DMDACreate()
 23: E*/
 24: typedef enum { DMDA_Q0, DMDA_Q1 } DMDAInterpolationType;

 26: /*E
 27:     DMDAElementType - Defines the type of elements that will be returned by
 28:        DMDAGetElements()

 30:    Level: beginner

 32: .seealso: DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMCreateInterpolation(), DMDASetInterpolationType(),
 33:           DMDASetElementType(), DMDAGetElements(), DMDARestoreElements(), DMDACreate()
 34: E*/
 35: typedef enum { DMDA_ELEMENT_P1, DMDA_ELEMENT_Q1 } DMDAElementType;

 37: /*S
 38:      DMDALocalInfo - C struct that contains information about a structured grid and a processors logical
 39:               location in it.

 41:    Level: beginner

 43:   Fortran Notes - This should be declared as
 44: $    DMDALocalInfo :: info(DMDA_LOCAL_INFO_SIZE)
 45:      and the entries accessed via
 46: $    info(DMDA_LOCAL_INFO_DIM)
 47: $    info(DMDA_LOCAL_INFO_DOF) etc.
 48:    The entries bx,by,bz, st, and da are not accessible from Fortran.

 50: .seealso:  DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMDestroy(), DM, DMDAGetLocalInfo(), DMDAGetInfo()
 51: S*/
 52: typedef struct {
 53:   PetscInt         dim,dof,sw;
 54:   PetscInt         mx,my,mz;    /* global number of grid points in each direction */
 55:   PetscInt         xs,ys,zs;    /* starting point of this processor, excluding ghosts */
 56:   PetscInt         xm,ym,zm;    /* number of grid points on this processor, excluding ghosts */
 57:   PetscInt         gxs,gys,gzs;    /* starting point of this processor including ghosts */
 58:   PetscInt         gxm,gym,gzm;    /* number of grid points on this processor including ghosts */
 59:   DMBoundaryType   bx,by,bz; /* type of ghost nodes at boundary */
 60:   DMDAStencilType  st;
 61:   DM               da;
 62: } DMDALocalInfo;

 64: #endif