Class ForwardProblem

Class Documentation

class ForwardProblem

The ForwardProblem class groups all functions for solving the forward problem.

Public Functions

ForwardProblem(ExpData const *edata, Model *model, Solver *solver, SteadystateProblem const *preeq)

Constructor.

Parameters:
  • edata – pointer to ExpData instance

  • model – pointer to Model instance

  • solver – pointer to Solver instance

  • preeq – preequilibration with which to initialize the forward problem, pass nullptr for no initialization

~ForwardProblem() = default
void workForwardProblem()

Solve the forward problem.

If forward sensitivities are enabled this will also compute sensitivities.

void getAdjointUpdates(Model &model, ExpData const &edata)

computes adjoint updates dJydx according to provided model and expdata

Parameters:
  • modelModel instance

  • edata – experimental data

inline realtype getTime() const

Accessor for t.

Returns:

t

inline AmiVector const &getState() const

Accessor for x.

Returns:

x

inline AmiVector const &getStateDerivative() const

Accessor for dx.

Returns:

dx

inline AmiVectorArray const &getStateSensitivity() const

Accessor for sx.

Returns:

sx

inline std::vector<AmiVector> const &getStatesAtDiscontinuities() const

Accessor for x_disc.

Returns:

x_disc

inline std::vector<AmiVector> const &getRHSAtDiscontinuities() const

Accessor for xdot_disc.

Returns:

xdot_disc

inline std::vector<AmiVector> const &getRHSBeforeDiscontinuities() const

Accessor for xdot_old_disc.

Returns:

xdot_old_disc

inline std::vector<int> const &getNumberOfRoots() const

Accessor for nroots.

Returns:

nroots

inline std::vector<realtype> const &getDiscontinuities() const

Accessor for discs.

Returns:

discs

inline std::vector<std::vector<int>> const &getRootIndexes() const

Accessor for rootidx.

Returns:

rootidx

inline std::vector<realtype> const &getDJydx() const

Accessor for dJydx.

Returns:

dJydx

inline std::vector<realtype> const &getDJzdx() const

Accessor for dJzdx.

Returns:

dJzdx

inline AmiVector *getStatePointer()

Accessor for pointer to x.

Returns:

&x

inline AmiVector *getStateDerivativePointer()

Accessor for pointer to dx.

Returns:

&dx

inline AmiVectorArray *getStateSensitivityPointer()

accessor for pointer to sx

Returns:

&sx

inline AmiVectorArray *getStateDerivativeSensitivityPointer()

Accessor for pointer to sdx.

Returns:

&sdx

inline int getCurrentTimeIteration() const

Accessor for it.

Returns:

it

inline realtype getFinalTime() const

Returns final time point for which simulations are available.

Returns:

time point

inline int getEventCounter() const

Returns maximal event index for which simulations are available.

Returns:

index

inline int getRootCounter() const

Returns maximal event index for which the timepoint is available.

Returns:

index

inline SimulationState const &getSimulationStateTimepoint(int it) const

Retrieves the carbon copy of the simulation state variables at the specified timepoint index.

Parameters:

it – timepoint index

Returns:

state

inline SimulationState const &getSimulationStateEvent(int iroot) const

Retrieves the carbon copy of the simulation state variables at the specified event index.

Parameters:

iroot – event index

Returns:

SimulationState

inline SimulationState const &getInitialSimulationState() const

Retrieves the carbon copy of the simulation state variables at the initial timepoint.

Returns:

SimulationState

inline SimulationState const &getFinalSimulationState() const

Retrieves the carbon copy of the simulation state variables at the final timepoint (or when simulation failed)

Returns:

SimulationState

Public Members

Model *model

pointer to model instance

Solver *solver

pointer to solver instance

ExpData const *edata

pointer to experimental data instance