Actual source code: dmforestimpl.h
1: #pragma once
3: #include <petscmat.h>
4: #include <petscdmforest.h>
5: #include <petsc/private/dmimpl.h>
7: typedef struct {
8: PetscInt refct;
9: void *data;
10: PetscErrorCode (*clearadaptivityforest)(DM);
11: PetscErrorCode (*getadaptivitysuccess)(DM, PetscBool *);
12: PetscErrorCode (*transfervec)(DM, Vec, DM, Vec, PetscBool, PetscReal);
13: PetscErrorCode (*transfervecfrombase)(DM, Vec, Vec);
14: PetscErrorCode (*createcellchart)(DM, PetscInt *, PetscInt *);
15: PetscErrorCode (*createcellsf)(DM, PetscSF *);
16: PetscErrorCode (*destroy)(DM);
17: PetscErrorCode (*ftemplate)(DM, DM);
18: PetscBool computeAdaptSF;
19: PetscErrorCode (*mapcoordinates)(DM, PetscInt, PetscInt, const PetscReal[], PetscReal[], void *);
20: void *mapcoordinatesctx;
21: DMForestTopology topology;
22: DM base;
23: DM adapt;
24: DMAdaptFlag adaptPurpose;
25: PetscInt adjDim;
26: PetscInt overlap;
27: PetscInt minRefinement;
28: PetscInt maxRefinement;
29: PetscInt initRefinement;
30: PetscInt cStart;
31: PetscInt cEnd;
32: PetscSF cellSF;
33: PetscSF preCoarseToFine;
34: PetscSF coarseToPreFine;
35: DMLabel adaptLabel;
36: DMForestAdaptivityStrategy adaptStrategy;
37: PetscInt gradeFactor;
38: PetscReal *cellWeights;
39: PetscCopyMode cellWeightsCopyMode;
40: PetscReal weightsFactor;
41: PetscReal weightCapacity;
42: } DM_Forest;
44: PETSC_EXTERN PetscErrorCode DMCreate_Forest(DM);
45: PETSC_INTERN PetscErrorCode DMClone_Forest(DM, DM *);
46: PETSC_INTERN PetscErrorCode DMSetFromOptions_Forest(DM, PetscOptionItems);
47: PETSC_INTERN PetscErrorCode DMAdaptLabel_Forest(DM, Vec, DMLabel, DMLabel, DM *);