Struct ModelStateDerived

Struct Documentation

struct ModelStateDerived

Storage for amici::Model quantities computed based on amici::ModelState for a specific timepoint.

Serves as workspace for a model simulation to avoid repeated reallocation.

Public Functions

ModelStateDerived() = default
explicit ModelStateDerived(ModelDimensions const &dim)

Constructor from model dimensions.

Parameters:

dimModel dimensions

inline ModelStateDerived(ModelStateDerived const &other)

Copy constructor

Parameters:

otherModelStateDerived object to copy

Public Members

sundials::Context sunctx_

SUNDIALS context

SUNMatrixWrapper J_

Sparse Jacobian (dimension: nx_solver x nx_solver, nnz: amici::Model::nnz)

SUNMatrixWrapper JB_

Sparse Backwards Jacobian (dimension: nx_solver x nx_solver, nnz:amici::Model::nnz)

SUNMatrixWrapper dxdotdw_

Sparse dxdotdw temporary storage (dimension: nx_solver x nw, nnz: ndxdotdw)

SUNMatrixWrapper dwdx_

Sparse dwdx temporary storage (dimension: nw x nx_solver, nnz:ndwdx)

SUNMatrixWrapper dwdp_

Sparse dwdp temporary storage (dimension: nw x np, nnz: ndwdp)

SUNMatrixWrapper M_

Dense Mass matrix (dimension: nx_solver x nx_solver)

SUNMatrixWrapper MSparse_

Sparse Mass matrix (dimension: nx_solver x nx_solver, nnz: sum(amici::Model::idlist))

SUNMatrixWrapper dfdx_

JSparse intermediate matrix (dimension: nx_solver x nx_solver, nnz: dynamic)

SUNMatrixWrapper dxdotdp_full

Temporary storage of dxdotdp_full data across functions (Python only) (dimension: nplist x nx_solver, nnz: dynamic, type CSC_MAT)

SUNMatrixWrapper dxdotdp_explicit

Temporary storage of dxdotdp_explicit data across functions (Python only) (dimension: nplist x nx_solver, nnz: ndxdotdp_explicit, type CSC_MAT)

SUNMatrixWrapper dxdotdp_implicit

Temporary storage of dxdotdp_implicit data across functions, Python-only (dimension: nplist x nx_solver, nnz: dynamic, type CSC_MAT)

SUNMatrixWrapper dxdotdx_explicit

Temporary storage of dxdotdx_explicit data across functions (Python only) (dimension: nplist x nx_solver, nnz: nxdotdotdx_explicit, type CSC_MAT)

SUNMatrixWrapper dxdotdx_implicit

Temporary storage of dxdotdx_implicit data across functions, Python-only (dimension: nplist x nx_solver, nnz: dynamic, type CSC_MAT)

SUNMatrixWrapper dx_rdatadx_solver

Temporary storage for dx_rdatadx_solver (dimension: nx_rdata x nx_solver, nnz: ndxrdatadxsolver, type: CSC_MAT)

SUNMatrixWrapper dx_rdatadtcl

Temporary storage for dx_rdatadtcl (dimension: nx_rdata x ncl, nnz: ndxrdatadtclr, type: CSC_MAT)

SUNMatrixWrapper dtotal_cldx_rdata

Temporary storage for dtotal_cldx_rdata (dimension: ncl x nx_rdata, nnz: ndtotal_cldx_rdata, type: CSC_MAT)

AmiVectorArray dxdotdp

Temporary storage of dxdotdp data across functions, Matlab only (dimension: nplist x nx_solver , row-major)

std::vector<SUNMatrixWrapper> dJydy_

Sparse observable derivative of data likelihood, only used if pythonGenerated == true (dimension nytrue, nJ x ny, row-major)

std::vector<realtype> dJydy_matlab_

Observable derivative of data likelihood, only used if pythonGenerated == false (dimension nJ x ny x nytrue , row-major)

std::vector<realtype> dJydsigma_

Observable sigma derivative of data likelihood (dimension nJ x ny x nytrue, row-major)

std::vector<realtype> dJydx_

State derivative of data likelihood (dimension nJ x nx_solver, row-major)

