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*d123abd9SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelGetValueIndex(DMLabel, PetscInt, PetscInt *); 31c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelStratumHasPoint(DMLabel, PetscInt, PetscInt, PetscBool *); 32fada774cSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelHasStratum(DMLabel, PetscInt, PetscBool *); 33c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetStratumSize(DMLabel, PetscInt, PetscInt *); 34c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelGetStratumIS(DMLabel, PetscInt, IS *); 354de306b1SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelSetStratumIS(DMLabel, PetscInt, IS); 36412e9a14SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelSetStratumBounds(DMLabel, PetscInt, PetscInt, PetscInt); 37c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelClearStratum(DMLabel, PetscInt); 38*d123abd9SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelGetStratumPointIndex(DMLabel, PetscInt, PetscInt, PetscInt *); 39b9907514SLisandro Dalcin 40c6a43d28SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelComputeIndex(DMLabel); 41c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelCreateIndex(DMLabel, PetscInt, PetscInt); 42c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelDestroyIndex(DMLabel); 43c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelHasValue(DMLabel, PetscInt, PetscBool *); 44c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelHasPoint(DMLabel, PetscInt, PetscBool *); 45c6a43d28SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMLabelGetBounds(DMLabel, PetscInt *, PetscInt *); 46c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelFilter(DMLabel, PetscInt, PetscInt); 47c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelPermute(DMLabel, IS, DMLabel *); 48c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelDistribute(DMLabel, PetscSF, DMLabel *); 497937d9ceSMichael Lange PETSC_EXTERN PetscErrorCode DMLabelGather(DMLabel, PetscSF, DMLabel *); 50c58f1c22SToby Isaac PETSC_EXTERN PetscErrorCode DMLabelConvertToSection(DMLabel, PetscSection *, IS *); 51c58f1c22SToby Isaac 523dec45f3SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateGlobalSectionLabel(PetscSection, PetscSF, PetscBool, DMLabel, PetscInt, PetscSection *); 533dec45f3SMatthew G. Knepley 545fdea053SToby Isaac #define PETSCSECTIONSYMLABEL "label" 555fdea053SToby Isaac PETSC_EXTERN PetscErrorCode PetscSectionSymCreateLabel(MPI_Comm,DMLabel,PetscSectionSym *); 565fdea053SToby Isaac PETSC_EXTERN PetscErrorCode PetscSectionSymLabelSetLabel(PetscSectionSym,DMLabel); 575fdea053SToby Isaac PETSC_EXTERN PetscErrorCode PetscSectionSymLabelSetStratum(PetscSectionSym,PetscInt,PetscInt,PetscInt,PetscInt,PetscCopyMode,const PetscInt **,const PetscScalar **); 585fdea053SToby Isaac 59c58f1c22SToby Isaac #endif 60