Date: 2024-07-30T17:31:09+00:00

Actual source code: petscsection.h

      1: #pragma once

      3: #include <petscsys.h>
      4: #include <petscis.h>
      5: #include <petscbt.h>
      6: #include <petscsectiontypes.h>

      8: /* SUBMANSEC = PetscSection */

     10: PETSC_EXTERN PetscClassId PETSC_SECTION_CLASSID;

     12: PETSC_EXTERN PetscErrorCode PetscSectionCreate(MPI_Comm, PetscSection *);
     13: PETSC_EXTERN PetscErrorCode PetscSectionClone(PetscSection, PetscSection *);
     14: PETSC_EXTERN PetscErrorCode PetscSectionSetFromOptions(PetscSection);
     15: PETSC_EXTERN PetscErrorCode PetscSectionCopy(PetscSection, PetscSection);
     16: PETSC_EXTERN PetscErrorCode PetscSectionCompare(PetscSection, PetscSection, PetscBool *);
     17: PETSC_EXTERN PetscErrorCode PetscSectionGetNumFields(PetscSection, PetscInt *);
     18: PETSC_EXTERN PetscErrorCode PetscSectionSetNumFields(PetscSection, PetscInt);
     19: PETSC_EXTERN PetscErrorCode PetscSectionGetFieldName(PetscSection, PetscInt, const char *[]);
     20: PETSC_EXTERN PetscErrorCode PetscSectionSetFieldName(PetscSection, PetscInt, const char[]);
     21: PETSC_EXTERN PetscErrorCode PetscSectionGetComponentName(PetscSection, PetscInt, PetscInt, const char *[]);
     22: PETSC_EXTERN PetscErrorCode PetscSectionSetComponentName(PetscSection, PetscInt, PetscInt, const char[]);
     23: PETSC_EXTERN PetscErrorCode PetscSectionGetFieldComponents(PetscSection, PetscInt, PetscInt *);
     24: PETSC_EXTERN PetscErrorCode PetscSectionSetFieldComponents(PetscSection, PetscInt, PetscInt);
     25: PETSC_EXTERN PetscErrorCode PetscSectionGetChart(PetscSection, PetscInt *, PetscInt *);
     26: PETSC_EXTERN PetscErrorCode PetscSectionSetChart(PetscSection, PetscInt, PetscInt);
     27: PETSC_EXTERN PetscErrorCode PetscSectionGetPermutation(PetscSection, IS *);
     28: PETSC_EXTERN PetscErrorCode PetscSectionSetPermutation(PetscSection, IS);
     29: PETSC_EXTERN PetscErrorCode PetscSectionGetBlockStarts(PetscSection, PetscBT *);
     30: PETSC_EXTERN PetscErrorCode PetscSectionSetBlockStarts(PetscSection, PetscBT);
     31: PETSC_EXTERN PetscErrorCode PetscSectionGetPointMajor(PetscSection, PetscBool *);
     32: PETSC_EXTERN PetscErrorCode PetscSectionSetPointMajor(PetscSection, PetscBool);
     33: PETSC_EXTERN PetscErrorCode PetscSectionGetIncludesConstraints(PetscSection, PetscBool *);
     34: PETSC_EXTERN PetscErrorCode PetscSectionSetIncludesConstraints(PetscSection, PetscBool);
     35: PETSC_EXTERN PetscErrorCode PetscSectionGetDof(PetscSection, PetscInt, PetscInt *);
     36: PETSC_EXTERN PetscErrorCode PetscSectionSetDof(PetscSection, PetscInt, PetscInt);
     37: PETSC_EXTERN PetscErrorCode PetscSectionAddDof(PetscSection, PetscInt, PetscInt);
     38: PETSC_EXTERN PetscErrorCode PetscSectionGetFieldDof(PetscSection, PetscInt, PetscInt, PetscInt *);
     39: PETSC_EXTERN PetscErrorCode PetscSectionSetFieldDof(PetscSection, PetscInt, PetscInt, PetscInt);
     40: PETSC_EXTERN PetscErrorCode PetscSectionAddFieldDof(PetscSection, PetscInt, PetscInt, PetscInt);
     41: PETSC_EXTERN PetscErrorCode PetscSectionHasConstraints(PetscSection, PetscBool *);
     42: PETSC_EXTERN PetscErrorCode PetscSectionGetConstraintDof(PetscSection, PetscInt, PetscInt *);
     43: PETSC_EXTERN PetscErrorCode PetscSectionSetConstraintDof(PetscSection, PetscInt, PetscInt);
     44: PETSC_EXTERN PetscErrorCode PetscSectionAddConstraintDof(PetscSection, PetscInt, PetscInt);
     45: PETSC_EXTERN PetscErrorCode PetscSectionGetFieldConstraintDof(PetscSection, PetscInt, PetscInt, PetscInt *);
     46: PETSC_EXTERN PetscErrorCode PetscSectionSetFieldConstraintDof(PetscSection, PetscInt, PetscInt, PetscInt);
     47: PETSC_EXTERN PetscErrorCode PetscSectionAddFieldConstraintDof(PetscSection, PetscInt, PetscInt, PetscInt);
     48: PETSC_EXTERN PetscErrorCode PetscSectionGetConstraintIndices(PetscSection, PetscInt, const PetscInt **);
     49: PETSC_EXTERN PetscErrorCode PetscSectionSetConstraintIndices(PetscSection, PetscInt, const PetscInt *);
     50: PETSC_EXTERN PetscErrorCode PetscSectionGetFieldConstraintIndices(PetscSection, PetscInt, PetscInt, const PetscInt **);
     51: PETSC_EXTERN PetscErrorCode PetscSectionSetFieldConstraintIndices(PetscSection, PetscInt, PetscInt, const PetscInt *);
     52: PETSC_EXTERN PetscErrorCode PetscSectionSetUpBC(PetscSection);
     53: PETSC_EXTERN PetscErrorCode PetscSectionSetUp(PetscSection);
     54: PETSC_EXTERN PetscErrorCode PetscSectionGetMaxDof(PetscSection, PetscInt *);
     55: PETSC_EXTERN PetscErrorCode PetscSectionGetStorageSize(PetscSection, PetscInt *);
     56: PETSC_EXTERN PetscErrorCode PetscSectionGetConstrainedStorageSize(PetscSection, PetscInt *);
     57: PETSC_EXTERN PetscErrorCode PetscSectionGetOffset(PetscSection, PetscInt, PetscInt *);
     58: PETSC_EXTERN PetscErrorCode PetscSectionSetOffset(PetscSection, PetscInt, PetscInt);
     59: PETSC_EXTERN PetscErrorCode PetscSectionGetFieldOffset(PetscSection, PetscInt, PetscInt, PetscInt *);
     60: PETSC_EXTERN PetscErrorCode PetscSectionSetFieldOffset(PetscSection, PetscInt, PetscInt, PetscInt);
     61: PETSC_EXTERN PetscErrorCode PetscSectionGetFieldPointOffset(PetscSection, PetscInt, PetscInt, PetscInt *);
     62: PETSC_EXTERN PetscErrorCode PetscSectionGetOffsetRange(PetscSection, PetscInt *, PetscInt *);
     63: PETSC_EXTERN PetscErrorCode PetscSectionView(PetscSection, PetscViewer);
     64: PETSC_EXTERN PetscErrorCode PetscSectionViewFromOptions(PetscSection, PetscObject, const char[]);
     65: PETSC_EXTERN PetscErrorCode PetscSectionLoad(PetscSection, PetscViewer);
     66: PETSC_EXTERN PetscErrorCode PetscSectionReset(PetscSection);
     67: PETSC_EXTERN PetscErrorCode PetscSectionDestroy(PetscSection *);
     68: PETSC_EXTERN PetscErrorCode PetscSectionCreateGlobalSection(PetscSection, PetscSF, PetscBool, PetscBool, PetscBool, PetscSection *);
     69: PETSC_EXTERN PetscErrorCode PetscSectionCreateGlobalSectionCensored(PetscSection, PetscSF, PetscBool, PetscInt, const PetscInt[], PetscSection *);
     70: PETSC_EXTERN PetscErrorCode PetscSectionCreateSubsection(PetscSection, PetscInt, const PetscInt[], PetscSection *);
     71: PETSC_EXTERN PetscErrorCode PetscSectionCreateSupersection(PetscSection[], PetscInt, PetscSection *);
     72: PETSC_EXTERN PetscErrorCode PetscSectionCreateSubmeshSection(PetscSection, IS, PetscSection *);
     73: PETSC_EXTERN PetscErrorCode PetscSectionCreateSubdomainSection(PetscSection, IS, PetscSection *);
     74: PETSC_EXTERN PetscErrorCode PetscSectionCreateComponentSubsection(PetscSection, PetscInt, const PetscInt[], PetscSection *);
     75: PETSC_EXTERN PetscErrorCode PetscSectionGetPointLayout(MPI_Comm, PetscSection, PetscLayout *);
     76: PETSC_EXTERN PetscErrorCode PetscSectionGetValueLayout(MPI_Comm, PetscSection, PetscLayout *);
     77: PETSC_EXTERN PetscErrorCode PetscSectionPermute(PetscSection, IS, PetscSection *);
     78: PETSC_EXTERN PetscErrorCode PetscSectionGetField(PetscSection, PetscInt, PetscSection *);
     79: PETSC_EXTERN PetscErrorCode PetscSectionSetUseFieldOffsets(PetscSection, PetscBool);
     80: PETSC_EXTERN PetscErrorCode PetscSectionGetUseFieldOffsets(PetscSection, PetscBool *);
     81: 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);

     83: PETSC_EXTERN PetscErrorCode PetscSectionSetClosureIndex(PetscSection, PetscObject, PetscSection, IS);
     84: PETSC_EXTERN PetscErrorCode PetscSectionGetClosureIndex(PetscSection, PetscObject, PetscSection *, IS *);
     85: PETSC_EXTERN PetscErrorCode PetscSectionSetClosurePermutation(PetscSection, PetscObject, PetscInt, IS);
     86: PETSC_EXTERN PetscErrorCode PetscSectionGetClosurePermutation(PetscSection, PetscObject, PetscInt, PetscInt, IS *);
     87: PETSC_EXTERN PetscErrorCode PetscSectionGetClosureInversePermutation(PetscSection, PetscObject, PetscInt, PetscInt, IS *);
     88: PETSC_EXTERN PetscErrorCode PetscSectionResetClosurePermutation(PetscSection);

     90: PETSC_EXTERN PetscClassId PETSC_SECTION_SYM_CLASSID;

     92: PETSC_EXTERN PetscFunctionList PetscSectionSymList;
     93: PETSC_EXTERN PetscErrorCode    PetscSectionSymSetType(PetscSectionSym, PetscSectionSymType);
     94: PETSC_EXTERN PetscErrorCode    PetscSectionSymGetType(PetscSectionSym, PetscSectionSymType *);
     95: PETSC_EXTERN PetscErrorCode    PetscSectionSymRegister(const char[], PetscErrorCode (*)(PetscSectionSym));

     97: PETSC_EXTERN PetscErrorCode PetscSectionSymCreate(MPI_Comm, PetscSectionSym *);
     98: PETSC_EXTERN PetscErrorCode PetscSectionSymDestroy(PetscSectionSym *);
     99: PETSC_EXTERN PetscErrorCode PetscSectionSymView(PetscSectionSym, PetscViewer);
    100: PETSC_EXTERN PetscErrorCode PetscSectionSymCopy(PetscSectionSym, PetscSectionSym);
    101: PETSC_EXTERN PetscErrorCode PetscSectionSymDistribute(PetscSectionSym, PetscSF, PetscSectionSym *);

    103: PETSC_EXTERN PetscErrorCode PetscSectionSetSym(PetscSection, PetscSectionSym);
    104: PETSC_EXTERN PetscErrorCode PetscSectionGetSym(PetscSection, PetscSectionSym *);
    105: PETSC_EXTERN PetscErrorCode PetscSectionSetFieldSym(PetscSection, PetscInt, PetscSectionSym);
    106: PETSC_EXTERN PetscErrorCode PetscSectionGetFieldSym(PetscSection, PetscInt, PetscSectionSym *);

    108: PETSC_EXTERN PetscErrorCode PetscSectionGetPointSyms(PetscSection, PetscInt, const PetscInt *, const PetscInt ***, const PetscScalar ***);
    109: PETSC_EXTERN PetscErrorCode PetscSectionRestorePointSyms(PetscSection, PetscInt, const PetscInt *, const PetscInt ***, const PetscScalar ***);
    110: PETSC_EXTERN PetscErrorCode PetscSectionGetFieldPointSyms(PetscSection, PetscInt, PetscInt, const PetscInt *, const PetscInt ***, const PetscScalar ***);
    111: PETSC_EXTERN PetscErrorCode PetscSectionRestoreFieldPointSyms(PetscSection, PetscInt, PetscInt, const PetscInt *, const PetscInt ***, const PetscScalar ***);