Actual source code: petscdm.h

petsc-master 2018-11-21
Report Typos and Errors
  1: /*
  2:       Objects to manage the interactions between the mesh data structures and the algebraic objects
  3: */
  6:  #include <petscmat.h>
  7:  #include <petscdmtypes.h>
  8:  #include <petscfetypes.h>
  9:  #include <petscdstypes.h>
 10:  #include <petscdmlabel.h>

 12: PETSC_EXTERN PetscErrorCode DMInitializePackage(void);

 14: PETSC_EXTERN PetscClassId DM_CLASSID;

 16: #define DMLOCATEPOINT_POINT_NOT_FOUND -367

 18: /*J
 19:     DMType - String with the name of a PETSc DM

 21:    Level: beginner

 23: .seealso: DMSetType(), DM
 24: J*/
 25: typedef const char* DMType;
 26: #define DMDA        "da"
 27: #define DMCOMPOSITE "composite"
 28: #define DMSLICED    "sliced"
 29: #define DMSHELL     "shell"
 30: #define DMPLEX      "plex"
 31: #define DMREDUNDANT "redundant"
 32: #define DMPATCH     "patch"
 33: #define DMMOAB      "moab"
 34: #define DMNETWORK   "network"
 35: #define DMFOREST    "forest"
 36: #define DMP4EST     "p4est"
 37: #define DMP8EST     "p8est"
 38: #define DMSWARM     "swarm"
 39: #define DMPRODUCT   "product"
 40: #define DMSTAG      "stag"

 42: PETSC_EXTERN const char *const DMBoundaryTypes[];
 43: PETSC_EXTERN PetscFunctionList DMList;
 44: PETSC_EXTERN PetscErrorCode DMCreate(MPI_Comm,DM*);
 45: PETSC_EXTERN PetscErrorCode DMClone(DM,DM*);
 46: PETSC_EXTERN PetscErrorCode DMSetType(DM, DMType);
 47: PETSC_EXTERN PetscErrorCode DMGetType(DM, DMType *);
 48: PETSC_EXTERN PetscErrorCode DMRegister(const char[],PetscErrorCode (*)(DM));
 49: PETSC_EXTERN PetscErrorCode DMRegisterDestroy(void);

 51: PETSC_EXTERN PetscErrorCode DMView(DM,PetscViewer);
 52: PETSC_EXTERN PetscErrorCode DMLoad(DM,PetscViewer);
 53: PETSC_EXTERN PetscErrorCode DMDestroy(DM*);
 54: PETSC_EXTERN PetscErrorCode DMCreateGlobalVector(DM,Vec*);
 55: PETSC_EXTERN PetscErrorCode DMCreateLocalVector(DM,Vec*);
 56: PETSC_EXTERN PetscErrorCode DMGetLocalVector(DM,Vec *);
 57: PETSC_EXTERN PetscErrorCode DMRestoreLocalVector(DM,Vec *);
 58: PETSC_EXTERN PetscErrorCode DMGetGlobalVector(DM,Vec *);
 59: PETSC_EXTERN PetscErrorCode DMRestoreGlobalVector(DM,Vec *);
 60: PETSC_EXTERN PetscErrorCode DMClearGlobalVectors(DM);
 61: PETSC_EXTERN PetscErrorCode DMClearLocalVectors(DM);
 62: PETSC_EXTERN PetscErrorCode DMHasNamedGlobalVector(DM,const char*,PetscBool*);
 63: PETSC_EXTERN PetscErrorCode DMGetNamedGlobalVector(DM,const char*,Vec*);
 64: PETSC_EXTERN PetscErrorCode DMRestoreNamedGlobalVector(DM,const char*,Vec*);
 65: PETSC_EXTERN PetscErrorCode DMHasNamedLocalVector(DM,const char*,PetscBool*);
 66: PETSC_EXTERN PetscErrorCode DMGetNamedLocalVector(DM,const char*,Vec*);
 67: PETSC_EXTERN PetscErrorCode DMRestoreNamedLocalVector(DM,const char*,Vec*);
 68: PETSC_EXTERN PetscErrorCode DMGetLocalToGlobalMapping(DM,ISLocalToGlobalMapping*);
 69: PETSC_EXTERN PetscErrorCode DMCreateFieldIS(DM,PetscInt*,char***,IS**);
 70: PETSC_EXTERN PetscErrorCode DMGetBlockSize(DM,PetscInt*);
 71: PETSC_EXTERN PetscErrorCode DMCreateColoring(DM,ISColoringType,ISColoring*);
 72: PETSC_EXTERN PetscErrorCode DMCreateMatrix(DM,Mat*);
 73: PETSC_EXTERN PetscErrorCode DMSetMatrixPreallocateOnly(DM,PetscBool);
 74: PETSC_EXTERN PetscErrorCode DMSetMatrixStructureOnly(DM,PetscBool);
 75: PETSC_EXTERN PetscErrorCode DMCreateInterpolation(DM,DM,Mat*,Vec*);
 76: PETSC_EXTERN PetscErrorCode DMCreateRestriction(DM,DM,Mat*);
 77: PETSC_EXTERN PetscErrorCode DMCreateInjection(DM,DM,Mat*);
 78: PETSC_EXTERN PetscErrorCode DMCreateMassMatrix(DM,DM,Mat*);
 79: PETSC_EXTERN PetscErrorCode DMGetWorkArray(DM,PetscInt,MPI_Datatype,void*);
 80: PETSC_EXTERN PetscErrorCode DMRestoreWorkArray(DM,PetscInt,MPI_Datatype,void*);
 81: PETSC_EXTERN PetscErrorCode DMRefine(DM,MPI_Comm,DM*);
 82: PETSC_EXTERN PetscErrorCode DMCoarsen(DM,MPI_Comm,DM*);
 83: PETSC_EXTERN PetscErrorCode DMGetCoarseDM(DM,DM*);
 84: PETSC_EXTERN PetscErrorCode DMSetCoarseDM(DM,DM);
 85: PETSC_EXTERN PetscErrorCode DMGetFineDM(DM,DM*);
 86: PETSC_EXTERN PetscErrorCode DMSetFineDM(DM,DM);
 87: PETSC_EXTERN PetscErrorCode DMRefineHierarchy(DM,PetscInt,DM[]);
 88: PETSC_EXTERN PetscErrorCode DMCoarsenHierarchy(DM,PetscInt,DM[]);
 89: PETSC_EXTERN PetscErrorCode DMCoarsenHookAdd(DM,PetscErrorCode (*)(DM,DM,void*),PetscErrorCode (*)(DM,Mat,Vec,Mat,DM,void*),void*);
 90: PETSC_EXTERN PetscErrorCode DMCoarsenHookRemove(DM,PetscErrorCode (*)(DM,DM,void*),PetscErrorCode (*)(DM,Mat,Vec,Mat,DM,void*),void*);
 91: PETSC_EXTERN PetscErrorCode DMRefineHookAdd(DM,PetscErrorCode (*)(DM,DM,void*),PetscErrorCode (*)(DM,Mat,DM,void*),void*);
 92: PETSC_EXTERN PetscErrorCode DMRefineHookRemove(DM,PetscErrorCode (*)(DM,DM,void*),PetscErrorCode (*)(DM,Mat,DM,void*),void*);
 93: PETSC_EXTERN PetscErrorCode DMRestrict(DM,Mat,Vec,Mat,DM);
 94: PETSC_EXTERN PetscErrorCode DMInterpolate(DM,Mat,DM);
 95: PETSC_EXTERN PetscErrorCode DMSetFromOptions(DM);
 96: PETSC_STATIC_INLINE PetscErrorCode DMViewFromOptions(DM A,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)A,obj,name);}

 98: PETSC_EXTERN PetscErrorCode DMAdaptLabel(DM,DMLabel,DM*);
 99: PETSC_EXTERN PetscErrorCode DMAdaptMetric(DM, Vec, DMLabel, DM *);

