xref: /petsc/include/petscsection.h (revision fe2efc57b7777594bce7568e90822861480cbdc8)
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 []);
18ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldComponents(PetscSection, PetscInt, PetscInt *);
19ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetFieldComponents(PetscSection, PetscInt, PetscInt);
20ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetChart(PetscSection, PetscInt *, PetscInt *);
21ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetChart(PetscSection, PetscInt, PetscInt);
22ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetPermutation(PetscSection, IS *);
23ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetPermutation(PetscSection, IS);
24ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetPointMajor(PetscSection, PetscBool *);
25ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetPointMajor(PetscSection, PetscBool);
26ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetDof(PetscSection, PetscInt, PetscInt*);
27ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetDof(PetscSection, PetscInt, PetscInt);
28ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionAddDof(PetscSection, PetscInt, PetscInt);
29ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldDof(PetscSection, PetscInt, PetscInt, PetscInt*);
30ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetFieldDof(PetscSection, PetscInt, PetscInt, PetscInt);
31ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionAddFieldDof(PetscSection, PetscInt, PetscInt, PetscInt);
32ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionHasConstraints(PetscSection, PetscBool *);
33ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetConstraintDof(PetscSection, PetscInt, PetscInt*);
34ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetConstraintDof(PetscSection, PetscInt, PetscInt);
35ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionAddConstraintDof(PetscSection, PetscInt, PetscInt);
36ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldConstraintDof(PetscSection, PetscInt, PetscInt, PetscInt*);
37ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetFieldConstraintDof(PetscSection, PetscInt, PetscInt, PetscInt);
38ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionAddFieldConstraintDof(PetscSection, PetscInt, PetscInt, PetscInt);
39ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetConstraintIndices(PetscSection, PetscInt, const PetscInt**);
40ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetConstraintIndices(PetscSection, PetscInt, const PetscInt*);
41ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldConstraintIndices(PetscSection, PetscInt, PetscInt, const PetscInt**);
42ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetFieldConstraintIndices(PetscSection, PetscInt, PetscInt, const PetscInt*);
43ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetUpBC(PetscSection);
44ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetUp(PetscSection);
45ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetMaxDof(PetscSection, PetscInt*);
46ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetStorageSize(PetscSection, PetscInt*);
47ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetConstrainedStorageSize(PetscSection, PetscInt*);
48ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetOffset(PetscSection, PetscInt, PetscInt*);
49ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetOffset(PetscSection, PetscInt, PetscInt);
50ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldOffset(PetscSection, PetscInt, PetscInt, PetscInt*);
51ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetFieldOffset(PetscSection, PetscInt, PetscInt, PetscInt);
52ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldPointOffset(PetscSection, PetscInt, PetscInt, PetscInt*);
53ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetOffsetRange(PetscSection, PetscInt *, PetscInt *);
54ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionView(PetscSection, PetscViewer);
55*fe2efc57SMark PETSC_EXTERN PetscErrorCode PetscSectionViewFromOptions(PetscSection,PetscObject,const char[]);
56ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionReset(PetscSection);
57ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionDestroy(PetscSection*);
58ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateGlobalSection(PetscSection, PetscSF, PetscBool, PetscBool, PetscSection *);
59ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateGlobalSectionCensored(PetscSection, PetscSF, PetscBool, PetscInt, const PetscInt [], PetscSection *);
60ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateSubsection(PetscSection, PetscInt, const PetscInt [], PetscSection *);
61ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateSupersection(PetscSection[], PetscInt, PetscSection *);
62ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionCreateSubmeshSection(PetscSection, IS, PetscSection *);
63ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetPointLayout(MPI_Comm, PetscSection, PetscLayout *);
64ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetValueLayout(MPI_Comm, PetscSection, PetscLayout *);
65ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionPermute(PetscSection, IS, PetscSection *);
66ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetField(PetscSection, PetscInt, PetscSection *);
67ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetUseFieldOffsets(PetscSection, PetscBool);
68ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetUseFieldOffsets(PetscSection, PetscBool *);
69ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionExtractDofsFromArray(PetscSection, MPI_Datatype, const void *, IS, PetscSection *, void *[]);
70ea844a1aSMatthew Knepley 
71ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetClosureIndex(PetscSection, PetscObject, PetscSection, IS);
72ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetClosureIndex(PetscSection, PetscObject, PetscSection *, IS *);
73ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetClosurePermutation(PetscSection, PetscObject, IS);
74ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetClosurePermutation(PetscSection, PetscObject, IS *);
75ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetClosureInversePermutation(PetscSection, PetscObject, IS *);
76ea844a1aSMatthew Knepley 
77ea844a1aSMatthew Knepley PETSC_EXTERN PetscClassId PETSC_SECTION_SYM_CLASSID;
78ea844a1aSMatthew Knepley 
79ea844a1aSMatthew Knepley PETSC_EXTERN PetscFunctionList PetscSectionSymList;
80ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSymSetType(PetscSectionSym, PetscSectionSymType);
81ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSymGetType(PetscSectionSym, PetscSectionSymType*);
82ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSymRegister(const char[],PetscErrorCode (*)(PetscSectionSym));
83ea844a1aSMatthew Knepley 
84ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSymCreate(MPI_Comm, PetscSectionSym*);
85ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSymDestroy(PetscSectionSym*);
86ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSymView(PetscSectionSym,PetscViewer);
87ea844a1aSMatthew Knepley 
88ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetSym(PetscSection, PetscSectionSym);
89ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetSym(PetscSection, PetscSectionSym*);
90ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionSetFieldSym(PetscSection, PetscInt, PetscSectionSym);
91ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldSym(PetscSection, PetscInt, PetscSectionSym*);
92ea844a1aSMatthew Knepley 
93ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetPointSyms(PetscSection, PetscInt, const PetscInt *, const PetscInt ***, const PetscScalar ***);
94ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionRestorePointSyms(PetscSection, PetscInt, const PetscInt *, const PetscInt ***, const PetscScalar ***);
95ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionGetFieldPointSyms(PetscSection, PetscInt, PetscInt, const PetscInt *, const PetscInt ***, const PetscScalar ***);
96ea844a1aSMatthew Knepley PETSC_EXTERN PetscErrorCode PetscSectionRestoreFieldPointSyms(PetscSection, PetscInt, PetscInt, const PetscInt *, const PetscInt ***, const PetscScalar ***);
97ea844a1aSMatthew Knepley 
98ea844a1aSMatthew Knepley #endif
99