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 PETSC_EXTERN PetscErrorCode CharacteristicInitializePackage(void); 11 12 /*S 13 Characteristic - Abstract PETSc object that manages method of characteristics solves 14 15 Level: beginner 16 17 Concepts: Method of characteristics 18 19 .seealso: CharacteristicCreate(), CharacteristicSetType(), CharacteristicType, SNES, TS, PC, KSP 20 S*/ 21 typedef struct _p_Characteristic *Characteristic; 22 23 /*J 24 CharacteristicType - String with the name of a characteristics method or the creation function 25 with an optional dynamic library name, for example 26 http://www.mcs.anl.gov/petsc/lib.a:mymoccreate() 27 28 Level: beginner 29 30 .seealso: CharacteristicSetType(), Characteristic 31 J*/ 32 #define CHARACTERISTICDA "da" 33 typedef const char* CharacteristicType; 34 35 PETSC_EXTERN PetscErrorCode CharacteristicCreate(MPI_Comm, Characteristic *); 36 PETSC_EXTERN PetscErrorCode CharacteristicSetType(Characteristic, CharacteristicType); 37 PETSC_EXTERN PetscErrorCode CharacteristicSetUp(Characteristic); 38 PETSC_EXTERN PetscErrorCode CharacteristicSetVelocityInterpolation(Characteristic, DM, Vec, Vec, PetscInt, PetscInt[], PetscErrorCode (*)(Vec, PetscReal[], PetscInt, PetscInt[], PetscScalar[], void *), void *); 39 PETSC_EXTERN PetscErrorCode CharacteristicSetVelocityInterpolationLocal(Characteristic, DM, Vec, Vec, PetscInt, PetscInt[], PetscErrorCode (*)(void *, PetscReal[], PetscInt, PetscInt[], PetscScalar[], void *), void *); 40 PETSC_EXTERN PetscErrorCode CharacteristicSetFieldInterpolation(Characteristic, DM, Vec, PetscInt, PetscInt[], PetscErrorCode (*)(Vec, PetscReal[], PetscInt, PetscInt[], PetscScalar[], void *), void *); 41 PETSC_EXTERN PetscErrorCode CharacteristicSetFieldInterpolationLocal(Characteristic, DM, Vec, PetscInt, PetscInt[], PetscErrorCode (*)(void *, PetscReal[], PetscInt, PetscInt[], PetscScalar[], void *), void *); 42 PETSC_EXTERN PetscErrorCode CharacteristicSolve(Characteristic, PetscReal, Vec); 43 PETSC_EXTERN PetscErrorCode CharacteristicDestroy(Characteristic*); 44 45 PETSC_EXTERN PetscBool CharacteristicRegisterAllCalled; 46 PETSC_EXTERN PetscFunctionList CharacteristicList; 47 PETSC_EXTERN PetscErrorCode CharacteristicRegisterAll(void); 48 49 PETSC_EXTERN PetscErrorCode CharacteristicRegister(const char[],PetscErrorCode (*)(Characteristic)); 50 51 #endif /*__PETSCCHARACTERISTICS_H*/ 52