101: PETSC_EXTERN PetscErrorCode DMSetUp(DM);
102: PETSC_EXTERN PetscErrorCode DMCreateInterpolationScale(DM,DM,Mat,Vec*);
103: PETSC_EXTERN PetscErrorCode DMCreateAggregates(DM,DM,Mat*);
104: PETSC_EXTERN PetscErrorCode DMGlobalToLocalHookAdd(DM,PetscErrorCode (*)(DM,Vec,InsertMode,Vec,void*),PetscErrorCode (*)(DM,Vec,InsertMode,Vec,void*),void*);
105: PETSC_EXTERN PetscErrorCode DMLocalToGlobalHookAdd(DM,PetscErrorCode (*)(DM,Vec,InsertMode,Vec,void*),PetscErrorCode (*)(DM,Vec,InsertMode,Vec,void*),void*);
106: PETSC_EXTERN PetscErrorCode DMGlobalToLocal(DM,Vec,InsertMode,Vec);
107: PETSC_EXTERN PetscErrorCode DMGlobalToLocalBegin(DM,Vec,InsertMode,Vec);
108: PETSC_EXTERN PetscErrorCode DMGlobalToLocalEnd(DM,Vec,InsertMode,Vec);
109: PETSC_EXTERN PetscErrorCode DMLocalToGlobal(DM,Vec,InsertMode,Vec);
110: PETSC_EXTERN PetscErrorCode DMLocalToGlobalBegin(DM,Vec,InsertMode,Vec);
111: PETSC_EXTERN PetscErrorCode DMLocalToGlobalEnd(DM,Vec,InsertMode,Vec);
112: PETSC_EXTERN PetscErrorCode DMLocalToLocalBegin(DM,Vec,InsertMode,Vec);
113: PETSC_EXTERN PetscErrorCode DMLocalToLocalEnd(DM,Vec,InsertMode,Vec);
114: PETSC_EXTERN PetscErrorCode DMConvert(DM,DMType,DM*);

