copasi API  0.1
Public Member Functions | Public Attributes | Friends
CCSPMethod Class Reference

#include <CCSPMethod.h>

Inheritance diagram for CCSPMethod:
CTSSAMethod CCopasiMethod CCopasiParameterGroup CCopasiParameter CCopasiContainer CCopasiObject

List of all members.

Public Member Functions

 CCSPMethod (const CCSPMethod &src, const CCopasiContainer *pParent=NULL)
 ~CCSPMethod ()
virtual void step (const double &deltaT)
virtual void start (const CState *initialState)
void initializeParameter ()
void smmult (CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B, CMatrix< C_FLOAT64 > &C, C_INT &n1, C_INT &n2, C_INT &n3)
void smsubst (CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B, CMatrix< C_FLOAT64 > &C, C_INT &n1, C_INT &n2)
void smadd (CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B, CMatrix< C_FLOAT64 > &C, C_INT &n1, C_INT &n2)
void smnorm (C_INT &n, CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B, C_INT &n1)
void perturbateA (C_INT &n, CMatrix< C_FLOAT64 > &A, C_FLOAT64 delta)
void sminverse (C_INT &n, CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B)
void modesAmplitude (C_INT &N, C_INT &M, CVector< C_FLOAT64 > &g, CMatrix< C_FLOAT64 > &B, CMatrix< C_FLOAT64 > &F)
void CSPradicalPointer (C_INT &N, C_INT &M, CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B)
void CSPParticipationIndex (C_INT &N, C_FLOAT64 &tauM1, CMatrix< C_FLOAT64 > &B0)
void CSPImportanceIndex (C_INT &N, C_FLOAT64 &tauM1, CMatrix< C_FLOAT64 > &Q)
void yCorrection (C_INT &N, C_INT &M, CVector< C_FLOAT64 > &y, CMatrix< C_FLOAT64 > &TAUM, CMatrix< C_FLOAT64 > &F, CMatrix< C_FLOAT64 > &A)
void basisRefinement (C_INT &N, C_INT &M, CMatrix< C_FLOAT64 > &ALA, CMatrix< C_FLOAT64 > &TAU, CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B, CMatrix< C_FLOAT64 > &A0, CMatrix< C_FLOAT64 > &B0)
void calculateJacobianX (C_INT &n, CVector< C_FLOAT64 > &y, CMatrix< C_FLOAT64 > &J)
void findTimeScaleSeparation (C_INT &n, C_INT &k, CVector< C_FLOAT64 > &tsc, C_INT &info)
void findCandidatesNumber (C_INT &n, C_INT &k, CVector< C_FLOAT64 > &tsc, C_INT &info)
bool modesAreExhausted (C_INT &N, C_INT &M, C_FLOAT64 &tauM, C_FLOAT64 &tauM1, CVector< C_FLOAT64 > &g, CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B, CMatrix< C_FLOAT64 > &F)
C_INT isBlockDiagonal (C_INT &N, C_INT &M, CMatrix< C_FLOAT64 > &ALA, C_FLOAT64 small)
void cspstep (const double &deltaT, C_INT &n, C_INT &m, CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B)
void emptyOutputData (C_INT &N, C_INT &M, C_INT &R)
void CSPOutput (C_INT &N, C_INT &M, C_INT &R)
const CArrayAnnotationgetAmplitudeAnn () const
const CArrayAnnotationgetRadicalPointerAnn () const
const CArrayAnnotationgetFastReactionPointerAnn () const
const CArrayAnnotationgetFastReactionPointerNormedAnn () const
const CArrayAnnotationgetParticipationIndexAnn () const
const CArrayAnnotationgetParticipationIndexNormedRowAnn () const
const CArrayAnnotationgetParticipationIndexNormedColumnAnn () const
const CArrayAnnotationgetImportanceIndexAnn () const
const CArrayAnnotationgetImportanceIndexNormedRowAnn () const
void setVectors (int fast)
void emptyVectors ()
void createAnnotationsM ()
bool setAnnotationM (int step)
void printResult (std::ostream *ostream) const

Public Attributes

