Class SteadyStateBackwardProblem

Class Documentation

class SteadyStateBackwardProblem

The SteadyStateBackwardProblem class computes the adjoint state and quadratures for pre- or post-equilibration.

Public Functions

SteadyStateBackwardProblem(Solver const &solver, Model &model, SolutionState &final_state, gsl::not_null<BwdSimWorkspace*> ws)

SteadyStateBackwardProblem ctor.

Parameters:
  • solver

  • model

  • final_state – Final state from pre/post-equilibration forward problem

  • ws – Workspace for backward simulation

void run(realtype t0)

Compute the gradient via adjoint steady-state sensitivities.

Integrates over the adjoint state backward in time by solving a linear system of equations, which gives the analytical solution.

Expects the workspace ws_ to be initialized.

The results will be written to the workspace ws_.

Parameters:

t0 – Initial time for the steady state simulation.

inline double get_cpu_time_b() const

Get the CPU time taken to solve the backward problem.

Returns:

The CPU time in milliseconds.

inline int get_num_steps_b() const

Get the number of steps taken to find the steady state in the adjoint case.

Returns:

Number of steps.

AmiVector const &get_adjoint_state() const

Return the adjoint state.

Accessible only after run() has been called and before ws_ is used elsewhere.

Returns:

xB adjoint state

AmiVector const &get_adjoint_quadrature() const

Get the adjoint quadratures (xQB).

Accessible only after run() has been called and before ws_ is used elsewhere.

Returns:

xQB

inline bool has_quadrature() const

Accessor for has_quadrature_.

Returns:

has_quadrature_