File petsc.hxx#
Defines
-
OPT_SIZE#
Functions
-
PetscErrorCode PetscMonitor(TS, PetscInt, PetscReal, Vec, void *ctx)
Monitor function called on every internal timestep.
-
PetscErrorCode PetscSNESMonitor(SNES, PetscInt, PetscReal, void *ctx)
Monitor function for SNES.
-
PetscErrorCode solver_ijacobian(TS, PetscReal, Vec, Vec, PetscReal, Mat*, Mat*, MatStructure*, void*)#
Compute IJacobian = dF/dU + a dF/dUdot - a dummy matrix used for pc=none.
Variables
-
BoutReal simtime
-
struct snes_info#
- #include <petsc.hxx>
Data for SNES.
-
class PetscSolver : public Solver#
Public Functions
-
~PetscSolver()#
-
virtual int init() override#
Initialise the solver.
-
virtual int run() override#
Run the solver, calling monitors nout times, at intervals of tstep. This function is called by solve(), and is specific to each solver type
This should probably be protected, since it shouldn’t be called by users.
-
PetscErrorCode rhs(TS ts, PetscReal t, Vec globalin, Vec globalout)#
Wrapper for the RHS function.
-
PetscErrorCode pre(PC pc, Vec x, Vec y)#
Wrapper for the preconditioner.
-
PetscErrorCode jac(Vec x, Vec y)#
Wrapper for the Jacobian function.
Private Members
-
Vec state#
-
Vec u = {nullptr}#
PETSc solution vector.
-
TS ts = {nullptr}#
PETSc timestepper object.
-
Mat J = {nullptr}#
RHS Jacobian.
-
Mat Jmf = {nullptr}#
-
MatFDColoring matfdcoloring = {nullptr}#
-
bool diagnose#
If true, print some information about current stage.
-
PetscBool interpolate = {PETSC_TRUE}#
Whether to interpolate or not.
-
char output_name[PETSC_MAX_PATH_LEN]#
-
PetscBool output_flag = {PETSC_FALSE}#
-
PetscInt prev_linear_its#
-
bool adaptive#
Use adaptive timestepping.
-
bool use_precon#
-
bool use_jacobian#
-
bool adams_moulton#
-
int mxstep#
Friends
-
friend PetscErrorCode PetscMonitor(TS, PetscInt, PetscReal, Vec, void *ctx)#
Monitor function called on every internal timestep.
-
friend PetscErrorCode PetscSNESMonitor(SNES, PetscInt, PetscReal, void *ctx)#
Monitor function for SNES.
-
friend PetscErrorCode solver_ijacobian(TS, PetscReal, Vec, Vec, PetscReal, Mat*, Mat*, MatStructure*, void*)#
Compute IJacobian = dF/dU + a dF/dUdot - a dummy matrix used for pc=none.
-
~PetscSolver()#