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