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