116: /* Topology support */
117: PETSC_EXTERN PetscErrorCode DMGetDimension(DM,PetscInt*);
118: PETSC_EXTERN PetscErrorCode DMSetDimension(DM,PetscInt);
119: PETSC_EXTERN PetscErrorCode DMGetDimPoints(DM,PetscInt,PetscInt*,PetscInt*);
120: PETSC_EXTERN PetscErrorCode DMGetUseNatural(DM,PetscBool*);
121: PETSC_EXTERN PetscErrorCode DMSetUseNatural(DM,PetscBool);

123: /* Coordinate support */
124: PETSC_EXTERN PetscErrorCode DMGetCoordinateDM(DM,DM*);
125: PETSC_EXTERN PetscErrorCode DMSetCoordinateDM(DM,DM);
126: PETSC_EXTERN PetscErrorCode DMGetCoordinateDim(DM,PetscInt*);
127: PETSC_EXTERN PetscErrorCode DMSetCoordinateDim(DM,PetscInt);
128: PETSC_EXTERN PetscErrorCode DMGetCoordinateSection(DM,PetscSection*);
129: PETSC_EXTERN PetscErrorCode DMSetCoordinateSection(DM,PetscInt,PetscSection);
130: PETSC_EXTERN PetscErrorCode DMGetCoordinates(DM,Vec*);
131: PETSC_EXTERN PetscErrorCode DMSetCoordinates(DM,Vec);
132: PETSC_EXTERN PetscErrorCode DMGetCoordinatesLocal(DM,Vec*);
133: PETSC_EXTERN PetscErrorCode DMGetCoordinatesLocalSetUp(DM);
134: PETSC_EXTERN PetscErrorCode DMGetCoordinatesLocalNoncollective(DM,Vec*);
135: PETSC_EXTERN PetscErrorCode DMGetCoordinatesLocalTuple(DM,IS,PetscSection*,Vec*);
136: PETSC_EXTERN PetscErrorCode DMSetCoordinatesLocal(DM,Vec);
137: PETSC_EXTERN PetscErrorCode DMLocatePoints(DM,Vec,DMPointLocationType,PetscSF*);
138: PETSC_EXTERN PetscErrorCode DMGetPeriodicity(DM,PetscBool*,const PetscReal**,const PetscReal**,const DMBoundaryType**);
139: PETSC_EXTERN PetscErrorCode DMSetPeriodicity(DM,PetscBool,const PetscReal[],const PetscReal[],const DMBoundaryType[]);
140: PETSC_EXTERN PetscErrorCode DMLocalizeCoordinate(DM, const PetscScalar[], PetscBool, PetscScalar[]);
141: PETSC_EXTERN PetscErrorCode DMLocalizeCoordinates(DM);
142: PETSC_EXTERN PetscErrorCode DMGetCoordinatesLocalized(DM,PetscBool*);
143: PETSC_EXTERN PetscErrorCode DMGetNeighbors(DM,PetscInt*,const PetscMPIInt**);
144: PETSC_EXTERN PetscErrorCode DMGetCoordinateField(DM,DMField*);
145: PETSC_EXTERN PetscErrorCode DMSetCoordinateField(DM,DMField);

