1ea844a1aSMatthew Knepley #if !defined(PETSCSECTION_H) 2ea844a1aSMatthew Knepley #define PETSCSECTION_H 3*ac09b921SBarry Smith 4ea844a1aSMatthew Knepley #include <petscsys.h> 5ea844a1aSMatthew Knepley #include <petscis.h> 6ea844a1aSMatthew Knepley #include <petscsectiontypes.h> 7ea844a1aSMatthew Knepley 8*ac09b921SBarry Smith /* SUBMANSEC = PetscSection */ 9*ac09b921SBarry Smith 10ea844a1aSMatthew Knepley PETSC_EXTERN PetscClassId PETSC_SECTION_CLASSID; 11ea844a1aSMatthew Knepley 12ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreate(MPI_Comm,PetscSection*); 13ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionClone(PetscSection, PetscSection*); 14ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetFromOptions(PetscSection); 15ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionCopy(PetscSection, PetscSection); 16ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionCompare(PetscSection, PetscSection, PetscBool*); 17ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetNumFields(PetscSection, PetscInt *); 18ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetNumFields(PetscSection, PetscInt); 19ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldName(PetscSection, PetscInt, const char *[]); 20ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetFieldName(PetscSection, PetscInt, const char []); 21b778fa18SValeria Barra PETSC_EXTERN PetscErrorCode PetscSectionGetComponentName(PetscSection, PetscInt, PetscInt, const char *[]); 22b778fa18SValeria Barra PETSC_EXTERN PetscErrorCode PetscSectionSetComponentName(PetscSection, PetscInt, PetscInt, const char []); 23ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldComponents(PetscSection, PetscInt, PetscInt *); 24ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetFieldComponents(PetscSection, PetscInt, PetscInt); 25ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetChart(PetscSection, PetscInt *, PetscInt *); 26ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetChart(PetscSection, PetscInt, PetscInt); 27ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetPermutation(PetscSection, IS *); 28ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetPermutation(PetscSection, IS); 29ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetPointMajor(PetscSection, PetscBool *); 30ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetPointMajor(PetscSection, PetscBool); 3187e637c6Sksagiyam PETSC_EXTERN PetscErrorCode PetscSectionGetIncludesConstraints(PetscSection, PetscBool *); 3287e637c6Sksagiyam PETSC_EXTERN PetscErrorCode PetscSectionSetIncludesConstraints(PetscSection, PetscBool); 33ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetDof(PetscSection, PetscInt, PetscInt*); 34ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetDof(PetscSection, PetscInt, PetscInt); 35ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionAddDof(PetscSection, PetscInt, PetscInt); 36ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldDof(PetscSection, PetscInt, PetscInt, PetscInt*); 37ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetFieldDof(PetscSection, PetscInt, PetscInt, PetscInt); 38ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionAddFieldDof(PetscSection, PetscInt, PetscInt, PetscInt); 39ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionHasConstraints(PetscSection, PetscBool *); 40ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetConstraintDof(PetscSection, PetscInt, PetscInt*); 41ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetConstraintDof(PetscSection, PetscInt, PetscInt); 42ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionAddConstraintDof(PetscSection, PetscInt, PetscInt); 43ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldConstraintDof(PetscSection, PetscInt, PetscInt, PetscInt*); 44ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetFieldConstraintDof(PetscSection, PetscInt, PetscInt, PetscInt); 45ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionAddFieldConstraintDof(PetscSection, PetscInt, PetscInt, PetscInt); 46ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetConstraintIndices(PetscSection, PetscInt, const PetscInt**); 47ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetConstraintIndices(PetscSection, PetscInt, const PetscInt*); 48ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldConstraintIndices(PetscSection, PetscInt, PetscInt, const PetscInt**); 49ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetFieldConstraintIndices(PetscSection, PetscInt, PetscInt, const PetscInt*); 50ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetUpBC(PetscSection); 51ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetUp(PetscSection); 52ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetMaxDof(PetscSection, PetscInt*); 53ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetStorageSize(PetscSection, PetscInt*); 54ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetConstrainedStorageSize(PetscSection, PetscInt*); 55ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetOffset(PetscSection, PetscInt, PetscInt*); 56ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetOffset(PetscSection, PetscInt, PetscInt); 57ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldOffset(PetscSection, PetscInt, PetscInt, PetscInt*); 58ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetFieldOffset(PetscSection, PetscInt, PetscInt, PetscInt); 59ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldPointOffset(PetscSection, PetscInt, PetscInt, PetscInt*); 60ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetOffsetRange(PetscSection, PetscInt *, PetscInt *); 61ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionView(PetscSection, PetscViewer); 62fe2efc57SMark PETSC_EXTERN PetscErrorCode PetscSectionViewFromOptions(PetscSection,PetscObject,const char[]); 63fde5e3acSksagiyam PETSC_EXTERN PetscErrorCode PetscSectionLoad(PetscSection, PetscViewer); 64ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionReset(PetscSection); 65ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionDestroy(PetscSection*); 66ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateGlobalSection(PetscSection, PetscSF, PetscBool, PetscBool, PetscSection *); 67ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateGlobalSectionCensored(PetscSection, PetscSF, PetscBool, PetscInt, const PetscInt [], PetscSection *); 68ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateSubsection(PetscSection, PetscInt, const PetscInt [], PetscSection *); 69ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateSupersection(PetscSection[], PetscInt, PetscSection *); 70ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateSubmeshSection(PetscSection, IS, PetscSection *); 7141f23ed0SMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateSubdomainSection(PetscSection, IS, PetscSection *); 72ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetPointLayout(MPI_Comm, PetscSection, PetscLayout *); 73ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetValueLayout(MPI_Comm, PetscSection, PetscLayout *); 74ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionPermute(PetscSection, IS, PetscSection *); 75ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetField(PetscSection, PetscInt, PetscSection *); 76ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetUseFieldOffsets(PetscSection, PetscBool); 77ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetUseFieldOffsets(PetscSection, PetscBool *); 78ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionExtractDofsFromArray(PetscSection, MPI_Datatype, const void *, IS, PetscSection *, void *[]); 79ea844a1aSMatthew Knepley 80ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetClosureIndex(PetscSection, PetscObject, PetscSection, IS); 81ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetClosureIndex(PetscSection, PetscObject, PetscSection *, IS *); 82c459fbc1SJed Brown PETSC_EXTERN PetscErrorCode PetscSectionSetClosurePermutation(PetscSection, PetscObject, PetscInt, IS); 83c459fbc1SJed Brown PETSC_EXTERN PetscErrorCode PetscSectionGetClosurePermutation(PetscSection, PetscObject, PetscInt, PetscInt, IS *); 84c459fbc1SJed Brown PETSC_EXTERN PetscErrorCode PetscSectionGetClosureInversePermutation(PetscSection, PetscObject, PetscInt, PetscInt, IS *); 85ea844a1aSMatthew Knepley 86ea844a1aSMatthew Knepley PETSC_EXTERN PetscClassId PETSC_SECTION_SYM_CLASSID; 87ea844a1aSMatthew Knepley 88ea844a1aSMatthew Knepley PETSC_EXTERN PetscFunctionList PetscSectionSymList; 89ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSymSetType(PetscSectionSym, PetscSectionSymType); 90ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSymGetType(PetscSectionSym, PetscSectionSymType*); 91ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSymRegister(const char[],PetscErrorCode (*)(PetscSectionSym)); 92ea844a1aSMatthew Knepley 93ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSymCreate(MPI_Comm, PetscSectionSym*); 94ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSymDestroy(PetscSectionSym*); 95ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSymView(PetscSectionSym, PetscViewer); 96b004864fSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscSectionSymCopy(PetscSectionSym, PetscSectionSym); 97b004864fSMatthew G. Knepley PETSC_EXTERN PetscErrorCode PetscSectionSymDistribute(PetscSectionSym, PetscSF, PetscSectionSym*); 98ea844a1aSMatthew Knepley 99ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetSym(PetscSection, PetscSectionSym); 100ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetSym(PetscSection, PetscSectionSym*); 101ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetFieldSym(PetscSection, PetscInt, PetscSectionSym); 102ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldSym(PetscSection, PetscInt, PetscSectionSym*); 103ea844a1aSMatthew Knepley 104ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetPointSyms(PetscSection, PetscInt, const PetscInt *, const PetscInt ***, const PetscScalar ***); 105ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionRestorePointSyms(PetscSection, PetscInt, const PetscInt *, const PetscInt ***, const PetscScalar ***); 106ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldPointSyms(PetscSection, PetscInt, PetscInt, const PetscInt *, const PetscInt ***, const PetscScalar ***); 107ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionRestoreFieldPointSyms(PetscSection, PetscInt, PetscInt, const PetscInt *, const PetscInt ***, const PetscScalar ***); 108ea844a1aSMatthew Knepley 109ea844a1aSMatthew Knepley #endif 110