copasi API
0.1
|
#include <CTSSAMethod.h>
Classes | |
struct | Data |
Public Member Functions | |
CTSSAMethod (const CTSSAMethod &src, const CCopasiContainer *pParent=NULL) | |
~CTSSAMethod () | |
const std::vector< std::string > | getTableName () const |
const CArrayAnnotation * | getTable (std::string name) |
virtual bool | setAnnotationM (int s)=0 |
void | setCurrentState (CState *currentState) |
void | setProblem (CTSSAProblem *problem) |
virtual void | step (const double &deltaT) |
virtual void | start (const CState *initialState) |
virtual bool | isValidProblem (const CCopasiProblem *pProblem) |
virtual void | initializeParameter () |
CVector< C_FLOAT64 > | getVec_TimeScale (int step) |
C_FLOAT64 | returnCurrentTime (int step) |
void | setVectors (int slowMode) |
void | emptyVectors () |
void | createAnnotationsM () |
Static Public Member Functions | |
static CTSSAMethod * | createTSSAMethod (CCopasiMethod::SubType subType=CCopasiMethod::unset, CTSSAProblem *pProblem=NULL) |
Public Attributes | |
std::map< std::string, CArrayAnnotation * > | mapTableToName |
std::vector< std::string > | tableNames |
std::vector< int > | mVec_SlowModes |
std::vector< C_FLOAT64 > | mCurrentTime |
std::vector< CVector< C_FLOAT64 > > | mVec_TimeScale |
int | mCurrentStep |
Protected Member Functions | |
CTSSAMethod (const CCopasiMethod::SubType &subType, const CCopasiContainer *pParent=NULL) | |
void | initializeIntegrationsParameter () |
bool | elevateChildren () |
void | integrationStep (const double &deltaT) |
void | integrationMethodStart (const CState *initialState) |
void | initializeAtol () |
void | evalF (const C_FLOAT64 *t, const C_FLOAT64 *y, C_FLOAT64 *ydot) |
void | schur (C_INT &info) |
void | schur_desc (C_INT &info) |
void | sylvester (C_INT slow, C_INT &info) |
void | map_index (C_FLOAT64 *eval_r, C_INT *index, const C_INT &dim) |
void | map_index_desc (C_FLOAT64 *eval_r, C_INT *index, const C_INT &dim) |
void | update_nid (C_INT *index, C_INT *nid, const C_INT &dim) |
void | update_pid (C_INT *index, C_INT *pid, const C_INT &dim) |
void | calculateDerivativesX (C_FLOAT64 *X1, C_FLOAT64 *Y1) |
void | mat_anal_mod (C_INT &slow) |
void | mat_anal_metab (C_INT &slow) |
void | mat_anal_mod_space (C_INT &slow) |
void | mat_anal_fast_space (C_INT &slow) |
void | mat_anal_fast_space_thomas (C_INT &slow) |
double | orthog (C_INT &number1, C_INT &number2) |
Static Protected Member Functions | |
static void | EvalF (const C_INT *n, const C_FLOAT64 *t, const C_FLOAT64 *y, C_FLOAT64 *ydot) |
Protected Attributes | |
CState * | mpCurrentState |
CTSSAProblem * | mpProblem |
CState * | mpState |
Data | mData |
C_FLOAT64 * | mY |
CVector< C_FLOAT64 > | mYdot |
CVector< C_FLOAT64 > | mY_initial |
C_FLOAT64 | mTime |
CMatrix< C_FLOAT64 > | mJacobian |
CMatrix< C_FLOAT64 > | mJacobian_initial |
CMatrix< C_FLOAT64 > | mQ |
CMatrix< C_FLOAT64 > | mQ_desc |
CMatrix< C_FLOAT64 > | mR |
CMatrix< C_FLOAT64 > | mR_desc |
CMatrix< C_FLOAT64 > | mTd |
CMatrix< C_FLOAT64 > | mTdInverse |
CMatrix< C_FLOAT64 > | mQz |
CMatrix< C_FLOAT64 > | mTd_save |
CMatrix< C_FLOAT64 > | mTdInverse_save |
CVector< C_FLOAT64 > | mCfast |
CVector< C_FLOAT64 > | mY_cons |
CMatrix< C_FLOAT64 > | mVslow |
CMatrix< C_FLOAT64 > | mVslow_metab |
CVector< C_FLOAT64 > | mVslow_space |
CVector< C_FLOAT64 > | mVfast_space |
C_INT | mSlow |
C_INT | mLsodaStatus |
bool | mReducedModel |
C_FLOAT64 | mRtol |
CVector< C_FLOAT64 > | mAtol |
std::ostringstream | mErrorMsg |
CLSODA | mLSODA |
C_INT | mState |
CVector< C_FLOAT64 > | mDWork |
CVector< C_INT > | mIWork |
C_INT | mJType |
CModel * | mpModel |
C_FLOAT64 | mDtol |
C_FLOAT64 | mEPS |
CTSSAMethod::CTSSAMethod | ( | const CCopasiMethod::SubType & | subType, |
const CCopasiContainer * | pParent = NULL |
||
) | [protected] |
Default constructor.
const | CCopasiMethod::SubType & subType |
const | CCopasiContainer * pParent (default: NULL) |
Default constructor.
CTSSAMethod::CTSSAMethod | ( | const CTSSAMethod & | src, |
const CCopasiContainer * | pParent = NULL |
||
) |
Copy constructor.
const CTSSAMethod & | src |
const | CCopasiContainer * pParent (default: NULL) |
Copy constructor.
const CTSSAMethod & | src |
CTSSAMethod::~CTSSAMethod | ( | ) |
Destructor.
void CTSSAMethod::calculateDerivativesX | ( | C_FLOAT64 * | X1, |
C_FLOAT64 * | Y1 | ||
) | [protected] |
void CTSSAMethod::createAnnotationsM | ( | ) |
create the CArraAnnotations for every ILDM-tab in the CQTSSAResultSubWidget input for each CArraAnnotations is a seperate CMatrix
Create the CArraAnnotations for every ILDM-tab in the CQTSSAResultSubWidget. Input for each CArraAnnotations is a separate CMatrix.
Reimplemented in CCSPMethod, CILDMMethod, and CILDMModifiedMethod.
CTSSAMethod * CTSSAMethod::createTSSAMethod | ( | CCopasiMethod::SubType | subType = CCopasiMethod::unset , |
CTSSAProblem * | pProblem = NULL |
||
) | [static] |
Create a time scale separation analysis method for a special problem. Note: the returned object has to be released after use with delete a problem is also passed so that the method has a chance to choose an appropriate simulation method.
CTSSAMethod class. This class describes the interface to all time scale separation analysis methods. The variaous method like ILDM or CSP have to be derived from this class.
bool CTSSAMethod::elevateChildren | ( | ) | [protected, virtual] |
This methods must be called to elevate subgroups to derived objects. The default implementation does nothing.
Reimplemented from CCopasiParameterGroup.
void CTSSAMethod::emptyVectors | ( | ) |
empty every vector to be able to fill them with new values for a new calculation also nullify the step counter
Empty every vector to be able to fill them with new values for a new calculation. Also nullify the step counter.
Reimplemented in CCSPMethod, CILDMMethod, and CILDMModifiedMethod.
void CTSSAMethod::EvalF | ( | const C_INT * | n, |
const C_FLOAT64 * | t, | ||
const C_FLOAT64 * | y, | ||
C_FLOAT64 * | ydot | ||
) | [static, protected] |
void CTSSAMethod::evalF | ( | const C_FLOAT64 * | t, |
const C_FLOAT64 * | y, | ||
C_FLOAT64 * | ydot | ||
) | [protected] |
This evaluates the derivatives
const CArrayAnnotation* CTSSAMethod::getTable | ( | std::string | name | ) | [inline] |
const std::vector<std::string> CTSSAMethod::getTableName | ( | ) | const [inline] |
CVector< C_FLOAT64 > CTSSAMethod::getVec_TimeScale | ( | int | step | ) |
return mVec_TimeScale for visualization in ILDM-tab in the CQTSSAResultSubWidget
void CTSSAMethod::initializeAtol | ( | ) | [protected] |
Calculate the individual absolute tolerance
void CTSSAMethod::initializeIntegrationsParameter | ( | ) | [protected] |
Intialize integration method parameters
void CTSSAMethod::initializeParameter | ( | ) | [virtual] |
Intialize the method parameter
Reimplemented in CCSPMethod, CILDMModifiedMethod, and CILDMMethod.
void CTSSAMethod::integrationMethodStart | ( | const CState * | initialState | ) | [protected] |
This instructs the method to prepare for integration starting with the initialState given.
const CState * | initialState |
void CTSSAMethod::integrationStep | ( | const double & | deltaT | ) | [protected] |
This instructs the method to calculate a time step of deltaT starting with the current state, i.e., the result of the previous step. The new state (after deltaT) is expected in the current state. The return value is the actual timestep taken.
const double & | deltaT |
bool CTSSAMethod::isValidProblem | ( | const CCopasiProblem * | pProblem | ) | [virtual] |
Check if the method is suitable for this problem
Reimplemented from CCopasiMethod.
void CTSSAMethod::map_index | ( | C_FLOAT64 * | eval_r, |
C_INT * | index, | ||
const C_INT & | dim | ||
) | [protected] |
MAP_INDEX used for sorting of SchurDecompostion
void CTSSAMethod::map_index_desc | ( | C_FLOAT64 * | eval_r, |
C_INT * | index, | ||
const C_INT & | dim | ||
) | [protected] |
This is the test only. We try to reorder the Schur matrix from slowest mode (on the bottom) to the fastest (on the top) The function map_index_desc() is used on the end of schur() in order to produce the orthogonal slow space
void CTSSAMethod::mat_anal_fast_space | ( | C_INT & | slow | ) | [protected] |
MAT_ANAL_fast_space: mathematical analysis of matrices mTdInverse for post-analysis
void CTSSAMethod::mat_anal_fast_space_thomas | ( | C_INT & | slow | ) | [protected] |
MAT_ANAL_fast_space: mathematical analysis of matrices mTdInverse for post-analysis
void CTSSAMethod::mat_anal_metab | ( | C_INT & | slow | ) | [protected] |
MAT_ANAL_METAB: mathematical analysis of matrices mTd for post-analysis
void CTSSAMethod::mat_anal_mod | ( | C_INT & | slow | ) | [protected] |
This is not very elegant solution. But I don't know the better one.
MAT_ANAL_MOD: mathematical analysis of matrices mTdInverse for post-analysis
void CTSSAMethod::mat_anal_mod_space | ( | C_INT & | slow | ) | [protected] |
MAT_ANAL_MOD_space: mathematical analysis of matrices mTdInverse for post-analysis
double CTSSAMethod::orthog | ( | C_INT & | number1, |
C_INT & | number2 | ||
) | [protected] |
C_FLOAT64 CTSSAMethod::returnCurrentTime | ( | int | step | ) | [inline] |
return required time-value from timevector
void CTSSAMethod::schur | ( | C_INT & | info | ) | [protected] |
SCHUR: Schur Decomposition of Jacobian (reordered). Output: mQ - transformation matrix mR - block upper triangular matrix (with ordered eigenvalues)
void CTSSAMethod::schur_desc | ( | C_INT & | info | ) | [protected] |
SCHUR_desc: Schur Decomposition of Jacobian (reordered). Output: mQ_desc - transformation matrix mR_desc - block upper triangular matrix (with ordered eigenvalues)
virtual bool CTSSAMethod::setAnnotationM | ( | int | s | ) | [pure virtual] |
Implemented in CCSPMethod, CILDMMethod, and CILDMModifiedMethod.
void CTSSAMethod::setCurrentState | ( | CState * | currentState | ) |
Set a pointer to the current state. This method is used by CTSSATask::process() The results of the simulation are passed via this CState variable
CState * | currentState |
void CTSSAMethod::setProblem | ( | CTSSAProblem * | problem | ) |
Set a pointer to the problem. This method is used by CTSSA
CTSSAProblem * | problem |
void CTSSAMethod::setVectors | ( | int | slowMode | ) |
upgrade all vectors with values from actually calculalion for current step
upgrade all vectors with values from actually calculation for current step
Reimplemented in CCSPMethod, CILDMMethod, and CILDMModifiedMethod.
virtual void CTSSAMethod::start | ( | const CState * | initialState | ) | [virtual] |
This instructs the method to prepare for integration starting with the initialState given.
const CState * | initialState |
Reimplemented in CCSPMethod, CILDMModifiedMethod, and CILDMMethod.
void CTSSAMethod::step | ( | const double & | deltaT | ) | [virtual] |
This instructs the method to calculate a time step of deltaT starting with the current state, i.e., the result of the previous step. The new state (after deltaT) is expected in the current state. The return value is the actual timestep taken.
const double & | deltaT |
This instructs the method to calculate a a time step of deltaT starting with the current state, i.e., the result of the previous step. The new state (after deltaT) is expected in the current state. The return value is the actual timestep taken.
const double & | deltaT |
This instructs the method to calculate a a time step of deltaT starting with the current state, i.e., the result of the previous step. The new state (after deltaT) is expected in the current state. The return value is the actual time step taken.
const double & | deltaT |
Reimplemented in CCSPMethod, CILDMModifiedMethod, and CILDMMethod.
void CTSSAMethod::sylvester | ( | C_INT | slow, |
C_INT & | info | ||
) | [protected] |
SYLVESTER: Solution of Sylvester equation for given slow, mQ,mR Output: mTd, mTdinverse, mQz (is used later for Newton iterations)
void CTSSAMethod::update_nid | ( | C_INT * | index, |
C_INT * | nid, | ||
const C_INT & | dim | ||
) | [protected] |
UPDATE_NID: used for sorting of SchurDecompostion
void CTSSAMethod::update_pid | ( | C_INT * | index, |
C_INT * | pid, | ||
const C_INT & | dim | ||
) | [protected] |
UPDATE_PID: used for sorting of SchurDecompostion
std::map< std::string, CArrayAnnotation* > CTSSAMethod::mapTableToName |
CVector< C_FLOAT64 > CTSSAMethod::mAtol [protected] |
A vector of absolute tolerances.
CVector<C_FLOAT64> CTSSAMethod::mCfast [protected] |
stepcounter
std::vector< C_FLOAT64 > CTSSAMethod::mCurrentTime |
Data CTSSAMethod::mData [protected] |
mData.dim is the dimension of the ODE system.
C_FLOAT64 CTSSAMethod::mDtol [protected] |
Tolerance for Deuflhard criterium
CVector< C_FLOAT64 > CTSSAMethod::mDWork [protected] |
LSODA C_FLOAT64 work area
C_FLOAT64 CTSSAMethod::mEPS [protected] |
std::ostringstream CTSSAMethod::mErrorMsg [protected] |
Stream to capture LSODA error messages
CVector< C_INT > CTSSAMethod::mIWork [protected] |
LSODA C_INT work area
CMatrix<C_FLOAT64> CTSSAMethod::mJacobian [protected] |
Jacobian matrix
CMatrix<C_FLOAT64> CTSSAMethod::mJacobian_initial [protected] |
Jacobian matrix at initial point
C_INT CTSSAMethod::mJType [protected] |
The way LSODA calculates the jacobian
CLSODA CTSSAMethod::mLSODA [protected] |
The LSODA integrator
C_INT CTSSAMethod::mLsodaStatus [protected] |
LSODA state.
CState* CTSSAMethod::mpCurrentState [protected] |
A pointer to the current state. This is set from outside with the setState() method and never changed anywhere else. Itīs used to report the results to the calling TSSATask
CModel* CTSSAMethod::mpModel [protected] |
A pointer to the model
CTSSAProblem* CTSSAMethod::mpProblem [protected] |
A pointer to the time scale separation analysis problem.
CState* CTSSAMethod::mpState [protected] |
A pointer to the current state in complete model view.
CMatrix<C_FLOAT64> CTSSAMethod::mQ [protected] |
CMatrix<C_FLOAT64> CTSSAMethod::mQ_desc [protected] |
CMatrix<C_FLOAT64> CTSSAMethod::mQz [protected] |
CMatrix<C_FLOAT64> CTSSAMethod::mR [protected] |
CMatrix<C_FLOAT64> CTSSAMethod::mR_desc [protected] |
bool CTSSAMethod::mReducedModel [protected] |
Whether to use the reduced model
C_FLOAT64 CTSSAMethod::mRtol [protected] |
Relative tolerance.
C_INT CTSSAMethod::mSlow [protected] |
C_INT CTSSAMethod::mState [protected] |
The state of the integrator
CMatrix<C_FLOAT64> CTSSAMethod::mTd [protected] |
CMatrix<C_FLOAT64> CTSSAMethod::mTd_save [protected] |
CMatrix<C_FLOAT64> CTSSAMethod::mTdInverse [protected] |
CMatrix<C_FLOAT64> CTSSAMethod::mTdInverse_save [protected] |
C_FLOAT64 CTSSAMethod::mTime [protected] |
Current time.
std::vector< int > CTSSAMethod::mVec_SlowModes |
vectors contain whole data for all calculationsteps
std::vector< CVector<C_FLOAT64> > CTSSAMethod::mVec_TimeScale |
CVector<C_FLOAT64> CTSSAMethod::mVfast_space [protected] |
CMatrix<C_FLOAT64> CTSSAMethod::mVslow [protected] |
CMatrix<C_FLOAT64> CTSSAMethod::mVslow_metab [protected] |
CVector<C_FLOAT64> CTSSAMethod::mVslow_space [protected] |
C_FLOAT64* CTSSAMethod::mY [protected] |
Pointer to the array with left hand side values.
CVector<C_FLOAT64> CTSSAMethod::mY_cons [protected] |
CVector< C_FLOAT64 > CTSSAMethod::mY_initial [protected] |
CVector< C_FLOAT64 > CTSSAMethod::mYdot [protected] |
Vector containig the derivatives after calling eval
std::vector<std::string> CTSSAMethod::tableNames |