147: /* block hook interface */
148: PETSC_EXTERN PetscErrorCode DMSubDomainHookAdd(DM,PetscErrorCode (*)(DM,DM,void*),PetscErrorCode (*)(DM,VecScatter,VecScatter,DM,void*),void*);
149: PETSC_EXTERN PetscErrorCode DMSubDomainHookRemove(DM,PetscErrorCode (*)(DM,DM,void*),PetscErrorCode (*)(DM,VecScatter,VecScatter,DM,void*),void*);
150: PETSC_EXTERN PetscErrorCode DMSubDomainRestrict(DM,VecScatter,VecScatter,DM);

152: PETSC_EXTERN PetscErrorCode DMSetOptionsPrefix(DM,const char []);
153: PETSC_EXTERN PetscErrorCode DMAppendOptionsPrefix(DM,const char []);
154: PETSC_EXTERN PetscErrorCode DMGetOptionsPrefix(DM,const char*[]);
155: PETSC_EXTERN PetscErrorCode DMSetVecType(DM,VecType);
156: PETSC_EXTERN PetscErrorCode DMGetVecType(DM,VecType*);
157: PETSC_EXTERN PetscErrorCode DMSetMatType(DM,MatType);
158: PETSC_EXTERN PetscErrorCode DMGetMatType(DM,MatType*);
159: PETSC_EXTERN PetscErrorCode DMSetISColoringType(DM,ISColoringType);
160: PETSC_EXTERN PetscErrorCode DMGetISColoringType(DM,ISColoringType*);
161: PETSC_EXTERN PetscErrorCode DMSetApplicationContext(DM,void*);
162: PETSC_EXTERN PetscErrorCode DMSetApplicationContextDestroy(DM,PetscErrorCode (*)(void**));
163: PETSC_EXTERN PetscErrorCode DMGetApplicationContext(DM,void*);
164: PETSC_EXTERN PetscErrorCode DMSetVariableBounds(DM,PetscErrorCode (*)(DM,Vec,Vec));
165: PETSC_EXTERN PetscErrorCode DMHasVariableBounds(DM,PetscBool *);
166: PETSC_EXTERN PetscErrorCode DMHasColoring(DM,PetscBool *);
167: PETSC_EXTERN PetscErrorCode DMHasCreateRestriction(DM,PetscBool *);
168: PETSC_EXTERN PetscErrorCode DMHasCreateInjection(DM,PetscBool *);
169: PETSC_EXTERN PetscErrorCode DMComputeVariableBounds(DM,Vec,Vec);

