Class ForwardProblem

Class Documentation

class ForwardProblem

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

Public Functions

ForwardProblem(ExpData const *edata, gsl::not_null<Model*> model, gsl::not_null<Solver*> solver)

Constructor.

Parameters:
  • edata – pointer to ExpData instance

  • model – pointer to Model instance

  • solver – pointer to Solver instance problem, pass nullptr for no initialization

~ForwardProblem() = default
void run()

Solve the forward problem.

If forward sensitivities are enabled this will also compute sensitivities.

std::vector<realtype> get_adjoint_updates(Model &model, ExpData const &edata)

Computes adjoint updates dJydx according to the provided model and ExpData.

Parameters:
  • modelModel instance

  • edata – experimental data

Returns:

dJydx

inline AmiVectorArray const &get_state_sensitivity() const

Accessor for sx.

Returns:

sx

inline std::vector<Discontinuity> const &get_discontinuities() const

Get information on the discontinuities encountered so far.

Returns:

The vector of discontinuities.

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

Accessor for dJzdx.

Returns:

dJzdx

inline int get_current_time_iteration() const

Accessor for it.

Returns:

it

inline realtype get_final_time() const

Returns final time point for which simulations are available.

Returns:

time point

inline int get_event_counter() const

Returns maximal event index for which simulations are available.

Returns:

index

inline SimulationState const &get_simulation_state_timepoint(int const 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 &get_simulation_state_event(int const 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 &get_initial_simulation_state() const

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

Returns:

SimulationState

inline SimulationState const &get_final_simulation_state() const

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

Returns:

SimulationState

inline SteadyStateProblem *get_preeq_problem()

Return the preequilibration SteadyStateProblem.

Returns:

The preequilibration SteadyStateProblem, if any.

inline SteadyStateProblem const *get_preeq_problem() const

Return the preequilibration SteadyStateProblem.

Returns:

The preequilibration SteadyStateProblem, if any.

inline SteadyStateProblem *get_posteq_problem()

Return the postequilibration SteadyStateProblem.

Returns:

The postequilibration SteadyStateProblem, if any.

inline SteadyStateProblem const *get_posteq_problem() const

Return the postequilibration SteadyStateProblem.

Returns:

The postequilibration SteadyStateProblem, if any.

inline PeriodResult const &get_presimulation_result() const

Get the presimulation results.

Returns:

Presimulation results.

inline bool was_preequilibrated() const

Whether pre-equilibration was performed successfully.

Returns:

Public Members

Model *model

pointer to model instance

Solver *solver

pointer to solver instance

ExpData const *edata

pointer to experimental data instance