xref: /petsc/include/petsccharacteristic.h (revision 5d7a6ebe9dde080aedbe86be0085708de8f97bb7)
1 /*
2    Defines the interface functions for the method of characteristics solvers
3 */
4 #ifndef PETSCCHARACTERISTICS_H
5 #define PETSCCHARACTERISTICS_H
6 
7 #include <petscvec.h>
8 #include <petscdmdatypes.h>
9 
10 /* SUBMANSEC = Characteristic */
11 
12 PETSC_EXTERN PetscErrorCode CharacteristicInitializePackage(void);
13 PETSC_EXTERN PetscErrorCode CharacteristicFinalizePackage(void);
14 
15 /*S
16      Characteristic - Abstract PETSc object that manages method of characteristics solves
17 
18    Level: beginner
19 
20 .seealso: `CharacteristicCreate()`, `CharacteristicSetType()`, `CharacteristicType`, `SNES`, `TS`, `PC`, `KSP`
21 S*/
22 typedef struct _p_Characteristic *Characteristic;
23 
24 /*J
25     CharacteristicType - String with the name of a characteristics method.
26 
27    Level: beginner
28 
29 .seealso: `CharacteristicSetType()`, `Characteristic`
30 J*/
31 #define CHARACTERISTICDA "da"
32 typedef const char *CharacteristicType;
33 
34 PETSC_EXTERN PetscErrorCode CharacteristicCreate(MPI_Comm, Characteristic *);
35 PETSC_EXTERN PetscErrorCode CharacteristicSetType(Characteristic, CharacteristicType);
36 PETSC_EXTERN PetscErrorCode CharacteristicSetUp(Characteristic);
37 PETSC_EXTERN PetscErrorCode CharacteristicSetVelocityInterpolation(Characteristic, DM, Vec, Vec, PetscInt, PetscInt[], PetscErrorCode (*)(Vec, PetscReal[], PetscInt, PetscInt[], PetscScalar[], void *), void *);
38 PETSC_EXTERN PetscErrorCode CharacteristicSetVelocityInterpolationLocal(Characteristic, DM, Vec, Vec, PetscInt, PetscInt[], PetscErrorCode (*)(void *, PetscReal[], PetscInt, PetscInt[], PetscScalar[], void *), void *);
39 PETSC_EXTERN PetscErrorCode CharacteristicSetFieldInterpolation(Characteristic, DM, Vec, PetscInt, PetscInt[], PetscErrorCode (*)(Vec, PetscReal[], PetscInt, PetscInt[], PetscScalar[], void *), void *);
40 PETSC_EXTERN PetscErrorCode CharacteristicSetFieldInterpolationLocal(Characteristic, DM, Vec, PetscInt, PetscInt[], PetscErrorCode (*)(void *, PetscReal[], PetscInt, PetscInt[], PetscScalar[], void *), void *);
41 PETSC_EXTERN PetscErrorCode CharacteristicSolve(Characteristic, PetscReal, Vec);
42 PETSC_EXTERN PetscErrorCode CharacteristicDestroy(Characteristic *);
43 
44 PETSC_EXTERN PetscFunctionList CharacteristicList;
45 
46 PETSC_EXTERN PetscErrorCode CharacteristicRegister(const char[], PetscErrorCode (*)(Characteristic));
47 
48 #endif /* PETSCCHARACTERISTICS_H */
49