CMatrix< C_FLOAT64 > mI
C_FLOAT64 mEps
C_FLOAT64 mTsc
C_FLOAT64 mRerror
C_FLOAT64 mAerror
C_INT mIter
CVector< C_FLOAT64 > mG
CVector< C_FLOAT64 > mYerror
CMatrix< C_FLOAT64 > mB
C_INT mTStep
C_INT mCSPbasis
C_INT mSetVectors
CVector< C_FLOAT64 > mAmplitude
CMatrix< C_FLOAT64 > mRadicalPointer
CMatrix< C_FLOAT64 > mFastReactionPointer
CMatrix< C_FLOAT64 > mFastReactionPointerNormed
CMatrix< C_FLOAT64 > mParticipationIndex
CMatrix< C_FLOAT64 > mParticipationIndexNormedRow
CMatrix< C_FLOAT64 > mParticipationIndexNormedColumn
CMatrix< C_FLOAT64 > mImportanceIndex
CMatrix< C_FLOAT64 > mImportanceIndexNormedRow
std::vector< CMatrix< C_FLOAT64 > > mVec_mAmplitude
std::vector< CMatrix< C_FLOAT64 > > mVec_mRadicalPointer
std::vector< CMatrix< C_FLOAT64 > > mVec_mFastReactionPointer
std::vector< CMatrix< C_FLOAT64 > > mVec_mFastReactionPointerNormed
std::vector< CMatrix< C_FLOAT64 > > mVec_mParticipationIndex
std::vector< CMatrix< C_FLOAT64 > > mVec_mParticipationIndexNormedRow
std::vector< CMatrix< C_FLOAT64 > > mVec_mParticipationIndexNormedColumn
std::vector< CMatrix< C_FLOAT64 > > mVec_mImportanceIndex
std::vector< CMatrix< C_FLOAT64 > > mVec_mImportanceIndexNormedRow
CArrayAnnotationpAmplitudeAnn
CArrayAnnotationpRadicalPointerAnn
CArrayAnnotationpFastReactionPointerAnn
CArrayAnnotationpFastReactionPointerNormedAnn
CArrayAnnotationpParticipationIndexAnn
CArrayAnnotationpParticipationIndexNormedRowAnn
CArrayAnnotationpParticipationIndexNormedColumnAnn
CArrayAnnotationpImportanceIndexAnn
CArrayAnnotationpImportanceIndexNormedRowAnn
CArrayAnnotationpTmp1
CArrayAnnotationpTmp2
CArrayAnnotationpTmp3
CArrayAnnotationpTmp3Normed
CArrayAnnotationpTmp4
CArrayAnnotationpTmp4NormedColumn
CArrayAnnotationpTmp4NormedRow
CArrayAnnotationpTmp5
CArrayAnnotationpTmp5NormedRow
CMatrix< C_FLOAT64 > mAmplitudeTab
CMatrix< C_FLOAT64 > mRadicalPointerTab
CMatrix< C_FLOAT64 > mFastReactionPointerTab
CMatrix< C_FLOAT64 > mFastReactionPointerNormedTab
CMatrix< C_FLOAT64 > mParticipationIndexTab
CMatrix< C_FLOAT64 > mParticipationIndexNormedRowTab
CMatrix< C_FLOAT64 > mParticipationIndexNormedColumnTab
CMatrix< C_FLOAT64 > mImportanceIndexTab
CMatrix< C_FLOAT64 > mImportanceIndexNormedRowTab

Friends

CTSSAMethodCTSSAMethod::createTSSAMethod (CCopasiMethod::SubType subType, CTSSAProblem *pProblem)

Constructor & Destructor Documentation

CCSPMethod::CCSPMethod ( const CCSPMethod src,
const CCopasiContainer pParent = NULL 
)

Copy constructor.

Parameters:
const CCSPMethod &src
constCCopasiContainer * pParent (default: NULL)
CCSPMethod::~CCSPMethod ( )

Destructor.


Member Function Documentation

void CCSPMethod::basisRefinement ( C_INT &  N,
C_INT &  M,
CMatrix< C_FLOAT64 > &  ALA,
CMatrix< C_FLOAT64 > &  TAU,
CMatrix< C_FLOAT64 > &  A,
CMatrix< C_FLOAT64 > &  B,
CMatrix< C_FLOAT64 > &  A0,
CMatrix< C_FLOAT64 > &  B0 
)

Refinement Procedre : Lamm, Combustion Science and Technoligy, 1993.

void CCSPMethod::calculateJacobianX ( C_INT &  n,
CVector< C_FLOAT64 > &  y,
CMatrix< C_FLOAT64 > &  J 
)

evaluate Jacobian for the current y

void CCSPMethod::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 from CTSSAMethod.

void CCSPMethod::CSPImportanceIndex ( C_INT &  N,
C_FLOAT64 &  tauM1,
CMatrix< C_FLOAT64 > &  Q 
)

compute CSP Importance Index

compute CSP Importance Index : a measure of relative importance of the contribution of r-th elementary reaction to the current reaction rate of the i-th species

void CCSPMethod::CSPOutput ( C_INT &  N,
C_INT &  M,
C_INT &  R 
)

CSP output

void CCSPMethod::CSPParticipationIndex ( C_INT &  N,
C_FLOAT64 &  tauM1,
CMatrix< C_FLOAT64 > &  B0 
)

