xref: /petsc/include/petscdmlabel.h (revision 26bd150190f26c623f12d3ed48c77abbffd51c93)
1*26bd1501SBarry Smith #if !defined(PETSCDMLABEL_H)
2*26bd1501SBarry 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   Concepts: grids, grid refinement
11c58f1c22SToby Isaac 
12c58f1c22SToby Isaac .seealso:  DM, DMPlexCreate(), DMPlexCreateLabel()
13c58f1c22SToby Isaac S*/
14ed748876SSatish Balay typedef struct _p_DMLabel *DMLabel;
15d67d17b1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelCreate(MPI_Comm, const char [], DMLabel *);
16c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelView(DMLabel, PetscViewer);
17d67d17b1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelReset(DMLabel);
18c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelDestroy(DMLabel *);
195aa44df4SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetDefaultValue(DMLabel, PetscInt *);
205aa44df4SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelSetDefaultValue(DMLabel, PetscInt);
21c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelDuplicate(DMLabel, DMLabel *);
22c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetValue(DMLabel, PetscInt, PetscInt *);
23c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelSetValue(DMLabel, PetscInt, PetscInt);
24c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelClearValue(DMLabel, PetscInt, PetscInt);
25c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelAddStratum(DMLabel, PetscInt);
26b9907514SLisandro Dalcin PETSC_EXTERN PetscErrorCode DMLabelAddStrata(DMLabel, PetscInt, const PetscInt[]);
27b9907514SLisandro Dalcin PETSC_EXTERN PetscErrorCode DMLabelAddStrataIS(DMLabel, IS);
28c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelInsertIS(DMLabel, IS, PetscInt);
29c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetNumValues(DMLabel, PetscInt *);
30c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetStratumBounds(DMLabel, PetscInt, PetscInt *, PetscInt *);
31c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetValueIS(DMLabel, IS *);
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);
37c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelClearStratum(DMLabel, PetscInt);
38b9907514SLisandro Dalcin 
39c6a43d28SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelComputeIndex(DMLabel);
40c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelCreateIndex(DMLabel, PetscInt, PetscInt);
41c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelDestroyIndex(DMLabel);
42c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelHasValue(DMLabel, PetscInt, PetscBool *);
43c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelHasPoint(DMLabel, PetscInt, PetscBool *);
44c6a43d28SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelGetBounds(DMLabel, PetscInt *, PetscInt *);
45c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelFilter(DMLabel, PetscInt, PetscInt);
46c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelPermute(DMLabel, IS, DMLabel *);
47c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelDistribute(DMLabel, PetscSF, DMLabel *);
487937d9ceSMichael Lange PETSC_EXTERN PetscErrorCode DMLabelGather(DMLabel, PetscSF, DMLabel *);
49c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelConvertToSection(DMLabel, PetscSection *, IS *);
50c58f1c22SToby Isaac 
513dec45f3SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateGlobalSectionLabel(PetscSection, PetscSF, PetscBool, DMLabel, PetscInt, PetscSection *);
523dec45f3SMatthew G. Knepley 
535fdea053SToby Isaac #define PETSCSECTIONSYMLABEL "label"
545fdea053SToby Isaac PETSC_EXTERN PetscErrorCode PetscSectionSymCreateLabel(MPI_Comm,DMLabel,PetscSectionSym *);
555fdea053SToby Isaac PETSC_EXTERN PetscErrorCode PetscSectionSymLabelSetLabel(PetscSectionSym,DMLabel);
565fdea053SToby Isaac PETSC_EXTERN PetscErrorCode PetscSectionSymLabelSetStratum(PetscSectionSym,PetscInt,PetscInt,PetscInt,PetscInt,PetscCopyMode,const PetscInt **,const PetscScalar **);
575fdea053SToby Isaac 
58c58f1c22SToby Isaac #endif
59