171: PETSC_EXTERN PetscErrorCode DMCreateSubDM(DM, PetscInt, const PetscInt[], IS *, DM *);
172: PETSC_EXTERN PetscErrorCode DMCreateSuperDM(DM[], PetscInt, IS **, DM *);
173: PETSC_EXTERN PetscErrorCode DMCreateFieldDecomposition(DM,PetscInt*,char***,IS**,DM**);
174: PETSC_EXTERN PetscErrorCode DMCreateDomainDecomposition(DM,PetscInt*,char***,IS**,IS**,DM**);
175: PETSC_EXTERN PetscErrorCode DMCreateDomainDecompositionScatters(DM,PetscInt,DM*,VecScatter**,VecScatter**,VecScatter**);

177: PETSC_EXTERN PetscErrorCode DMGetRefineLevel(DM,PetscInt*);
178: PETSC_EXTERN PetscErrorCode DMSetRefineLevel(DM,PetscInt);
179: PETSC_EXTERN PetscErrorCode DMGetCoarsenLevel(DM,PetscInt*);
180: PETSC_EXTERN PetscErrorCode DMFinalizePackage(void);

182: PETSC_EXTERN PetscErrorCode VecGetDM(Vec, DM*);
183: PETSC_EXTERN PetscErrorCode VecSetDM(Vec, DM);
184: PETSC_EXTERN PetscErrorCode MatGetDM(Mat, DM*);
185: PETSC_EXTERN PetscErrorCode MatSetDM(Mat, DM);
186: PETSC_EXTERN PetscErrorCode MatFDColoringUseDM(Mat,MatFDColoring);

188: typedef struct NLF_DAAD* NLF;

190: #define DM_FILE_CLASSID 1211221

192: /* FEM support */
193: PETSC_EXTERN PetscErrorCode DMPrintCellVector(PetscInt, const char [], PetscInt, const PetscScalar []);
194: PETSC_EXTERN PetscErrorCode DMPrintCellMatrix(PetscInt, const char [], PetscInt, PetscInt, const PetscScalar []);
195: PETSC_EXTERN PetscErrorCode DMPrintLocalVec(DM, const char [], PetscReal, Vec);

197: PETSC_EXTERN PetscErrorCode DMSetNullSpaceConstructor(DM, PetscInt, PetscErrorCode (*)(DM, PetscInt, MatNullSpace *));
198: PETSC_EXTERN PetscErrorCode DMGetNullSpaceConstructor(DM, PetscInt, PetscErrorCode (**)(DM, PetscInt, MatNullSpace *));
199: PETSC_EXTERN PetscErrorCode DMSetNearNullSpaceConstructor(DM, PetscInt, PetscErrorCode (*)(DM, PetscInt, MatNullSpace *));
200: PETSC_EXTERN PetscErrorCode DMGetNearNullSpaceConstructor(DM, PetscInt, PetscErrorCode (**)(DM, PetscInt, MatNullSpace *));

202: PETSC_EXTERN PetscErrorCode DMGetSection(DM, PetscSection *);
203: PETSC_EXTERN PetscErrorCode DMSetSection(DM, PetscSection);
204: PETSC_EXTERN PetscErrorCode DMGetDefaultConstraints(DM, PetscSection *, Mat *);
205: PETSC_EXTERN PetscErrorCode DMSetDefaultConstraints(DM, PetscSection, Mat);
206: PETSC_EXTERN PetscErrorCode DMGetGlobalSection(DM, PetscSection *);
207: PETSC_EXTERN PetscErrorCode DMSetGlobalSection(DM, PetscSection);
208: PETSC_EXTERN PetscErrorCode DMGetDefaultSF(DM, PetscSF *);
209: PETSC_EXTERN PetscErrorCode DMSetDefaultSF(DM, PetscSF);
210: PETSC_EXTERN PetscErrorCode DMCreateDefaultSF(DM, PetscSection, PetscSection);
211: PETSC_EXTERN PetscErrorCode DMGetPointSF(DM, PetscSF *);
212: PETSC_EXTERN PetscErrorCode DMSetPointSF(DM, PetscSF);