compute CSP Participation Index

compute CSP Participation Index: a measure of participation of the r-th elementary reaction to the balancing act of the i-th mode It is assumed that forward and reverse reactions are counted as distinct

void CCSPMethod::CSPradicalPointer ( C_INT &  N,
C_INT &  M,
CMatrix< C_FLOAT64 > &  A,
CMatrix< C_FLOAT64 > &  B 
)

compute CSP radical pointer and fast reaction pointers

some comments on the Qm matrix: Qm(i,i) , i = 0,1,...,N, is a measure of projection of i-th unit vector in the m-th mode, whenever Qm(i,i) is not a small number, species m is said to be a CSP radical

Pmr is a measure of projection of r-th stoichiometric vector in the m-th mode, whenever Pmr is not a small number, the r-th reaction is said to be a fast reaction

void CCSPMethod::cspstep ( const double &  deltaT,
C_INT &  n,
C_INT &  m,
CMatrix< C_FLOAT64 > &  A,
CMatrix< C_FLOAT64 > &  B 
)

Start procedure of the CSP algorithm. S.H. Lam and D.A. Gaussis, International Journal of Chemical Kinetics, 26, pp. 461-486, 1994

compute CSP Participation Index: a measure of participation of the r-th elementary reaction to the balancing act of the i-th mode It is assumed that forward and reverse reactions are counted as distinct

compute CSP Importance Index : a measure of relative importance of the contribution of r-th elementary reaction to the current reaction rate of the i-th species

void CCSPMethod::emptyOutputData ( C_INT &  N,
C_INT &  M,
C_INT &  R 
)

CSP output : empty

void CCSPMethod::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 from CTSSAMethod.

void CCSPMethod::findCandidatesNumber ( C_INT &  n,
C_INT &  k,
CVector< C_FLOAT64 > &  tsc,
C_INT &  info 
)

find the number of candidates to fast according to the time-scale separation ratio

void CCSPMethod::findTimeScaleSeparation ( C_INT &  n,
C_INT &  k,
CVector< C_FLOAT64 > &  tsc,
C_INT &  info 
)

find the new number of fast according to the time-scale separation ratio

const CArrayAnnotation* CCSPMethod::getAmplitudeAnn ( ) const [inline]

return CArrayAnnotation for visualization in ILDM-tab in the CQTSSAResultSubWidget

const CArrayAnnotation* CCSPMethod::getFastReactionPointerAnn ( ) const [inline]
const CArrayAnnotation* CCSPMethod::getFastReactionPointerNormedAnn ( ) const [inline]
const CArrayAnnotation* CCSPMethod::getImportanceIndexAnn ( ) const [inline]
const CArrayAnnotation* CCSPMethod::getImportanceIndexNormedRowAnn ( ) const [inline]
const CArrayAnnotation* CCSPMethod::getParticipationIndexAnn ( ) const [inline]
const CArrayAnnotation* CCSPMethod::getParticipationIndexNormedColumnAnn ( ) const [inline]
const CArrayAnnotation* CCSPMethod::getParticipationIndexNormedRowAnn ( ) const [inline]
const CArrayAnnotation* CCSPMethod::getRadicalPointerAnn ( ) const [inline]
void CCSPMethod::initializeParameter ( ) [virtual]

Intialize the method parameter

Reimplemented from CTSSAMethod.

C_INT CCSPMethod::isBlockDiagonal ( C_INT &  N,
C_INT &  M,
CMatrix< C_FLOAT64 > &  ALA,
C_FLOAT64  small 
)

compute the norm C of the off-diagonal blocks

void CCSPMethod::modesAmplitude ( C_INT &  N,
C_INT &  M,
CVector< C_FLOAT64 > &  g,
CMatrix< C_FLOAT64 > &  B,
CMatrix< C_FLOAT64 > &  F 
)

compute amplitudes of fast and slow modes

bool CCSPMethod::modesAreExhausted ( C_INT &  N,
C_INT &  M,
C_FLOAT64 &  tauM,
C_FLOAT64 &  tauM1,
CVector< C_FLOAT64 > &  g,
CMatrix< C_FLOAT64 > &  A,
CMatrix< C_FLOAT64 > &  B,
CMatrix< C_FLOAT64 > &  F 
)

check : whether each of the analysed M modes is exhausted

void CCSPMethod::perturbateA ( C_INT &  n,
CMatrix< C_FLOAT64 > &  A,
C_FLOAT64  delta 
)

TEST: perturbate basis vectors A

void CCSPMethod::printResult ( std::ostream *  ostream) const [virtual]

print of the standart report sequence for ILDM Method

