xref: /petsc/include/petscdmlabel.h (revision 412e9a14abbdcfab8bb1cbfb40875fcde8c4ce26)
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 *);
30c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelStratumHasPoint(DMLabel, PetscInt, PetscInt, PetscBool *);
31fada774cSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelHasStratum(DMLabel, PetscInt, PetscBool *);
32c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetStratumSize(DMLabel, PetscInt, PetscInt *);
33c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetStratumIS(DMLabel, PetscInt, IS *);
344de306b1SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelSetStratumIS(DMLabel, PetscInt, IS);
35*412e9a14SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelSetStratumBounds(DMLabel, PetscInt, PetscInt, PetscInt);
36c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelClearStratum(DMLabel, PetscInt);
37b9907514SLisandro Dalcin 
38c6a43d28SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelComputeIndex(DMLabel);
39c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelCreateIndex(DMLabel, PetscInt, PetscInt);
40c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelDestroyIndex(DMLabel);
41c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelHasValue(DMLabel, PetscInt, PetscBool *);
42c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelHasPoint(DMLabel, PetscInt, PetscBool *);
43c6a43d28SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelGetBounds(DMLabel, PetscInt *, PetscInt *);
44c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelFilter(DMLabel, PetscInt, PetscInt);
45c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelPermute(DMLabel, IS, DMLabel *);
46c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelDistribute(DMLabel, PetscSF, DMLabel *);
477937d9ceSMichael Lange PETSC_EXTERN PetscErrorCode DMLabelGather(DMLabel, PetscSF, DMLabel *);
48c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelConvertToSection(DMLabel, PetscSection *, IS *);
49c58f1c22SToby Isaac 
503dec45f3SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateGlobalSectionLabel(PetscSection, PetscSF, PetscBool, DMLabel, PetscInt, PetscSection *);
513dec45f3SMatthew G. Knepley 
525fdea053SToby Isaac #define PETSCSECTIONSYMLABEL "label"
535fdea053SToby Isaac PETSC_EXTERN PetscErrorCode PetscSectionSymCreateLabel(MPI_Comm,DMLabel,PetscSectionSym *);
545fdea053SToby Isaac PETSC_EXTERN PetscErrorCode PetscSectionSymLabelSetLabel(PetscSectionSym,DMLabel);
555fdea053SToby Isaac PETSC_EXTERN PetscErrorCode PetscSectionSymLabelSetStratum(PetscSectionSym,PetscInt,PetscInt,PetscInt,PetscInt,PetscCopyMode,const PetscInt **,const PetscScalar **);
565fdea053SToby Isaac 
57c58f1c22SToby Isaac #endif
58