Struct FwdSimWorkspace

Struct Documentation

struct FwdSimWorkspace

The FwdSimWorkspace class is used to store temporary simulation state during forward simulations.

Public Functions

inline FwdSimWorkspace(gsl::not_null<Model*> const &model, gsl::not_null<Solver*> solver)

Constructor.

Parameters:
  • model – The model for which to set up the workspace.

  • solver – The solver for which to set up this workspace.

Public Members

SolutionState sol

Current solution state

AmiVector x_old

old state vector (dimension: nx_solver)

AmiVector xdot

time derivative state vector (dimension: nx_solver)

AmiVector xdot_old

old time derivative state vector (dimension: nx_solver)

AmiVectorArray sdx

differential sensitivity state vector array (dimension: nx_cl x nplist, row-major)

std::vector<realtype> stau

sensitivity of the event timepoint (dimension: nplist)

std::vector<int> roots_found

Array of flags indicating which root has been found.

Array of length nr (ne) with the indices of the user functions gi found to have a root. For i = 0, … ,nr 1 or -1 if gi has a root, and = 0 if not. See CVodeGetRootInfo for details.

realtype tlastroot = {0.0}

Timepoint, at which the last root was found

EventQueue pending_events

Events that are waiting to be handled at the current timepoint.

std::vector<realtype> rval_tmp

temporary rootval storage to check crossing in secondary event (dimension: ne)

std::vector<int> nroots

array of number of found roots for a certain event type (dimension: ne)

std::vector<realtype> rootvals

array of values of the root function (dimension: ne)