Actual source code: petscdmlabel.h

      1: #pragma once
      2: #include <petscis.h>

      4: /* SUBMANSEC = DM */

      6: PETSC_EXTERN PetscClassId DMLABEL_CLASSID;

      8: #include <petscdmlabeltypes.h>

     10: PETSC_EXTERN PetscFunctionList DMLabelList;

     12: PETSC_EXTERN PetscErrorCode DMLabelCreate(MPI_Comm, const char[], DMLabel *);
     13: PETSC_EXTERN PetscErrorCode DMLabelSetType(DMLabel, DMLabelType);
     14: PETSC_EXTERN PetscErrorCode DMLabelGetType(DMLabel, DMLabelType *);
     15: PETSC_EXTERN PetscErrorCode DMLabelRegister(const char[], PetscErrorCode (*)(DMLabel));
     16: PETSC_EXTERN PetscErrorCode DMLabelRegisterAll(void);
     17: PETSC_EXTERN PetscErrorCode DMLabelRegisterDestroy(void);
     18: PETSC_EXTERN PetscErrorCode DMLabelSetUp(DMLabel);
     19: PETSC_EXTERN PetscErrorCode DMLabelSetFromOptions(DMLabel);
     20: PETSC_EXTERN PetscErrorCode DMLabelView(DMLabel, PetscViewer);
     21: PETSC_EXTERN PetscErrorCode DMLabelViewFromOptions(DMLabel, PetscObject, const char[]);
     22: PETSC_EXTERN PetscErrorCode DMLabelDuplicate(DMLabel, DMLabel *);
     23: PETSC_EXTERN PetscErrorCode DMLabelReset(DMLabel);
     24: PETSC_EXTERN PetscErrorCode DMLabelDestroy(DMLabel *);

     26: PETSC_EXTERN PetscErrorCode DMLabelGetDefaultValue(DMLabel, PetscInt *);
     27: PETSC_EXTERN PetscErrorCode DMLabelSetDefaultValue(DMLabel, PetscInt);
     28: PETSC_EXTERN PetscErrorCode DMLabelGetValue(DMLabel, PetscInt, PetscInt *);
     29: PETSC_EXTERN PetscErrorCode DMLabelSetValue(DMLabel, PetscInt, PetscInt);
     30: PETSC_EXTERN PetscErrorCode DMLabelClearValue(DMLabel, PetscInt, PetscInt);
     31: PETSC_EXTERN PetscErrorCode DMLabelAddStratum(DMLabel, PetscInt);
     32: PETSC_EXTERN PetscErrorCode DMLabelAddStrata(DMLabel, PetscInt, const PetscInt[]);
     33: PETSC_EXTERN PetscErrorCode DMLabelAddStrataIS(DMLabel, IS);
     34: PETSC_EXTERN PetscErrorCode DMLabelInsertIS(DMLabel, IS, PetscInt);
     35: PETSC_EXTERN PetscErrorCode DMLabelGetNumValues(DMLabel, PetscInt *);
     36: PETSC_EXTERN PetscErrorCode DMLabelGetStratumBounds(DMLabel, PetscInt, PetscInt *, PetscInt *);
     37: PETSC_EXTERN PetscErrorCode DMLabelGetValueIS(DMLabel, IS *);
     38: PETSC_EXTERN PetscErrorCode DMLabelGetValueISGlobal(MPI_Comm, DMLabel, PetscBool, IS *);
     39: PETSC_EXTERN PetscErrorCode DMLabelGetNonEmptyStratumValuesIS(DMLabel, IS *);
     40: PETSC_EXTERN PetscErrorCode DMLabelGetValueIndex(DMLabel, PetscInt, PetscInt *);
     41: PETSC_EXTERN PetscErrorCode DMLabelStratumHasPoint(DMLabel, PetscInt, PetscInt, PetscBool *);
     42: PETSC_EXTERN PetscErrorCode DMLabelHasStratum(DMLabel, PetscInt, PetscBool *);
     43: PETSC_EXTERN PetscErrorCode DMLabelGetStratumSize(DMLabel, PetscInt, PetscInt *);
     44: PETSC_EXTERN PetscErrorCode DMLabelGetStratumIS(DMLabel, PetscInt, IS *);
     45: PETSC_EXTERN PetscErrorCode DMLabelSetStratumIS(DMLabel, PetscInt, IS);
     46: PETSC_EXTERN PetscErrorCode DMLabelSetStratumBounds(DMLabel, PetscInt, PetscInt, PetscInt);
     47: PETSC_EXTERN PetscErrorCode DMLabelClearStratum(DMLabel, PetscInt);
     48: PETSC_EXTERN PetscErrorCode DMLabelGetStratumPointIndex(DMLabel, PetscInt, PetscInt, PetscInt *);

     50: PETSC_EXTERN PetscErrorCode DMLabelCompare(MPI_Comm, DMLabel, DMLabel, PetscBool *, char **message);
     51: PETSC_EXTERN PetscErrorCode DMLabelComputeIndex(DMLabel);
     52: PETSC_EXTERN PetscErrorCode DMLabelCreateIndex(DMLabel, PetscInt, PetscInt);
     53: PETSC_EXTERN PetscErrorCode DMLabelDestroyIndex(DMLabel);
     54: PETSC_EXTERN PetscErrorCode DMLabelHasValue(DMLabel, PetscInt, PetscBool *);
     55: PETSC_EXTERN PetscErrorCode DMLabelHasPoint(DMLabel, PetscInt, PetscBool *);
     56: PETSC_EXTERN PetscErrorCode DMLabelGetBounds(DMLabel, PetscInt *, PetscInt *);
     57: PETSC_EXTERN PetscErrorCode DMLabelGetValueBounds(DMLabel, PetscInt *, PetscInt *);
     58: PETSC_EXTERN PetscErrorCode DMLabelFilter(DMLabel, PetscInt, PetscInt);
     59: PETSC_EXTERN PetscErrorCode DMLabelPermute(DMLabel, IS, DMLabel *);
     60: PETSC_EXTERN PetscErrorCode DMLabelPermuteValues(DMLabel, IS);
     61: PETSC_EXTERN PetscErrorCode DMLabelRewriteValues(DMLabel, IS);
     62: PETSC_EXTERN PetscErrorCode DMLabelDistribute(DMLabel, PetscSF, DMLabel *);
     63: PETSC_EXTERN PetscErrorCode DMLabelGather(DMLabel, PetscSF, DMLabel *);
     64: PETSC_EXTERN PetscErrorCode DMLabelConvertToSection(DMLabel, PetscSection *, IS *);

     66: PETSC_EXTERN PetscErrorCode DMLabelPropagateBegin(DMLabel, PetscSF);
     67: PETSC_EXTERN PetscErrorCode DMLabelPropagatePush(DMLabel, PetscSF, PetscErrorCode (*)(DMLabel, PetscInt, PetscInt, void *), void *);
     68: PETSC_EXTERN PetscErrorCode DMLabelPropagateEnd(DMLabel, PetscSF);

     70: PETSC_EXTERN PetscErrorCode PetscSectionCreateGlobalSectionLabel(PetscSection, PetscSF, PetscBool, DMLabel, PetscInt, PetscSection *);

     72: #define PETSCSECTIONSYMLABEL "label"
     73: PETSC_EXTERN PetscErrorCode PetscSectionSymCreateLabel(MPI_Comm, DMLabel, PetscSectionSym *);
     74: PETSC_EXTERN PetscErrorCode PetscSectionSymLabelSetLabel(PetscSectionSym, DMLabel);
     75: PETSC_EXTERN PetscErrorCode PetscSectionSymLabelGetStratum(PetscSectionSym, PetscInt, PetscInt *, PetscInt *, PetscInt *, const PetscInt ***, const PetscScalar ***);
     76: PETSC_EXTERN PetscErrorCode PetscSectionSymLabelSetStratum(PetscSectionSym, PetscInt, PetscInt, PetscInt, PetscInt, PetscCopyMode, const PetscInt **, const PetscScalar **);