214: PETSC_STATIC_INLINE PetscErrorCode DMGetDefaultSection(DM dm, PetscSection *s) {return DMGetSection(dm,s);}
215: PETSC_STATIC_INLINE PetscErrorCode DMSetDefaultSection(DM dm, PetscSection s) {return DMSetSection(dm,s);}
216: PETSC_STATIC_INLINE PetscErrorCode DMGetDefaultGlobalSection(DM dm, PetscSection *s) {return DMGetGlobalSection(dm,s);}
217: PETSC_STATIC_INLINE PetscErrorCode DMSetDefaultGlobalSection(DM dm, PetscSection s) {return DMSetGlobalSection(dm,s);}


220: PETSC_EXTERN PetscErrorCode DMGetOutputDM(DM, DM *);
221: PETSC_EXTERN PetscErrorCode DMGetOutputSequenceNumber(DM, PetscInt *, PetscReal *);
222: PETSC_EXTERN PetscErrorCode DMSetOutputSequenceNumber(DM, PetscInt, PetscReal);
223: PETSC_EXTERN PetscErrorCode DMOutputSequenceLoad(DM, PetscViewer, const char *, PetscInt, PetscReal *);

225: PETSC_EXTERN PetscErrorCode DMGetDS(DM, PetscDS *);
226: PETSC_EXTERN PetscErrorCode DMSetDS(DM, PetscDS);
227: PETSC_EXTERN PetscErrorCode DMGetNumFields(DM, PetscInt *);
228: PETSC_EXTERN PetscErrorCode DMSetNumFields(DM, PetscInt);
229: PETSC_EXTERN PetscErrorCode DMGetField(DM, PetscInt, PetscObject *);
230: PETSC_EXTERN PetscErrorCode DMSetField(DM, PetscInt, PetscObject);

232: /*MC
233:   DMInterpolationInfo - Structure for holding information about interpolation on a mesh

235:   Level: intermediate

237:   Synopsis:
238:     comm   - The communicator
239:     dim    - The spatial dimension of points
240:     nInput - The number of input points
241:     points - The input point coordinates
242:     cells  - The cell containing each point
243:     n      - The number of local points
244:     coords - The point coordinates
245:     dof    - The number of components to interpolate

247: .seealso: DMInterpolationCreate(), DMInterpolationEvaluate(), DMInterpolationAddPoints()
248: M*/
249: struct _DMInterpolationInfo {
250:   MPI_Comm   comm;
251:   PetscInt   dim;    /*1 The spatial dimension of points */
252:   PetscInt   nInput; /* The number of input points */
253:   PetscReal *points; /* The input point coordinates */
254:   PetscInt  *cells;  /* The cell containing each point */
255:   PetscInt   n;      /* The number of local points */
256:   Vec        coords; /* The point coordinates */
257:   PetscInt   dof;    /* The number of components to interpolate */
258: };
259: typedef struct _DMInterpolationInfo *DMInterpolationInfo;