std::vector<realtype> dJydp_

Parameter derivative of data likelihood for current timepoint (dimension: nJ x nplist, row-major)

std::vector<realtype> dJzdz_

event output derivative of event likelihood (dimension nJ x nz x nztrue, row-major)

std::vector<realtype> dJzdsigma_

event sigma derivative of event likelihood (dimension nJ x nz x nztrue, row-major)

std::vector<realtype> dJrzdz_

event output derivative of event likelihood at final timepoint (dimension nJ x nz x nztrue, row-major)

std::vector<realtype> dJrzdsigma_

event sigma derivative of event likelihood at final timepoint (dimension nJ x nz x nztrue, row-major)

std::vector<realtype> dJzdx_

state derivative of event likelihood (dimension nJ x nx_solver, row-major)

std::vector<realtype> dJzdp_

parameter derivative of event likelihood for current timepoint (dimension: nJ x nplist x, row-major)

std::vector<realtype> dzdx_

state derivative of event output (dimension: nz x nx_solver, row-major)

std::vector<realtype> dzdp_

parameter derivative of event output (dimension: nz x nplist, row-major)

std::vector<realtype> drzdx_

state derivative of event regularization variable (dimension: nz x nx_solver, row-major)

std::vector<realtype> drzdp_

parameter derivative of event regularization variable (dimension: nz x nplist, row-major)

std::vector<realtype> dydp_

parameter derivative of observable (dimension: ny x nplist, row-major)

std::vector<realtype> dydx_

state derivative of time-resolved observable (dimension: nx_solver x ny, row-major)

std::vector<realtype> w_

temporary storage of w data across functions (dimension: nw)

std::vector<realtype> sx_

temporary storage for flattened sx, (dimension: nx_solver x nplist, row-major)

std::vector<realtype> sy_

temporary storage for sy, (dimension: ny x nplist, row-major)

std::vector<realtype> x_rdata_

temporary storage for x_rdata (dimension: nx_rdata)

std::vector<realtype> sx_rdata_

temporary storage for sx_rdata slice (dimension: nx_rdata)

std::vector<realtype> y_

temporary storage for time-resolved observable (dimension: ny)

std::vector<realtype> sigmay_

data standard deviation for current timepoint (dimension: ny)

std::vector<realtype> dsigmaydp_

temporary storage for parameter derivative of data standard deviation, (dimension: ny x nplist, row-major)

std::vector<realtype> dsigmaydy_

temporary storage for observable derivative of data standard deviation, (dimension: ny x ny, row-major)

std::vector<realtype> z_

temporary storage for event-resolved observable (dimension: nz)

std::vector<realtype> rz_

temporary storage for event regularization (dimension: nz)

std::vector<realtype> sigmaz_

temporary storage for event standard deviation (dimension: nz)

std::vector<realtype> dsigmazdp_

temporary storage for parameter derivative of event standard deviation, (dimension: nz x nplist, row-major)

std::vector<realtype> deltax_

temporary storage for change in x after event (dimension: nx_solver)

std::vector<realtype> deltasx_

temporary storage for change in sx after event (dimension: nx_solver x nplist, row-major)

std::vector<realtype> deltaxB_

temporary storage for change in xB after event (dimension: nx_solver)

std::vector<realtype> deltaqB_

temporary storage for change in qB after event (dimension: nJ x nplist, row-major)

SUNMatrixWrapper sspl_

temporary storage for sensitivity values of splines

AmiVector x_pos_tmp_

temporary storage of positified state variables according to stateIsNonNegative (dimension: nx_solver)

std::vector<realtype> spl_

temporary storage for spline values

std::vector<SUNMatrixWrapper> dwdp_hierarchical_

Sparse dwdp implicit temporary storage (shape ndwdp)

SUNMatrixWrapper dwdw_

Sparse dwdw temporary storage (shape ndwdw)

std::vector<SUNMatrixWrapper> dwdx_hierarchical_

Sparse dwdx implicit temporary storage (shape ndwdx)

SUNMatrixWrapper dJydy_dense_

Temporary storage for dense dJydy (dimension: nJ x ny)