xref: /petsc/include/petsccharacteristic.h (revision a496304597bacff3545e802853d69e8765312868)
130a76a96SBarry Smith /*
230a76a96SBarry Smith    Defines the interface functions for the method of characteristics solvers
330a76a96SBarry Smith */
4*a4963045SJacob Faibussowitsch #pragma once
530a76a96SBarry Smith 
62c8e378dSBarry Smith #include <petscvec.h>
71e25c274SJed Brown #include <petscdmdatypes.h>
830a76a96SBarry Smith 
9ac09b921SBarry Smith /* SUBMANSEC = Characteristic */
10ac09b921SBarry Smith 
11607a6623SBarry Smith PETSC_EXTERN PetscErrorCode CharacteristicInitializePackage(void);
124bf303faSJacob Faibussowitsch PETSC_EXTERN PetscErrorCode CharacteristicFinalizePackage(void);
1330a76a96SBarry Smith 
1430a76a96SBarry Smith /*S
1530a76a96SBarry Smith      Characteristic - Abstract PETSc object that manages method of characteristics solves
1630a76a96SBarry Smith 
1730a76a96SBarry Smith    Level: beginner
1830a76a96SBarry Smith 
19db781477SPatrick Sanan .seealso: `CharacteristicCreate()`, `CharacteristicSetType()`, `CharacteristicType`, `SNES`, `TS`, `PC`, `KSP`
2030a76a96SBarry Smith S*/
2130a76a96SBarry Smith typedef struct _p_Characteristic *Characteristic;
2230a76a96SBarry Smith 
2376bdecfbSBarry Smith /*J
248f6c3df8SBarry Smith     CharacteristicType - String with the name of a characteristics method.
2530a76a96SBarry Smith 
2630a76a96SBarry Smith    Level: beginner
2730a76a96SBarry Smith 
28db781477SPatrick Sanan .seealso: `CharacteristicSetType()`, `Characteristic`
2976bdecfbSBarry Smith J*/
3030a76a96SBarry Smith #define CHARACTERISTICDA "da"
3119fd82e9SBarry Smith typedef const char *CharacteristicType;
3230a76a96SBarry Smith 
33014dd563SJed Brown PETSC_EXTERN PetscErrorCode CharacteristicCreate(MPI_Comm, Characteristic *);
3419fd82e9SBarry Smith PETSC_EXTERN PetscErrorCode CharacteristicSetType(Characteristic, CharacteristicType);
35014dd563SJed Brown PETSC_EXTERN PetscErrorCode CharacteristicSetUp(Characteristic);
36014dd563SJed Brown PETSC_EXTERN PetscErrorCode CharacteristicSetVelocityInterpolation(Characteristic, DM, Vec, Vec, PetscInt, PetscInt[], PetscErrorCode (*)(Vec, PetscReal[], PetscInt, PetscInt[], PetscScalar[], void *), void *);
37014dd563SJed Brown PETSC_EXTERN PetscErrorCode CharacteristicSetVelocityInterpolationLocal(Characteristic, DM, Vec, Vec, PetscInt, PetscInt[], PetscErrorCode (*)(void *, PetscReal[], PetscInt, PetscInt[], PetscScalar[], void *), void *);
38014dd563SJed Brown PETSC_EXTERN PetscErrorCode CharacteristicSetFieldInterpolation(Characteristic, DM, Vec, PetscInt, PetscInt[], PetscErrorCode (*)(Vec, PetscReal[], PetscInt, PetscInt[], PetscScalar[], void *), void *);
39014dd563SJed Brown PETSC_EXTERN PetscErrorCode CharacteristicSetFieldInterpolationLocal(Characteristic, DM, Vec, PetscInt, PetscInt[], PetscErrorCode (*)(void *, PetscReal[], PetscInt, PetscInt[], PetscScalar[], void *), void *);
40014dd563SJed Brown PETSC_EXTERN PetscErrorCode CharacteristicSolve(Characteristic, PetscReal, Vec);
41014dd563SJed Brown PETSC_EXTERN PetscErrorCode CharacteristicDestroy(Characteristic *);
4230a76a96SBarry Smith 
43140e18c1SBarry Smith PETSC_EXTERN PetscFunctionList CharacteristicList;
4430a76a96SBarry Smith 
45bdf89e91SBarry Smith PETSC_EXTERN PetscErrorCode CharacteristicRegister(const char[], PetscErrorCode (*)(Characteristic));
46