Date: 2015-10-02T22:17:04+00:00

Actual source code: petscds.h
petsc-3.6.2 2015-10-02
Report Typos and Errors

      1: /*
      2:       Objects which encapsulate discretizations+continuum residuals
      3: */
      6: #include <petscfe.h>
      7: #include <petscfv.h>
      8: #include <petscdstypes.h>

     10: PETSC_EXTERN PetscErrorCode PetscDSInitializePackage(void);

     12: PETSC_EXTERN PetscClassId PETSCDS_CLASSID;

     14: /*J
     15:   PetscDSType - String with the name of a PETSc discrete system

     17:   Level: beginner

     19: .seealso: PetscDSSetType(), PetscDS
     20: J*/
     21: typedef const char *PetscDSType;
     22: #define PETSCDSBASIC "basic"

     24: typedef void (*PetscPointFunc)(PetscInt, PetscInt, PetscInt,
     25:                                const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     26:                                const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     27:                                PetscReal, const PetscReal[], PetscScalar[]);
     28: typedef void (*PetscPointJac)(PetscInt, PetscInt, PetscInt,
     29:                               const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     30:                               const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     31:                               PetscReal, PetscReal, const PetscReal[], PetscScalar[]);
     32: typedef void (*PetscBdPointFunc)(PetscInt, PetscInt, PetscInt,
     33:                                  const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     34:                                  const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     35:                                  PetscReal, const PetscReal[], const PetscReal[], PetscScalar[]);
     36: typedef void (*PetscBdPointJac)(PetscInt, PetscInt, PetscInt,
     37:                                 const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     38:                                 const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     39:                                 PetscReal, PetscReal, const PetscReal[], const PetscReal[], PetscScalar[]);
     40: typedef void (*PetscRiemannFunc)(PetscInt, PetscInt, const PetscReal[], const PetscReal[], const PetscScalar[], const PetscScalar[], PetscScalar[], void *);

     43: PETSC_EXTERN PetscFunctionList PetscDSList;
     44: PETSC_EXTERN PetscErrorCode PetscDSCreate(MPI_Comm, PetscDS *);
     45: PETSC_EXTERN PetscErrorCode PetscDSDestroy(PetscDS *);
     46: PETSC_EXTERN PetscErrorCode PetscDSSetType(PetscDS, PetscDSType);
     47: PETSC_EXTERN PetscErrorCode PetscDSGetType(PetscDS, PetscDSType *);
     48: PETSC_EXTERN PetscErrorCode PetscDSSetUp(PetscDS);
     49: PETSC_EXTERN PetscErrorCode PetscDSSetFromOptions(PetscDS);
     50: PETSC_STATIC_INLINE PetscErrorCode PetscDSViewFromOptions(PetscDS A,PetscObject B,const char name[]) {return PetscObjectViewFromOptions((PetscObject)A,B,name);}

     52: PETSC_EXTERN PetscErrorCode PetscDSView(PetscDS,PetscViewer);
     53: PETSC_EXTERN PetscErrorCode PetscDSRegister(const char [], PetscErrorCode (*)(PetscDS));
     54: PETSC_EXTERN PetscErrorCode PetscDSRegisterDestroy(void);

     56: PETSC_EXTERN PetscErrorCode PetscDSGetSpatialDimension(PetscDS, PetscInt *);
     57: PETSC_EXTERN PetscErrorCode PetscDSGetNumFields(PetscDS, PetscInt *);
     58: PETSC_EXTERN PetscErrorCode PetscDSGetTotalDimension(PetscDS, PetscInt *);
     59: PETSC_EXTERN PetscErrorCode PetscDSGetTotalBdDimension(PetscDS, PetscInt *);
     60: PETSC_EXTERN PetscErrorCode PetscDSGetTotalComponents(PetscDS, PetscInt *);
     61: PETSC_EXTERN PetscErrorCode PetscDSGetFieldOffset(PetscDS, PetscInt, PetscInt *);
     62: PETSC_EXTERN PetscErrorCode PetscDSGetBdFieldOffset(PetscDS, PetscInt, PetscInt *);
     63: PETSC_EXTERN PetscErrorCode PetscDSGetComponentOffset(PetscDS, PetscInt, PetscInt *);
     64: PETSC_EXTERN PetscErrorCode PetscDSGetComponentOffsets(PetscDS, PetscInt *[]);
     65: PETSC_EXTERN PetscErrorCode PetscDSGetComponentBdOffsets(PetscDS, PetscInt *[]);
     66: PETSC_EXTERN PetscErrorCode PetscDSGetComponentDerivativeOffsets(PetscDS, PetscInt *[]);
     67: PETSC_EXTERN PetscErrorCode PetscDSGetComponentBdDerivativeOffsets(PetscDS, PetscInt *[]);

     69: PETSC_EXTERN PetscErrorCode PetscDSGetDiscretization(PetscDS, PetscInt, PetscObject *);
     70: PETSC_EXTERN PetscErrorCode PetscDSSetDiscretization(PetscDS, PetscInt, PetscObject);
     71: PETSC_EXTERN PetscErrorCode PetscDSAddDiscretization(PetscDS, PetscObject);
     72: PETSC_EXTERN PetscErrorCode PetscDSGetBdDiscretization(PetscDS, PetscInt, PetscObject *);
     73: PETSC_EXTERN PetscErrorCode PetscDSSetBdDiscretization(PetscDS, PetscInt, PetscObject);
     74: PETSC_EXTERN PetscErrorCode PetscDSAddBdDiscretization(PetscDS, PetscObject);
     75: PETSC_EXTERN PetscErrorCode PetscDSGetImplicit(PetscDS, PetscInt, PetscBool*);
     76: PETSC_EXTERN PetscErrorCode PetscDSSetImplicit(PetscDS, PetscInt, PetscBool);
     77: PETSC_EXTERN PetscErrorCode PetscDSGetAdjacency(PetscDS, PetscInt, PetscBool*, PetscBool*);
     78: PETSC_EXTERN PetscErrorCode PetscDSSetAdjacency(PetscDS, PetscInt, PetscBool,  PetscBool);
     79: PETSC_EXTERN PetscErrorCode PetscDSGetObjective(PetscDS, PetscInt,
     80:                                                 void (**)(PetscInt, PetscInt, PetscInt,
     81:                                                           const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     82:                                                           const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     83:                                                           PetscReal, const PetscReal[], PetscScalar[]));
     84: PETSC_EXTERN PetscErrorCode PetscDSSetObjective(PetscDS, PetscInt,
     85:                                                 void (*)(PetscInt, PetscInt, PetscInt,
     86:                                                          const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     87:                                                          const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     88:                                                          PetscReal, const PetscReal[], PetscScalar[]));
     89: PETSC_EXTERN PetscErrorCode PetscDSGetResidual(PetscDS, PetscInt,
     90:                                                void (**)(PetscInt, PetscInt, PetscInt,
     91:                                                          const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     92:                                                          const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     93:                                                          PetscReal, const PetscReal[], PetscScalar[]),
     94:                                                void (**)(PetscInt, PetscInt, PetscInt,
     95:                                                          const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     96:                                                          const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
     97:                                                          PetscReal, const PetscReal[], PetscScalar[]));
     98: PETSC_EXTERN PetscErrorCode PetscDSSetResidual(PetscDS, PetscInt,
     99:                                                void (*)(PetscInt, PetscInt, PetscInt,
    100:                                                         const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    101:                                                         const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    102:                                                         PetscReal, const PetscReal[], PetscScalar[]),
    103:                                                void (*)(PetscInt, PetscInt, PetscInt,
    104:                                                         const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    105:                                                         const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    106:                                                         PetscReal, const PetscReal[], PetscScalar[]));
    107: PETSC_EXTERN PetscErrorCode PetscDSGetJacobian(PetscDS, PetscInt, PetscInt,
    108:                                                void (**)(PetscInt, PetscInt, PetscInt,
    109:                                                          const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    110:                                                          const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    111:                                                          PetscReal, PetscReal, const PetscReal[], PetscScalar[]),
    112:                                                void (**)(PetscInt, PetscInt, PetscInt,
    113:                                                          const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    114:                                                          const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    115:                                                          PetscReal, PetscReal, const PetscReal[], PetscScalar[]),
    116:                                                void (**)(PetscInt, PetscInt, PetscInt,
    117:                                                          const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    118:                                                          const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    119:                                                          PetscReal, PetscReal, const PetscReal[], PetscScalar[]),
    120:                                                void (**)(PetscInt, PetscInt, PetscInt,
    121:                                                          const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    122:                                                          const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    123:                                                          PetscReal, PetscReal, const PetscReal[], PetscScalar[]));
    124: PETSC_EXTERN PetscErrorCode PetscDSSetJacobian(PetscDS, PetscInt, PetscInt,
    125:                                                void (*)(PetscInt, PetscInt, PetscInt,
    126:                                                         const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    127:                                                         const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    128:                                                         PetscReal, PetscReal, const PetscReal[], PetscScalar[]),
    129:                                                void (*)(PetscInt, PetscInt, PetscInt,
    130:                                                         const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    131:                                                         const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    132:                                                         PetscReal, PetscReal, const PetscReal[], PetscScalar[]),
    133:                                                void (*)(PetscInt, PetscInt, PetscInt,
    134:                                                         const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    135:                                                         const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    136:                                                         PetscReal, PetscReal, const PetscReal[], PetscScalar[]),
    137:                                                void (*)(PetscInt, PetscInt, PetscInt,
    138:                                                         const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    139:                                                         const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    140:                                                         PetscReal, PetscReal, const PetscReal[], PetscScalar[]));
    141: PETSC_EXTERN PetscErrorCode PetscDSGetRiemannSolver(PetscDS, PetscInt,
    142:                                                     void (**)(PetscInt, PetscInt, const PetscReal[], const PetscReal[], const PetscScalar[], const PetscScalar[], PetscScalar[], void *));
    143: PETSC_EXTERN PetscErrorCode PetscDSSetRiemannSolver(PetscDS, PetscInt,
    144:                                                     void (*)(PetscInt, PetscInt, const PetscReal[], const PetscReal[], const PetscScalar[], const PetscScalar[], PetscScalar[], void *));
    145: PETSC_EXTERN PetscErrorCode PetscDSGetContext(PetscDS, PetscInt, void **);
    146: PETSC_EXTERN PetscErrorCode PetscDSSetContext(PetscDS, PetscInt, void *);
    147: PETSC_EXTERN PetscErrorCode PetscDSGetBdResidual(PetscDS, PetscInt,
    148:                                                  void (**)(PetscInt, PetscInt, PetscInt,
    149:                                                            const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    150:                                                            const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    151:                                                            PetscReal, const PetscReal[], const PetscReal[], PetscScalar[]),
    152:                                                  void (**)(PetscInt, PetscInt, PetscInt,
    153:                                                            const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    154:                                                            const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    155:                                                            PetscReal, const PetscReal[], const PetscReal[], PetscScalar[]));
    156: PETSC_EXTERN PetscErrorCode PetscDSSetBdResidual(PetscDS, PetscInt,
    157:                                                  void (*)(PetscInt, PetscInt, PetscInt,
    158:                                                           const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    159:                                                           const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    160:                                                           PetscReal, const PetscReal[], const PetscReal[], PetscScalar[]),
    161:                                                  void (*)(PetscInt, PetscInt, PetscInt,
    162:                                                           const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    163:                                                           const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    164:                                                           PetscReal, const PetscReal[], const PetscReal[], PetscScalar[]));
    165: PETSC_EXTERN PetscErrorCode PetscDSGetBdJacobian(PetscDS, PetscInt, PetscInt,
    166:                                                  void (**)(PetscInt, PetscInt, PetscInt,
    167:                                                            const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    168:                                                            const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    169:                                                            PetscReal, PetscReal, const PetscReal[], const PetscReal[], PetscScalar[]),
    170:                                                  void (**)(PetscInt, PetscInt, PetscInt,
    171:                                                            const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    172:                                                            const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    173:                                                            PetscReal, PetscReal, const PetscReal[], const PetscReal[], PetscScalar[]),
    174:                                                  void (**)(PetscInt, PetscInt, PetscInt,
    175:                                                            const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    176:                                                            const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    177:                                                            PetscReal, PetscReal, const PetscReal[], const PetscReal[], PetscScalar[]),
    178:                                                  void (**)(PetscInt, PetscInt, PetscInt,
    179:                                                            const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    180:                                                            const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    181:                                                            PetscReal, PetscReal, const PetscReal[], const PetscReal[], PetscScalar[]));
    182: PETSC_EXTERN PetscErrorCode PetscDSSetBdJacobian(PetscDS, PetscInt, PetscInt,
    183:                                                  void (*)(PetscInt, PetscInt, PetscInt,
    184:                                                           const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    185:                                                           const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    186:                                                           PetscReal, PetscReal, const PetscReal[], const PetscReal[], PetscScalar[]),
    187:                                                  void (*)(PetscInt, PetscInt, PetscInt,
    188:                                                           const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    189:                                                           const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    190:                                                           PetscReal, PetscReal, const PetscReal[], const PetscReal[], PetscScalar[]),
    191:                                                  void (*)(PetscInt, PetscInt, PetscInt,
    192:                                                           const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    193:                                                           const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    194:                                                           PetscReal, PetscReal, const PetscReal[], const PetscReal[], PetscScalar[]),
    195:                                                  void (*)(PetscInt, PetscInt, PetscInt,
    196:                                                           const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    197:                                                           const PetscInt[], const PetscInt[], const PetscScalar[], const PetscScalar[], const PetscScalar[],
    198:                                                           PetscReal, PetscReal, const PetscReal[], const PetscReal[], PetscScalar[]));
    199: PETSC_EXTERN PetscErrorCode PetscDSGetTabulation(PetscDS, PetscReal ***, PetscReal ***);
    200: PETSC_EXTERN PetscErrorCode PetscDSGetBdTabulation(PetscDS, PetscReal ***, PetscReal ***);
    201: PETSC_EXTERN PetscErrorCode PetscDSGetEvaluationArrays(PetscDS, PetscScalar **, PetscScalar **, PetscScalar **);
    202: PETSC_EXTERN PetscErrorCode PetscDSGetWeakFormArrays(PetscDS, PetscScalar **, PetscScalar **, PetscScalar **, PetscScalar **, PetscScalar **, PetscScalar **);
    203: PETSC_EXTERN PetscErrorCode PetscDSGetRefCoordArrays(PetscDS, PetscReal **, PetscScalar **);

    205: #endif