261: PETSC_EXTERN PetscErrorCode DMInterpolationCreate(MPI_Comm, DMInterpolationInfo *);
262: PETSC_EXTERN PetscErrorCode DMInterpolationSetDim(DMInterpolationInfo, PetscInt);
263: PETSC_EXTERN PetscErrorCode DMInterpolationGetDim(DMInterpolationInfo, PetscInt *);
264: PETSC_EXTERN PetscErrorCode DMInterpolationSetDof(DMInterpolationInfo, PetscInt);
265: PETSC_EXTERN PetscErrorCode DMInterpolationGetDof(DMInterpolationInfo, PetscInt *);
266: PETSC_EXTERN PetscErrorCode DMInterpolationAddPoints(DMInterpolationInfo, PetscInt, PetscReal[]);
267: PETSC_EXTERN PetscErrorCode DMInterpolationSetUp(DMInterpolationInfo, DM, PetscBool);
268: PETSC_EXTERN PetscErrorCode DMInterpolationGetCoordinates(DMInterpolationInfo, Vec *);
269: PETSC_EXTERN PetscErrorCode DMInterpolationGetVector(DMInterpolationInfo, Vec *);
270: PETSC_EXTERN PetscErrorCode DMInterpolationRestoreVector(DMInterpolationInfo, Vec *);
271: PETSC_EXTERN PetscErrorCode DMInterpolationEvaluate(DMInterpolationInfo, DM, Vec, Vec);
272: PETSC_EXTERN PetscErrorCode DMInterpolationDestroy(DMInterpolationInfo *);

274: PETSC_EXTERN PetscErrorCode DMCreateLabel(DM, const char []);
275: PETSC_EXTERN PetscErrorCode DMGetLabelValue(DM, const char[], PetscInt, PetscInt *);
276: PETSC_EXTERN PetscErrorCode DMSetLabelValue(DM, const char[], PetscInt, PetscInt);
277: PETSC_EXTERN PetscErrorCode DMClearLabelValue(DM, const char[], PetscInt, PetscInt);
278: PETSC_EXTERN PetscErrorCode DMGetLabelSize(DM, const char[], PetscInt *);
279: PETSC_EXTERN PetscErrorCode DMGetLabelIdIS(DM, const char[], IS *);
280: PETSC_EXTERN PetscErrorCode DMGetStratumSize(DM, const char [], PetscInt, PetscInt *);
281: PETSC_EXTERN PetscErrorCode DMGetStratumIS(DM, const char [], PetscInt, IS *);
282: PETSC_EXTERN PetscErrorCode DMSetStratumIS(DM, const char [], PetscInt, IS);
283: PETSC_EXTERN PetscErrorCode DMClearLabelStratum(DM, const char[], PetscInt);
284: PETSC_EXTERN PetscErrorCode DMGetLabelOutput(DM, const char[], PetscBool *);
285: PETSC_EXTERN PetscErrorCode DMSetLabelOutput(DM, const char[], PetscBool);

287: PETSC_EXTERN PetscErrorCode DMGetNumLabels(DM, PetscInt *);
288: PETSC_EXTERN PetscErrorCode DMGetLabelName(DM, PetscInt, const char **);
289: PETSC_EXTERN PetscErrorCode DMHasLabel(DM, const char [], PetscBool *);
290: PETSC_EXTERN PetscErrorCode DMGetLabel(DM, const char *, DMLabel *);
291: PETSC_EXTERN PetscErrorCode DMGetLabelByNum(DM, PetscInt, DMLabel *);
292: PETSC_EXTERN PetscErrorCode DMAddLabel(DM, DMLabel);
293: PETSC_EXTERN PetscErrorCode DMRemoveLabel(DM, const char [], DMLabel *);
294: PETSC_EXTERN PetscErrorCode DMCopyLabels(DM, DM);

296: PETSC_EXTERN PetscErrorCode DMAddBoundary(DM, DMBoundaryConditionType, const char[], const char[], PetscInt, PetscInt, const PetscInt *, void (*)(void), PetscInt, const PetscInt *, void *);
297: PETSC_EXTERN PetscErrorCode DMGetNumBoundary(DM, PetscInt *);
298: PETSC_EXTERN PetscErrorCode DMGetBoundary(DM, PetscInt, DMBoundaryConditionType *, const char **, const char **, PetscInt *, PetscInt *, const PetscInt **, void (**)(void), PetscInt *, const PetscInt **, void **);
299: PETSC_EXTERN PetscErrorCode DMIsBoundaryPoint(DM, PetscInt, PetscBool *);
300: PETSC_EXTERN PetscErrorCode DMCopyBoundary(DM, DM);