Parameters:
std::ostream* ostream

Reimplemented from CCopasiMethod.

bool CCSPMethod::setAnnotationM ( int  step) [virtual]

set the every CArrayAnnotation for the requested step set the desription of CArayAnnotation for both dimensions

Set the every CArrayAnnotation for the requested step. Set also the description of CArayAnnotation for both dimensions:

  • dimension description could consists of some std::strings some strings contain the Time Scale values for requested step
  • dimension description could consists of arrays of CommonNames

Implements CTSSAMethod.

void CCSPMethod::setVectors ( int  fast)

upgrade all vectors with values from actually calculalion for current step

upgrade all vectors with values from actually calculation for current step

Reimplemented from CTSSAMethod.

void CCSPMethod::smadd ( CMatrix< C_FLOAT64 > &  A,
CMatrix< C_FLOAT64 > &  B,
CMatrix< C_FLOAT64 > &  C,
C_INT &  n1,
C_INT &  n2 
)

Addition of submatrix

void CCSPMethod::sminverse ( C_INT &  n,
CMatrix< C_FLOAT64 > &  A,
CMatrix< C_FLOAT64 > &  B 
)

Inverse submatrix

void CCSPMethod::smmult ( CMatrix< C_FLOAT64 > &  A,
CMatrix< C_FLOAT64 > &  B,
CMatrix< C_FLOAT64 > &  C,
C_INT &  n1,
C_INT &  n2,
C_INT &  n3 
)

CSP related staff Multiplication of submatrix

void CCSPMethod::smnorm ( C_INT &  n,
CMatrix< C_FLOAT64 > &  A,
CMatrix< C_FLOAT64 > &  B,
C_INT &  n1 
)

Normalize submatrix

void CCSPMethod::smsubst ( CMatrix< C_FLOAT64 > &  A,
CMatrix< C_FLOAT64 > &  B,
CMatrix< C_FLOAT64 > &  C,
C_INT &  n1,
C_INT &  n2 
)

Substruction of submatrix

void CCSPMethod::start ( const CState initialState) [virtual]

This instructs the method to prepare for integration starting with the initialState given.

Parameters:
const CState *initialState

Reimplemented from CTSSAMethod.

void CCSPMethod::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.

Parameters:
const double &deltaT

Reimplemented from CTSSAMethod.

void CCSPMethod::yCorrection ( C_INT &  N,
C_INT &  M,
CVector< C_FLOAT64 > &  y,
CMatrix< C_FLOAT64 > &  TAUM,
CMatrix< C_FLOAT64 > &  F,
CMatrix< C_FLOAT64 > &  A 
)

correct for the contribution of the fast time-scales to y


Friends And Related Function Documentation

CTSSAMethod* CTSSAMethod::createTSSAMethod ( CCopasiMethod::SubType  subType,
CTSSAProblem pProblem 
) [friend]

Member Data Documentation

A maximux absolute error

Amplitudes of reaction modes (column vector);

input for every CArraAnnotations contain data for single stepcalculation

CMatrix<C_FLOAT64> CCSPMethod::mB

The basis vectors B from the time step (T - delta T)

indicates whether the basis vectors B were computed on the time step (T - delta T)

C_FLOAT64 CCSPMethod::mEps

A value related to a mesure of the time scale separation of the fast and slow modes

Fast Reaction Pointer of the m-th reaction mode : whenever is not a small number, the r-th reaction is said to be a fast reaction

CVector<C_FLOAT64> CCSPMethod::mG

A vector of the current right hand side

CMatrix<C_FLOAT64> CCSPMethod::mI

CSP related staff Unit matrix

Importance Index: is a mesure of relative importance of the contribution of r-th elementary reaction to the current reaction rate of i-th spiecies

Max number of the refinement iterations

Participation Index : is a mesure of participation of the r-th elementary reaction to the balancing act of the i-th mode (matrix)

Radical Pointer: whenever is not a small number, species k is said to be CSP radical

A maximux relative error

CSP Output

C_FLOAT64 CCSPMethod::mTsc

An alternative value related to a mesure of the time scale separation of the fast and slow modes

std::vector< CMatrix<C_FLOAT64> > CCSPMethod::mVec_mAmplitude

vectors contain whole data for all calculation steps

std::vector< CMatrix<C_FLOAT64> > CCSPMethod::mVec_mImportanceIndex
std::vector< CMatrix<C_FLOAT64> > CCSPMethod::mVec_mParticipationIndex
std::vector< CMatrix<C_FLOAT64> > CCSPMethod::mVec_mRadicalPointer

An error vector build on the basis of the solution vector

CArraAnnotations for CQTSSAResultSubWidget

required for creation of above listed CArrayAnnotation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines