Struct ModelStateDerived
Defined in File model_state.h
Struct Documentation

struct amici::ModelStateDerived
Storage for
amici::Model
quantities computed based onamici::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
dim – Model dimensions
Public Members

SUNMatrixWrapper J_
Sparse Jacobian (dimension:
amici::Model::nnz
)

SUNMatrixWrapper JB_
Sparse Backwards Jacobian (dimension:
amici::Model::nnz
)

SUNMatrixWrapper dxdotdw_
Sparse dxdotdw temporary storage (dimension:
ndxdotdw
)

SUNMatrixWrapper dwdx_
Sparse dwdx temporary storage (dimension:
ndwdx
)

SUNMatrixWrapper dwdp_
Sparse dwdp temporary storage (dimension:
ndwdp
)

SUNMatrixWrapper M_
Dense Mass matrix (dimension:
nx_solver
xnx_solver
)

SUNMatrixWrapper dxdotdp_full
Temporary storage of
dxdotdp_full
data across functions (Python only) (dimension:nplist
xnx_solver
, nnz: dynamic, typeCSC_MAT
)

SUNMatrixWrapper dxdotdp_explicit
Temporary storage of
dxdotdp_explicit
data across functions (Python only) (dimension:nplist
xnx_solver
, nnz:ndxdotdp_explicit
, typeCSC_MAT
)

SUNMatrixWrapper dxdotdp_implicit
Temporary storage of
dxdotdp_implicit
data across functions, Pythononly (dimension:nplist
xnx_solver
, nnz: dynamic, typeCSC_MAT
)

SUNMatrixWrapper dxdotdx_explicit
Temporary storage of
dxdotdx_explicit
data across functions (Python only) (dimension:nplist
xnx_solver
, nnz:nxdotdotdx_explicit
, typeCSC_MAT
)

SUNMatrixWrapper dxdotdx_implicit
Temporary storage of
dxdotdx_implicit
data across functions, Pythononly (dimension:nplist
xnx_solver
, nnz: dynamic, typeCSC_MAT
)

SUNMatrixWrapper dx_rdatadx_solver
Temporary storage for
dx_rdatadx_solver
(dimension:nx_rdata
xnx_solver
, nnz:ndxrdatadxsolver
, type:CSC_MAT
)

SUNMatrixWrapper dx_rdatadtcl
Temporary storage for
dx_rdatadtcl
(dimension:nx_rdata
xncl
, nnz:ndxrdatadtclr
, type:CSC_MAT
)

SUNMatrixWrapper dtotal_cldx_rdata
Temporary storage for
dtotal_cldx_rdata
(dimension:ncl
xnx_rdata
, nnz:ndtotal_cldx_rdata
, type:CSC_MAT
)

AmiVectorArray dxdotdp = {0, 0}
Temporary storage of
dxdotdp
data across functions, Matlab only (dimension:nplist
xnx_solver
, rowmajor)

std::vector<SUNMatrixWrapper> dJydy_
Sparse observable derivative of data likelihood, only used if
pythonGenerated
==true
(dimensionnytrue
,nJ
xny
, rowmajor)

std::vector<realtype> dJydy_matlab_
Observable derivative of data likelihood, only used if
pythonGenerated
==false
(dimensionnJ
xny
xnytrue
, rowmajor)

std::vector<realtype> dJydsigma_
Observable sigma derivative of data likelihood (dimension nJ x ny x nytrue, rowmajor)

std::vector<realtype> dJydx_
State derivative of data likelihood (dimension
nJ
xnx_solver
, rowmajor)

std::vector<realtype> dJydp_
Parameter derivative of data likelihood for current timepoint (dimension: nJ x nplist, rowmajor)

std::vector<realtype> dJzdz_
event output derivative of event likelihood (dimension nJ x nz x nztrue, rowmajor)

std::vector<realtype> dJzdsigma_
event sigma derivative of event likelihood (dimension nJ x nz x nztrue, rowmajor)

std::vector<realtype> dJrzdz_
event output derivative of event likelihood at final timepoint (dimension nJ x nz x nztrue, rowmajor)

std::vector<realtype> dJrzdsigma_
event sigma derivative of event likelihood at final timepoint (dimension nJ x nz x nztrue, rowmajor)

std::vector<realtype> dJzdx_
state derivative of event likelihood (dimension
nJ
xnx_solver
, rowmajor)

std::vector<realtype> dJzdp_
parameter derivative of event likelihood for current timepoint (dimension: nJ x nplist x, rowmajor)

std::vector<realtype> dzdx_
state derivative of event output (dimension: nz x
nx_solver
, rowmajor)

std::vector<realtype> dzdp_
parameter derivative of event output (dimension: nz x nplist, rowmajor)

std::vector<realtype> drzdx_
state derivative of event regularization variable (dimension:
nz
xnx_solver
, rowmajor)

std::vector<realtype> drzdp_
parameter derivative of event regularization variable (dimension: nz x nplist, rowmajor)

std::vector<realtype> dydx_
state derivative of timeresolved observable (dimension:
nx_solver
xny
, rowmajor)

std::vector<realtype> sx_
temporary storage for flattened sx, (dimension:
nx_solver
xnplist
, rowmajor)

std::vector<realtype> dsigmaydp_
temporary storage for parameter derivative of data standard deviation, (dimension: ny x nplist, rowmajor)

std::vector<realtype> dsigmaydy_
temporary storage for observable derivative of data standard deviation, (dimension: ny x ny, rowmajor)

std::vector<realtype> dsigmazdp_
temporary storage for parameter derivative of event standard deviation, (dimension: nz x nplist, rowmajor)

std::vector<realtype> deltasx_
temporary storage for change in sx after event (dimension:
nx_solver
xnplist
, rowmajor)

std::vector<realtype> deltaxB_
temporary storage for change in xB after event (dimension:
nx_solver
)

ModelStateDerived() = default