HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
petscinterface.h
Go to the documentation of this file.
1 
6 #ifdef with_petsc
7 
8 #ifndef _PETSC_INTERFACE_CPP_H_
9 #define _PETSC_INTERFACE_CPP_H_
10 
11 #include <petscinterface_struct.h>
12 
13 /* Copy Functions */
14 int TransferVecToPETSc(const double* const,Vec,void*,const int,const int);
15 int TransferVecFromPETSc(double* const,const Vec,void*,const int,const int);
16 int TransferMatToPETSc(void*,Mat,void*);
17 
18 int PetscRegisterTIMethods (int);
19 
20 /* Right and left -hand side functions */
21 PetscErrorCode PetscRHSFunctionExpl (TS,PetscReal,Vec,Vec,void*);
22 PetscErrorCode PetscRHSFunctionIMEX (TS,PetscReal,Vec,Vec,void*);
23 PetscErrorCode PetscIFunctionIMEX (TS,PetscReal,Vec,Vec,Vec,void*);
24 PetscErrorCode PetscIFunctionImpl (TS,PetscReal,Vec,Vec,Vec,void*);
25 
26 PetscErrorCode PetscIJacobianIMEX(TS,PetscReal,Vec,Vec,PetscReal,Mat,Mat,void*);
27 PetscErrorCode PetscJacobianFunctionIMEX_JFNK (Mat,Vec,Vec);
28 PetscErrorCode PetscJacobianFunctionIMEX_Linear (Mat,Vec,Vec);
29 
30 PetscErrorCode PetscIJacobian(TS,PetscReal,Vec,Vec,PetscReal,Mat,Mat,void*);
31 PetscErrorCode PetscJacobianFunction_JFNK (Mat,Vec,Vec);
32 PetscErrorCode PetscJacobianFunction_Linear(Mat,Vec,Vec);
33 
34 int PetscGlobalDOF(void*);
35 int PetscCleanup(void*);
36 int PetscCreatePointList(void*);
37 
38 /* Other functions */
39 PetscErrorCode PetscPreStage (TS,PetscReal);
40 PetscErrorCode PetscPostStage (TS,PetscReal,PetscInt,Vec*);
41 PetscErrorCode PetscPreTimeStep (TS);
42 PetscErrorCode PetscPostTimeStep (TS);
43 
44 /* preconditioning functions */
45 int PetscComputePreconMatIMEX(Mat,Vec,void*);
46 int PetscComputePreconMatImpl(Mat,Vec,void*);
47 int PetscJacobianMatNonzeroEntriesImpl(Mat,int,void*);
48 
50 PetscErrorCode PetscTimeError (TS);
51 
52 #ifdef with_librom
53 
54 PetscErrorCode PetscSetInitialGuessROM(SNES,Vec,void*);
55 #endif
56 
57 #endif
58 
59 #endif
int TransferVecToPETSc(const double *const, Vec, void *, const int, const int)
PetscErrorCode PetscPostTimeStep(TS)
PetscErrorCode PetscPreTimeStep(TS)
int PetscJacobianMatNonzeroEntriesImpl(Mat, int, void *)
int PetscCleanup(void *)
PetscErrorCode PetscPreStage(TS, PetscReal)
int PetscComputePreconMatIMEX(Mat, Vec, void *)
PetscErrorCode PetscJacobianFunctionIMEX_Linear(Mat, Vec, Vec)
int PetscGlobalDOF(void *)
PetscErrorCode PetscRHSFunctionExpl(TS, PetscReal, Vec, Vec, void *)
int PetscComputePreconMatImpl(Mat, Vec, void *)
int TransferMatToPETSc(void *, Mat, void *)
int PetscRegisterTIMethods(int)
PetscErrorCode PetscPostStage(TS, PetscReal, PetscInt, Vec *)
PetscErrorCode PetscJacobianFunction_JFNK(Mat, Vec, Vec)
PetscErrorCode PetscSetInitialGuessROM(SNES, Vec, void *)
PetscErrorCode PetscIJacobian(TS, PetscReal, Vec, Vec, PetscReal, Mat, Mat, void *)
PetscErrorCode PetscIJacobianIMEX(TS, PetscReal, Vec, Vec, PetscReal, Mat, Mat, void *)
PetscErrorCode PetscRHSFunctionIMEX(TS, PetscReal, Vec, Vec, void *)
PetscErrorCode PetscTimeError(TS)
Definition: PetscError.cpp:20
int PetscCreatePointList(void *)
PetscErrorCode PetscIFunctionIMEX(TS, PetscReal, Vec, Vec, Vec, void *)
Contains structure that defines the interface for time integration with PETSc (https://petsc.org/release/)
int TransferVecFromPETSc(double *const, const Vec, void *, const int, const int)
PetscErrorCode PetscJacobianFunctionIMEX_JFNK(Mat, Vec, Vec)
PetscErrorCode PetscIFunctionImpl(TS, PetscReal, Vec, Vec, Vec, void *)
PetscErrorCode PetscJacobianFunction_Linear(Mat, Vec, Vec)