File adams_bashforth.hxx

class AdamsBashforthSolver : public Solver

Public Functions

AdamsBashforthSolver(Options *options = nullptr)
~AdamsBashforthSolver() = default
virtual void resetInternalFields() override

Should wipe out internal field vector and reset from current field object data.

virtual void setMaxTimestep(BoutReal dt) override

Set a maximum internal timestep (only for explicit schemes)

inline virtual BoutReal getCurrentTimestep() override

Return the current internal timestep.

virtual int init(int nout, BoutReal tstep) override

Initialise the solver NOTE: nout and tstep should be passed to run, not init. Needed because of how the PETSc TS code works

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.

Private Functions

BoutReal take_step(BoutReal timeIn, BoutReal dt, int order, Array<BoutReal> &current, Array<BoutReal> &result)

Private Members

Array<BoutReal> state
Array<BoutReal> nextState
std::deque<Array<BoutReal>> history
std::deque<BoutReal> times
BoutReal atol
BoutReal rtol
BoutReal max_timestep
int mxstep
bool adaptive
bool adaptive_order
bool followHighOrder
BoutReal dtFac
int maximum_order
BoutReal timestep
BoutReal out_timestep
int current_order
int nsteps
int nlocal
int neq