xref: /petsc/include/petscdmlabel.h (revision 1d04cbbefc3422143dc520c67b0078a7a21900d3)
126bd1501SBarry Smith #if !defined(PETSCDMLABEL_H)
226bd1501SBarry Smith #define PETSCDMLABEL_H
3c58f1c22SToby Isaac #include <petscis.h>
4c58f1c22SToby Isaac 
5c58f1c22SToby Isaac /*S
6c58f1c22SToby Isaac   DMLabel - Object which encapsulates a subset of the mesh from this DM
7c58f1c22SToby Isaac 
8c58f1c22SToby Isaac   Level: developer
9c58f1c22SToby Isaac 
10c58f1c22SToby Isaac .seealso:  DM, DMPlexCreate(), DMPlexCreateLabel()
11c58f1c22SToby Isaac S*/
12ed748876SSatish Balay typedef struct _p_DMLabel *DMLabel;
13d67d17b1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelCreate(MPI_Comm, const char [], DMLabel *);
14c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelView(DMLabel, PetscViewer);
15d67d17b1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelReset(DMLabel);
16c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelDestroy(DMLabel *);
175aa44df4SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetDefaultValue(DMLabel, PetscInt *);
185aa44df4SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelSetDefaultValue(DMLabel, PetscInt);
19c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelDuplicate(DMLabel, DMLabel *);
20c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetValue(DMLabel, PetscInt, PetscInt *);
21c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelSetValue(DMLabel, PetscInt, PetscInt);
22c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelClearValue(DMLabel, PetscInt, PetscInt);
23c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelAddStratum(DMLabel, PetscInt);
24b9907514SLisandro Dalcin PETSC_EXTERN PetscErrorCode DMLabelAddStrata(DMLabel, PetscInt, const PetscInt[]);
25b9907514SLisandro Dalcin PETSC_EXTERN PetscErrorCode DMLabelAddStrataIS(DMLabel, IS);
26c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelInsertIS(DMLabel, IS, PetscInt);
27c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetNumValues(DMLabel, PetscInt *);
28c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetStratumBounds(DMLabel, PetscInt, PetscInt *, PetscInt *);
29c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetValueIS(DMLabel, IS *);
30*1d04cbbeSVaclav Hapla PETSC_EXTERN PetscErrorCode DMLabelGetNonEmptyStratumValuesIS(DMLabel, IS *);
31d123abd9SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelGetValueIndex(DMLabel, PetscInt, PetscInt *);
32c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelStratumHasPoint(DMLabel, PetscInt, PetscInt, PetscBool *);
33fada774cSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelHasStratum(DMLabel, PetscInt, PetscBool *);
34c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetStratumSize(DMLabel, PetscInt, PetscInt *);
35c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetStratumIS(DMLabel, PetscInt, IS *);
364de306b1SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelSetStratumIS(DMLabel, PetscInt, IS);
37412e9a14SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelSetStratumBounds(DMLabel, PetscInt, PetscInt, PetscInt);
38c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelClearStratum(DMLabel, PetscInt);
39d123abd9SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelGetStratumPointIndex(DMLabel, PetscInt, PetscInt, PetscInt *);
40b9907514SLisandro Dalcin 
41c6a43d28SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelComputeIndex(DMLabel);
42c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelCreateIndex(DMLabel, PetscInt, PetscInt);
43c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelDestroyIndex(DMLabel);
44c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelHasValue(DMLabel, PetscInt, PetscBool *);
45c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelHasPoint(DMLabel, PetscInt, PetscBool *);
46c6a43d28SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelGetBounds(DMLabel, PetscInt *, PetscInt *);
47c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelFilter(DMLabel, PetscInt, PetscInt);
48c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelPermute(DMLabel, IS, DMLabel *);
49c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelDistribute(DMLabel, PetscSF, DMLabel *);
507937d9ceSMichael Lange PETSC_EXTERN PetscErrorCode DMLabelGather(DMLabel, PetscSF, DMLabel *);
51c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelConvertToSection(DMLabel, PetscSection *, IS *);
52c58f1c22SToby Isaac 
533dec45f3SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateGlobalSectionLabel(PetscSection, PetscSF, PetscBool, DMLabel, PetscInt, PetscSection *);
543dec45f3SMatthew G. Knepley 
555fdea053SToby Isaac #define PETSCSECTIONSYMLABEL "label"
565fdea053SToby Isaac PETSC_EXTERN PetscErrorCode PetscSectionSymCreateLabel(MPI_Comm,DMLabel,PetscSectionSym *);
575fdea053SToby Isaac PETSC_EXTERN PetscErrorCode PetscSectionSymLabelSetLabel(PetscSectionSym,DMLabel);
585fdea053SToby Isaac PETSC_EXTERN PetscErrorCode PetscSectionSymLabelSetStratum(PetscSectionSym,PetscInt,PetscInt,PetscInt,PetscInt,PetscCopyMode,const PetscInt **,const PetscScalar **);
595fdea053SToby Isaac 
60c58f1c22SToby Isaac #endif
61