xref: /petsc/include/petscdm.h (revision df0b854cade274ed9a7621633a20ef3035ae0f9f)
1e1589f56SBarry Smith /*
2e1589f56SBarry Smith       Objects to manage the interactions between the mesh data structures and the algebraic objects
3e1589f56SBarry Smith */
43c48a1e8SJed Brown #if !defined(__PETSCDM_H)
53c48a1e8SJed Brown #define __PETSCDM_H
62c8e378dSBarry Smith #include <petscmat.h>
71e25c274SJed Brown #include <petscdmtypes.h>
8decb47aaSMatthew G. Knepley #include <petscfetypes.h>
92764a2aaSMatthew G. Knepley #include <petscdstypes.h>
10c58f1c22SToby Isaac #include <petscdmlabel.h>
11e1589f56SBarry Smith 
12607a6623SBarry Smith PETSC_EXTERN PetscErrorCode DMInitializePackage(void);
13e1589f56SBarry Smith 
14014dd563SJed Brown PETSC_EXTERN PetscClassId DM_CLASSID;
15e1589f56SBarry Smith 
1676bdecfbSBarry Smith /*J
178f6c3df8SBarry Smith     DMType - String with the name of a PETSc DM
18e1589f56SBarry Smith 
19e1589f56SBarry Smith    Level: beginner
20e1589f56SBarry Smith 
21e1589f56SBarry Smith .seealso: DMSetType(), DM
2276bdecfbSBarry Smith J*/
2319fd82e9SBarry Smith typedef const char* DMType;
24e1589f56SBarry Smith #define DMDA        "da"
25e1589f56SBarry Smith #define DMCOMPOSITE "composite"
26e1589f56SBarry Smith #define DMSLICED    "sliced"
27fe1899a2SJed Brown #define DMSHELL     "shell"
28ab7f58a0SBarry Smith #define DMPLEX      "plex"
29b30b9b2eSMatthew G Knepley #define DMCARTESIAN "cartesian"
308ac4e037SJed Brown #define DMREDUNDANT "redundant"
313a19ef87SMatthew G Knepley #define DMPATCH     "patch"
321d72bce8STim Tautges #define DMMOAB      "moab"
335f2c45f1SShri Abhyankar #define DMNETWORK   "network"
34ef51cf95SToby Isaac #define DMFOREST    "forest"
35db4d5e8cSToby Isaac #define DMP4EST     "p4est"
36db4d5e8cSToby Isaac #define DMP8EST     "p8est"
37e1589f56SBarry Smith 
38bff4a2f0SMatthew G. Knepley PETSC_EXTERN const char *const DMBoundaryTypes[];
39140e18c1SBarry Smith PETSC_EXTERN PetscFunctionList DMList;
40014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMCreate(MPI_Comm,DM*);
4138221697SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMClone(DM,DM*);
4219fd82e9SBarry Smith PETSC_EXTERN PetscErrorCode DMSetType(DM, DMType);
4319fd82e9SBarry Smith PETSC_EXTERN PetscErrorCode DMGetType(DM, DMType *);
44bdf89e91SBarry Smith PETSC_EXTERN PetscErrorCode DMRegister(const char[],PetscErrorCode (*)(DM));
45014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMRegisterDestroy(void);
46e1589f56SBarry Smith 
47014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMView(DM,PetscViewer);
48014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMLoad(DM,PetscViewer);
49014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMDestroy(DM*);
50014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMCreateGlobalVector(DM,Vec*);
51014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMCreateLocalVector(DM,Vec*);
52014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMGetLocalVector(DM,Vec *);
53014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMRestoreLocalVector(DM,Vec *);
54014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMGetGlobalVector(DM,Vec *);
55014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMRestoreGlobalVector(DM,Vec *);
56014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMClearGlobalVectors(DM);
5750eeb1caSToby Isaac PETSC_EXTERN PetscErrorCode DMClearLocalVectors(DM);
58e77ac854SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMHasNamedGlobalVector(DM,const char*,PetscBool*);
59014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMGetNamedGlobalVector(DM,const char*,Vec*);
60014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMRestoreNamedGlobalVector(DM,const char*,Vec*);
61e77ac854SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMHasNamedLocalVector(DM,const char*,PetscBool*);
622348bcf4SPeter Brune PETSC_EXTERN PetscErrorCode DMGetNamedLocalVector(DM,const char*,Vec*);
632348bcf4SPeter Brune PETSC_EXTERN PetscErrorCode DMRestoreNamedLocalVector(DM,const char*,Vec*);
64014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMGetLocalToGlobalMapping(DM,ISLocalToGlobalMapping*);
65014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMCreateFieldIS(DM,PetscInt*,char***,IS**);
66014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMGetBlockSize(DM,PetscInt*);
67b412c318SBarry Smith PETSC_EXTERN PetscErrorCode DMCreateColoring(DM,ISColoringType,ISColoring*);
68b412c318SBarry Smith PETSC_EXTERN PetscErrorCode DMCreateMatrix(DM,Mat*);
69014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMSetMatrixPreallocateOnly(DM,PetscBool);
70014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMCreateInterpolation(DM,DM,Mat*,Vec*);
713ad4599aSBarry Smith PETSC_EXTERN PetscErrorCode DMCreateRestriction(DM,DM,Mat*);
726dbf9973SLawrence Mitchell PETSC_EXTERN PetscErrorCode DMCreateInjection(DM,DM,Mat*);
73aa1993deSMatthew G Knepley PETSC_EXTERN PetscErrorCode DMGetWorkArray(DM,PetscInt,PetscDataType,void*);
74aa1993deSMatthew G Knepley PETSC_EXTERN PetscErrorCode DMRestoreWorkArray(DM,PetscInt,PetscDataType,void*);
75014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMRefine(DM,MPI_Comm,DM*);
76014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMCoarsen(DM,MPI_Comm,DM*);
77*df0b854cSToby Isaac PETSC_EXTERN PetscErrorCode DMAdaptLabel(DM,const char[],DM*);
78a8fb8f29SToby Isaac PETSC_EXTERN PetscErrorCode DMGetCoarseDM(DM,DM*);
79a8fb8f29SToby Isaac PETSC_EXTERN PetscErrorCode DMSetCoarseDM(DM,DM);
8088bdff64SToby Isaac PETSC_EXTERN PetscErrorCode DMGetFineDM(DM,DM*);
8188bdff64SToby Isaac PETSC_EXTERN PetscErrorCode DMSetFineDM(DM,DM);
82014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMRefineHierarchy(DM,PetscInt,DM[]);
83014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMCoarsenHierarchy(DM,PetscInt,DM[]);
84014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMCoarsenHookAdd(DM,PetscErrorCode (*)(DM,DM,void*),PetscErrorCode (*)(DM,Mat,Vec,Mat,DM,void*),void*);
85014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMRefineHookAdd(DM,PetscErrorCode (*)(DM,DM,void*),PetscErrorCode (*)(DM,Mat,DM,void*),void*);
86014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMRestrict(DM,Mat,Vec,Mat,DM);
87014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMInterpolate(DM,Mat,DM);
88014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMSetFromOptions(DM);
89685405a1SBarry Smith PETSC_STATIC_INLINE PetscErrorCode DMViewFromOptions(DM A,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)A,obj,name);}
90ca266f36SBarry Smith 
91*df0b854cSToby Isaac typedef enum {DM_ADAPT_KEEP = 0, DM_ADAPT_REFINE, DM_ADAPT_COARSEN, DM_ADAPT_RESERVED_COUNT} DMAdaptFlag;
92*df0b854cSToby Isaac PETSC_EXTERN PetscErrorCode DMAdaptLabel(DM,const char[],DM*);
93*df0b854cSToby Isaac 
94014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMSetUp(DM);
95014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMCreateInterpolationScale(DM,DM,Mat,Vec*);
96014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMCreateAggregates(DM,DM,Mat*);
97baf369e7SPeter Brune PETSC_EXTERN PetscErrorCode DMGlobalToLocalHookAdd(DM,PetscErrorCode (*)(DM,Vec,InsertMode,Vec,void*),PetscErrorCode (*)(DM,Vec,InsertMode,Vec,void*),void*);
98d4d07f1eSToby Isaac PETSC_EXTERN PetscErrorCode DMLocalToGlobalHookAdd(DM,PetscErrorCode (*)(DM,Vec,InsertMode,Vec,void*),PetscErrorCode (*)(DM,Vec,InsertMode,Vec,void*),void*);
99014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMGlobalToLocalBegin(DM,Vec,InsertMode,Vec);
100014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMGlobalToLocalEnd(DM,Vec,InsertMode,Vec);
101014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMLocalToGlobalBegin(DM,Vec,InsertMode,Vec);
102014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMLocalToGlobalEnd(DM,Vec,InsertMode,Vec);
103d78e899eSRichard Tran Mills PETSC_EXTERN PetscErrorCode DMLocalToLocalBegin(DM,Vec,InsertMode,Vec);
104d78e899eSRichard Tran Mills PETSC_EXTERN PetscErrorCode DMLocalToLocalEnd(DM,Vec,InsertMode,Vec);
10519fd82e9SBarry Smith PETSC_EXTERN PetscErrorCode DMConvert(DM,DMType,DM*);
106e1589f56SBarry Smith 
107c73cfb54SMatthew G. Knepley /* Topology support */
108c73cfb54SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMGetDimension(DM,PetscInt*);
109c73cfb54SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMSetDimension(DM,PetscInt);
110793f3fe5SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMGetDimPoints(DM,PetscInt,PetscInt*,PetscInt*);
1118e4ac7eaSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMGetUseNatural(DM,PetscBool*);
1128e4ac7eaSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMSetUseNatural(DM,PetscBool);
11346e270d4SMatthew G. Knepley 
11446e270d4SMatthew G. Knepley /* Coordinate support */
1156636e97aSMatthew G Knepley PETSC_EXTERN PetscErrorCode DMGetCoordinateDM(DM,DM*);
1161cfe2091SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMSetCoordinateDM(DM,DM);
11746e270d4SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMGetCoordinateDim(DM,PetscInt*);
11846e270d4SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMSetCoordinateDim(DM,PetscInt);
119e8abe2deSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMGetCoordinateSection(DM,PetscSection*);
12046e270d4SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMSetCoordinateSection(DM,PetscInt,PetscSection);
1216636e97aSMatthew G Knepley PETSC_EXTERN PetscErrorCode DMGetCoordinates(DM,Vec*);
1226636e97aSMatthew G Knepley PETSC_EXTERN PetscErrorCode DMSetCoordinates(DM,Vec);
1236636e97aSMatthew G Knepley PETSC_EXTERN PetscErrorCode DMGetCoordinatesLocal(DM,Vec*);
1246636e97aSMatthew G Knepley PETSC_EXTERN PetscErrorCode DMSetCoordinatesLocal(DM,Vec);
12562a38674SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLocatePoints(DM,Vec,DMPointLocationType,PetscSF*);
1265dc8c3f7SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMGetPeriodicity(DM,const PetscReal**,const PetscReal**,const DMBoundaryType**);
1275dc8c3f7SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMSetPeriodicity(DM,const PetscReal[],const PetscReal[],const DMBoundaryType[]);
1282e17dfb7SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLocalizeCoordinate(DM, const PetscScalar[], PetscScalar[]);
1292e17dfb7SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLocalizeCoordinates(DM);
13036447a5eSToby Isaac PETSC_EXTERN PetscErrorCode DMGetCoordinatesLocalized(DM,PetscBool*);
1316636e97aSMatthew G Knepley 
1325dbd56e3SPeter Brune /* block hook interface */
133be081cd6SPeter Brune PETSC_EXTERN PetscErrorCode DMSubDomainHookAdd(DM,PetscErrorCode (*)(DM,DM,void*),PetscErrorCode (*)(DM,VecScatter,VecScatter,DM,void*),void*);
134be081cd6SPeter Brune PETSC_EXTERN PetscErrorCode DMSubDomainRestrict(DM,VecScatter,VecScatter,DM);
1355dbd56e3SPeter Brune 
136014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMSetOptionsPrefix(DM,const char []);
13731697293SDave May PETSC_EXTERN PetscErrorCode DMAppendOptionsPrefix(DM,const char []);
13831697293SDave May PETSC_EXTERN PetscErrorCode DMGetOptionsPrefix(DM,const char*[]);
13919fd82e9SBarry Smith PETSC_EXTERN PetscErrorCode DMSetVecType(DM,VecType);
140c0dedaeaSBarry Smith PETSC_EXTERN PetscErrorCode DMGetVecType(DM,VecType*);
14119fd82e9SBarry Smith PETSC_EXTERN PetscErrorCode DMSetMatType(DM,MatType);
142c0dedaeaSBarry Smith PETSC_EXTERN PetscErrorCode DMGetMatType(DM,MatType*);
143014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMSetApplicationContext(DM,void*);
144014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMSetApplicationContextDestroy(DM,PetscErrorCode (*)(void**));
145014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMGetApplicationContext(DM,void*);
146014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMSetVariableBounds(DM,PetscErrorCode (*)(DM,Vec,Vec));
147014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMHasVariableBounds(DM,PetscBool *);
148b0ae01b7SPeter Brune PETSC_EXTERN PetscErrorCode DMHasColoring(DM,PetscBool *);
1493ad4599aSBarry Smith PETSC_EXTERN PetscErrorCode DMHasCreateRestriction(DM,PetscBool *);
150014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMComputeVariableBounds(DM,Vec,Vec);
15193d92d96SBarry Smith 
15281d26defSMatthew G Knepley PETSC_EXTERN PetscErrorCode DMCreateSubDM(DM, PetscInt, PetscInt[], IS *, DM *);
15316621825SDmitry Karpeev PETSC_EXTERN PetscErrorCode DMCreateFieldDecomposition(DM,PetscInt*,char***,IS**,DM**);
1548d4ac253SDmitry Karpeev PETSC_EXTERN PetscErrorCode DMCreateDomainDecomposition(DM,PetscInt*,char***,IS**,IS**,DM**);
155e30e807fSPeter Brune PETSC_EXTERN PetscErrorCode DMCreateDomainDecompositionScatters(DM,PetscInt,DM*,VecScatter**,VecScatter**,VecScatter**);
156e7c4fc90SDmitry Karpeev 
157014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMGetRefineLevel(DM,PetscInt*);
158fef3a512SBarry Smith PETSC_EXTERN PetscErrorCode DMSetRefineLevel(DM,PetscInt);
159014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMGetCoarsenLevel(DM,PetscInt*);
160014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMFinalizePackage(void);
161e1589f56SBarry Smith 
1625f1ad066SMatthew G Knepley PETSC_EXTERN PetscErrorCode VecGetDM(Vec, DM*);
1635f1ad066SMatthew G Knepley PETSC_EXTERN PetscErrorCode VecSetDM(Vec, DM);
164c688c046SMatthew G Knepley PETSC_EXTERN PetscErrorCode MatGetDM(Mat, DM*);
165c688c046SMatthew G Knepley PETSC_EXTERN PetscErrorCode MatSetDM(Mat, DM);
1665f1ad066SMatthew G Knepley 
167e1589f56SBarry Smith typedef struct NLF_DAAD* NLF;
168e1589f56SBarry Smith 
169bc2bf880SBarry Smith #define DM_FILE_CLASSID 1211221
1707da65231SMatthew G Knepley 
1717da65231SMatthew G Knepley /* FEM support */
172014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMPrintCellVector(PetscInt, const char [], PetscInt, const PetscScalar []);
173014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMPrintCellMatrix(PetscInt, const char [], PetscInt, PetscInt, const PetscScalar []);
1746113b454SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPrintLocalVec(DM, const char [], PetscReal, Vec);
1757da65231SMatthew G Knepley 
176014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMGetDefaultSection(DM, PetscSection *);
177014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMSetDefaultSection(DM, PetscSection);
1789435951eSToby Isaac PETSC_EXTERN PetscErrorCode DMGetDefaultConstraints(DM, PetscSection *, Mat *);
1799435951eSToby Isaac PETSC_EXTERN PetscErrorCode DMSetDefaultConstraints(DM, PetscSection, Mat);
180014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMGetDefaultGlobalSection(DM, PetscSection *);
181eaf8d80aSMatthew G Knepley PETSC_EXTERN PetscErrorCode DMSetDefaultGlobalSection(DM, PetscSection);
182014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMGetDefaultSF(DM, PetscSF *);
183014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMSetDefaultSF(DM, PetscSF);
184014dd563SJed Brown PETSC_EXTERN PetscErrorCode DMCreateDefaultSF(DM, PetscSection, PetscSection);
185b21d0597SMatthew G Knepley PETSC_EXTERN PetscErrorCode DMGetPointSF(DM, PetscSF *);
186057b4bcdSMatthew G Knepley PETSC_EXTERN PetscErrorCode DMSetPointSF(DM, PetscSF);
18788ed4aceSMatthew G Knepley 
18814f150ffSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMGetOutputDM(DM, DM *);
189cdb7a50dSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMGetOutputSequenceNumber(DM, PetscInt *, PetscReal *);
190cdb7a50dSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMSetOutputSequenceNumber(DM, PetscInt, PetscReal);
191cdb7a50dSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMOutputSequenceLoad(DM, PetscViewer, const char *, PetscInt, PetscReal *);
19214f150ffSMatthew G. Knepley 
1932764a2aaSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMGetDS(DM, PetscDS *);
1942764a2aaSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMSetDS(DM, PetscDS);
195af122d2aSMatthew G Knepley PETSC_EXTERN PetscErrorCode DMGetNumFields(DM, PetscInt *);
196af122d2aSMatthew G Knepley PETSC_EXTERN PetscErrorCode DMSetNumFields(DM, PetscInt);
197af122d2aSMatthew G Knepley PETSC_EXTERN PetscErrorCode DMGetField(DM, PetscInt, PetscObject *);
198decb47aaSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMSetField(DM, PetscInt, PetscObject);
199af122d2aSMatthew G Knepley 
20083e5549fSMatthew G Knepley typedef enum {PETSC_UNIT_LENGTH, PETSC_UNIT_MASS, PETSC_UNIT_TIME, PETSC_UNIT_CURRENT, PETSC_UNIT_TEMPERATURE, PETSC_UNIT_AMOUNT, PETSC_UNIT_LUMINOSITY, NUM_PETSC_UNITS} PetscUnit;
201e87bb0d3SMatthew G Knepley 
202e87bb0d3SMatthew G Knepley struct _DMInterpolationInfo {
203e87bb0d3SMatthew G Knepley   MPI_Comm   comm;
204e87bb0d3SMatthew G Knepley   PetscInt   dim;    /*1 The spatial dimension of points */
205e87bb0d3SMatthew G Knepley   PetscInt   nInput; /* The number of input points */
206e87bb0d3SMatthew G Knepley   PetscReal *points; /* The input point coordinates */
207e87bb0d3SMatthew G Knepley   PetscInt  *cells;  /* The cell containing each point */
208e87bb0d3SMatthew G Knepley   PetscInt   n;      /* The number of local points */
209e87bb0d3SMatthew G Knepley   Vec        coords; /* The point coordinates */
210e87bb0d3SMatthew G Knepley   PetscInt   dof;    /* The number of components to interpolate */
211e87bb0d3SMatthew G Knepley };
212e87bb0d3SMatthew G Knepley typedef struct _DMInterpolationInfo *DMInterpolationInfo;
213e87bb0d3SMatthew G Knepley 
21494b4b8a8SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMInterpolationCreate(MPI_Comm, DMInterpolationInfo *);
21594b4b8a8SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMInterpolationSetDim(DMInterpolationInfo, PetscInt);
21694b4b8a8SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMInterpolationGetDim(DMInterpolationInfo, PetscInt *);
21794b4b8a8SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMInterpolationSetDof(DMInterpolationInfo, PetscInt);
21894b4b8a8SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMInterpolationGetDof(DMInterpolationInfo, PetscInt *);
21994b4b8a8SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMInterpolationAddPoints(DMInterpolationInfo, PetscInt, PetscReal[]);
22094b4b8a8SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMInterpolationSetUp(DMInterpolationInfo, DM, PetscBool);
22194b4b8a8SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMInterpolationGetCoordinates(DMInterpolationInfo, Vec *);
22294b4b8a8SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMInterpolationGetVector(DMInterpolationInfo, Vec *);
22394b4b8a8SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMInterpolationRestoreVector(DMInterpolationInfo, Vec *);
22494b4b8a8SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMInterpolationEvaluate(DMInterpolationInfo, DM, Vec, Vec);
22594b4b8a8SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMInterpolationDestroy(DMInterpolationInfo *);
226c58f1c22SToby Isaac 
227c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMCreateLabel(DM, const char []);
228c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMGetLabelValue(DM, const char[], PetscInt, PetscInt *);
229c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMSetLabelValue(DM, const char[], PetscInt, PetscInt);
230c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMClearLabelValue(DM, const char[], PetscInt, PetscInt);
231c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMGetLabelSize(DM, const char[], PetscInt *);
232c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMGetLabelIdIS(DM, const char[], IS *);
233c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMGetStratumSize(DM, const char [], PetscInt, PetscInt *);
234c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMGetStratumIS(DM, const char [], PetscInt, IS *);
2354de306b1SToby Isaac PETSC_EXTERN PetscErrorCode DMSetStratumIS(DM, const char [], PetscInt, IS);
236c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMClearLabelStratum(DM, const char[], PetscInt);
237c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMGetLabelOutput(DM, const char[], PetscBool *);
238c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMSetLabelOutput(DM, const char[], PetscBool);
239c58f1c22SToby Isaac 
240c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMGetNumLabels(DM, PetscInt *);
241c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMGetLabelName(DM, PetscInt, const char **);
242c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMHasLabel(DM, const char [], PetscBool *);
243c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMGetLabel(DM, const char *, DMLabel *);
244c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMGetLabelByNum(DM, PetscInt, DMLabel *);
245c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMAddLabel(DM, DMLabel);
246c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMRemoveLabel(DM, const char [], DMLabel *);
247c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMCopyLabels(DM, DM);
248c58f1c22SToby Isaac 
249a6ba4734SToby Isaac PETSC_EXTERN PetscErrorCode DMAddBoundary(DM, PetscBool, const char[], const char[], PetscInt, PetscInt, const PetscInt *, void (*)(), PetscInt, const PetscInt *, void *);
250a6ba4734SToby Isaac PETSC_EXTERN PetscErrorCode DMGetNumBoundary(DM, PetscInt *);
251a6ba4734SToby Isaac PETSC_EXTERN PetscErrorCode DMGetBoundary(DM, PetscInt, PetscBool *, const char **, const char **, PetscInt *, PetscInt *, const PetscInt **, void (**)(), PetscInt *, const PetscInt **, void **);
252a6ba4734SToby Isaac PETSC_EXTERN PetscErrorCode DMIsBoundaryPoint(DM, PetscInt, PetscBool *);
253a6ba4734SToby Isaac PETSC_EXTERN PetscErrorCode DMCopyBoundary(DM, DM);
2544d6f44ffSToby Isaac 
2550709b2feSToby Isaac PETSC_EXTERN PetscErrorCode DMProjectFunction(DM,PetscReal,PetscErrorCode(**)(PetscInt,PetscReal,const PetscReal[],PetscInt,PetscScalar *,void *),void**,InsertMode,Vec);
2560709b2feSToby Isaac PETSC_EXTERN PetscErrorCode DMProjectFunctionLocal(DM,PetscReal,PetscErrorCode(**)(PetscInt,PetscReal,const PetscReal[],PetscInt,PetscScalar *,void *),void**,InsertMode,Vec);
2570709b2feSToby Isaac PETSC_EXTERN PetscErrorCode DMProjectFunctionLabelLocal(DM,PetscReal,DMLabel,PetscInt,const PetscInt[],PetscErrorCode(**)(PetscInt,PetscReal,const PetscReal[],PetscInt,PetscScalar *,void *),void **,InsertMode,Vec);
258bfc4295aSToby Isaac PETSC_EXTERN PetscErrorCode DMProjectFieldLocal(DM,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[],PetscScalar[]),InsertMode,Vec);
2590709b2feSToby Isaac PETSC_EXTERN PetscErrorCode DMComputeL2Diff(DM,PetscReal,PetscErrorCode(**)(PetscInt,PetscReal,const PetscReal[],PetscInt,PetscScalar *,void *),void **,Vec,PetscReal *);
260b698f381SToby Isaac PETSC_EXTERN PetscErrorCode DMComputeL2GradientDiff(DM, PetscReal, PetscErrorCode (**)(PetscInt, PetscReal, const PetscReal [], const PetscReal [], PetscInt, PetscScalar *, void *), void **, Vec, const PetscReal [], PetscReal *);
2611189c1efSToby Isaac PETSC_EXTERN PetscErrorCode DMComputeL2FieldDiff(DM,PetscReal,PetscErrorCode(**)(PetscInt,PetscReal,const PetscReal[],PetscInt,PetscScalar *,void *),void **,Vec,PetscReal *);
262e1589f56SBarry Smith #endif
263