302: PETSC_EXTERN PetscErrorCode DMProjectFunction(DM,PetscReal,PetscErrorCode(**)(PetscInt,PetscReal,const PetscReal[],PetscInt,PetscScalar *,void *),void**,InsertMode,Vec);
303: PETSC_EXTERN PetscErrorCode DMProjectFunctionLocal(DM,PetscReal,PetscErrorCode(**)(PetscInt,PetscReal,const PetscReal[],PetscInt,PetscScalar *,void *),void**,InsertMode,Vec);
304: PETSC_EXTERN PetscErrorCode DMProjectFunctionLabel(DM, PetscReal, DMLabel, PetscInt, const PetscInt[], PetscInt, const PetscInt[], PetscErrorCode (**)(PetscInt, PetscReal, const PetscReal [], PetscInt, PetscScalar *, void *), void **, InsertMode, Vec);
305: PETSC_EXTERN PetscErrorCode DMProjectFunctionLabelLocal(DM,PetscReal,DMLabel,PetscInt,const PetscInt[],PetscInt,const PetscInt[],PetscErrorCode(**)(PetscInt,PetscReal,const PetscReal[],PetscInt,PetscScalar *,void *),void **,InsertMode,Vec);
306: PETSC_EXTERN PetscErrorCode DMProjectFieldLocal(DM,PetscReal,Vec,void (**)(PetscInt,PetscInt,PetscInt,const PetscInt[],const PetscInt[],const PetscScalar[],const PetscScalar[],const PetscScalar[],const PetscInt[],const PetscInt[],const PetscScalar[],const PetscScalar[],const PetscScalar[],PetscReal,const PetscReal[],PetscInt,const PetscScalar[],PetscScalar[]),InsertMode,Vec);
307: PETSC_EXTERN PetscErrorCode DMProjectFieldLabelLocal(DM,PetscReal,DMLabel,PetscInt,const PetscInt[],PetscInt,const PetscInt[],Vec,void (**)(PetscInt,PetscInt,PetscInt,const PetscInt[],const PetscInt[],const PetscScalar[],const PetscScalar[],const PetscScalar[],const PetscInt[],const PetscInt[],const PetscScalar[],const PetscScalar[],const PetscScalar[],PetscReal,const PetscReal[],PetscInt,const PetscScalar[],PetscScalar[]),InsertMode,Vec);
308: PETSC_EXTERN PetscErrorCode DMComputeL2Diff(DM,PetscReal,PetscErrorCode(**)(PetscInt,PetscReal,const PetscReal[],PetscInt,PetscScalar *,void *),void **,Vec,PetscReal *);
309: PETSC_EXTERN PetscErrorCode DMComputeL2GradientDiff(DM, PetscReal, PetscErrorCode (**)(PetscInt, PetscReal, const PetscReal [], const PetscReal [], PetscInt, PetscScalar *, void *), void **, Vec, const PetscReal [], PetscReal *);
310: PETSC_EXTERN PetscErrorCode DMComputeL2FieldDiff(DM,PetscReal,PetscErrorCode(**)(PetscInt,PetscReal,const PetscReal[],PetscInt,PetscScalar *,void *),void **,Vec,PetscReal *);

312: PETSC_EXTERN PetscErrorCode DMGetNullSpaceConstructor(DM, PetscInt, PetscErrorCode (**)(DM, PetscInt, MatNullSpace *));
313: PETSC_EXTERN PetscErrorCode DMSetNullSpaceConstructor(DM, PetscInt, PetscErrorCode (*)(DM, PetscInt, MatNullSpace *));

315: PETSC_EXTERN PetscErrorCode DMGetCompatibility(DM,DM,PetscBool*,PetscBool*);
316: #endif