Actual source code: petscdmlabel.h
1: #if !defined(PETSCDMLABEL_H)
2: #define PETSCDMLABEL_H
3: #include <petscis.h>
5: /*S
6: DMLabel - Object which encapsulates a subset of the mesh from this DM
8: Level: developer
10: .seealso: DM, DMPlexCreate(), DMPlexCreateLabel()
11: S*/
12: typedef struct _p_DMLabel *DMLabel;
13: PETSC_EXTERN PetscErrorCode DMLabelCreate(MPI_Comm, const char [], DMLabel *);
14: PETSC_EXTERN PetscErrorCode DMLabelView(DMLabel, PetscViewer);
15: PETSC_EXTERN PetscErrorCode DMLabelReset(DMLabel);
16: PETSC_EXTERN PetscErrorCode DMLabelDestroy(DMLabel *);
17: PETSC_EXTERN PetscErrorCode DMLabelGetDefaultValue(DMLabel, PetscInt *);
18: PETSC_EXTERN PetscErrorCode DMLabelSetDefaultValue(DMLabel, PetscInt);
19: PETSC_EXTERN PetscErrorCode DMLabelDuplicate(DMLabel, DMLabel *);
20: PETSC_EXTERN PetscErrorCode DMLabelCompare(MPI_Comm, DMLabel, DMLabel, PetscBool *, char **message);
21: PETSC_EXTERN PetscErrorCode DMLabelGetValue(DMLabel, PetscInt, PetscInt *);
22: PETSC_EXTERN PetscErrorCode DMLabelSetValue(DMLabel, PetscInt, PetscInt);
23: PETSC_EXTERN PetscErrorCode DMLabelClearValue(DMLabel, PetscInt, PetscInt);
24: PETSC_EXTERN PetscErrorCode DMLabelAddStratum(DMLabel, PetscInt);
25: PETSC_EXTERN PetscErrorCode DMLabelAddStrata(DMLabel, PetscInt, const PetscInt[]);
26: PETSC_EXTERN PetscErrorCode DMLabelAddStrataIS(DMLabel, IS);
27: PETSC_EXTERN PetscErrorCode DMLabelInsertIS(DMLabel, IS, PetscInt);
28: PETSC_EXTERN PetscErrorCode DMLabelGetNumValues(DMLabel, PetscInt *);
29: PETSC_EXTERN PetscErrorCode DMLabelGetStratumBounds(DMLabel, PetscInt, PetscInt *, PetscInt *);
30: PETSC_EXTERN PetscErrorCode DMLabelGetValueIS(DMLabel, IS *);
31: PETSC_EXTERN PetscErrorCode DMLabelGetNonEmptyStratumValuesIS(DMLabel, IS *);
32: PETSC_EXTERN PetscErrorCode DMLabelGetValueIndex(DMLabel, PetscInt, PetscInt *);
33: PETSC_EXTERN PetscErrorCode DMLabelStratumHasPoint(DMLabel, PetscInt, PetscInt, PetscBool *);
34: PETSC_EXTERN PetscErrorCode DMLabelHasStratum(DMLabel, PetscInt, PetscBool *);
35: PETSC_EXTERN PetscErrorCode DMLabelGetStratumSize(DMLabel, PetscInt, PetscInt *);
36: PETSC_EXTERN PetscErrorCode DMLabelGetStratumIS(DMLabel, PetscInt, IS *);
37: PETSC_EXTERN PetscErrorCode DMLabelSetStratumIS(DMLabel, PetscInt, IS);
38: PETSC_EXTERN PetscErrorCode DMLabelSetStratumBounds(DMLabel, PetscInt, PetscInt, PetscInt);
39: PETSC_EXTERN PetscErrorCode DMLabelClearStratum(DMLabel, PetscInt);
40: PETSC_EXTERN PetscErrorCode DMLabelGetStratumPointIndex(DMLabel, PetscInt, PetscInt, PetscInt *);
42: PETSC_EXTERN PetscErrorCode DMLabelComputeIndex(DMLabel);
43: PETSC_EXTERN PetscErrorCode DMLabelCreateIndex(DMLabel, PetscInt, PetscInt);
44: PETSC_EXTERN PetscErrorCode DMLabelDestroyIndex(DMLabel);
45: PETSC_EXTERN PetscErrorCode DMLabelHasValue(DMLabel, PetscInt, PetscBool *);
46: PETSC_EXTERN PetscErrorCode DMLabelHasPoint(DMLabel, PetscInt, PetscBool *);
47: PETSC_EXTERN PetscErrorCode DMLabelGetBounds(DMLabel, PetscInt *, PetscInt *);
48: PETSC_EXTERN PetscErrorCode DMLabelFilter(DMLabel, PetscInt, PetscInt);
49: PETSC_EXTERN PetscErrorCode DMLabelPermute(DMLabel, IS, DMLabel *);
50: PETSC_EXTERN PetscErrorCode DMLabelDistribute(DMLabel, PetscSF, DMLabel *);
51: PETSC_EXTERN PetscErrorCode DMLabelGather(DMLabel, PetscSF, DMLabel *);
52: PETSC_EXTERN PetscErrorCode DMLabelConvertToSection(DMLabel, PetscSection *, IS *);
54: PETSC_EXTERN PetscErrorCode PetscSectionCreateGlobalSectionLabel(PetscSection, PetscSF, PetscBool, DMLabel, PetscInt, PetscSection *);
56: #define PETSCSECTIONSYMLABEL "label"
57: PETSC_EXTERN PetscErrorCode PetscSectionSymCreateLabel(MPI_Comm,DMLabel,PetscSectionSym *);
58: PETSC_EXTERN PetscErrorCode PetscSectionSymLabelSetLabel(PetscSectionSym,DMLabel);
59: PETSC_EXTERN PetscErrorCode PetscSectionSymLabelGetStratum(PetscSectionSym, PetscInt, PetscInt*, PetscInt*, PetscInt*, const PetscInt ***, const PetscScalar ***);
60: PETSC_EXTERN PetscErrorCode PetscSectionSymLabelSetStratum(PetscSectionSym, PetscInt, PetscInt, PetscInt, PetscInt, PetscCopyMode, const PetscInt **, const PetscScalar **);
62: #endif