File ida.hxx

class IdaSolver : public Solver

Public Functions

IdaSolver(Options *opts = nullptr)
~IdaSolver()
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.

BoutReal run(BoutReal tout)
void res(BoutReal t, BoutReal *udata, BoutReal *dudata, BoutReal *rdata)
void pre(BoutReal t, BoutReal cj, BoutReal delta, BoutReal *udata, BoutReal *rvec, BoutReal *zvec)

Private Members

int NOUT
BoutReal TIMESTEP
N_Vector uvec = {nullptr}
N_Vector duvec = {nullptr}
N_Vector id = {nullptr}
void *idamem = {nullptr}
BoutReal pre_Wtime = {0.0}
int pre_ncalls = {0}
SUNLinearSolver sun_solver = {nullptr}

SPGMR solver structure.

sundials::Context suncontext

Context for SUNDIALS memory allocations.