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