COPASI API
4.16.103
|
#include <CEigen.h>
Public Member Functions | |
void | calcEigenValues (const CMatrix< C_FLOAT64 > &matrix) |
CEigen (const std::string &name="NoName", const CCopasiContainer *pParent=NULL) | |
CEigen (const CEigen &src, const CCopasiContainer *pParent=NULL) | |
void | cleanup () |
const C_FLOAT64 & | getHierarchy () const |
const CVector< C_FLOAT64 > & | getI () const |
const C_FLOAT64 & | getMaximagpart () const |
const C_FLOAT64 & | getMaxrealpart () const |
const size_t & | getNcplxconj () const |
const size_t & | getNimag () const |
const size_t & | getNnegreal () const |
const size_t & | getNposreal () const |
const size_t & | getNreal () const |
const size_t & | getNzero () const |
const CVector< C_FLOAT64 > & | getR () const |
const C_FLOAT64 & | getStiffness () const |
void | initialize () |
virtual void | print (std::ostream *ostream) const |
void | stabilityAnalysis (const C_FLOAT64 &resolution) |
virtual | ~CEigen () |
![]() | |
virtual bool | add (CCopasiObject *pObject, const bool &adopt=true) |
CCopasiContainer (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=CCopasiObject::Container) | |
CCopasiContainer (const CCopasiContainer &src, const CCopasiContainer *pParent=NULL) | |
virtual std::string | getChildObjectUnits (const CCopasiObject *pObject) const |
virtual const CObjectInterface * | getObject (const CCopasiObjectName &cn) const |
virtual const objectMap & | getObjects () const |
virtual std::string | getUnits () const |
virtual const CCopasiObject * | getValueObject () const |
virtual bool | remove (CCopasiObject *pObject) |
virtual | ~CCopasiContainer () |
![]() | |
void | addDirectDependency (const CCopasiObject *pObject) |
CCopasiObject (const CCopasiObject &src, const CCopasiContainer *pParent=NULL) | |
void | clearDirectDependencies () |
void | clearRefresh () |
bool | dependsOn (DataObjectSet candidates, const DataObjectSet &context=DataObjectSet()) const |
void | getAllDependencies (DataObjectSet &dependencies, const DataObjectSet &context) const |
virtual CCopasiObjectName | getCN () const |
virtual const DataObjectSet & | getDirectDependencies (const DataObjectSet &context=DataObjectSet()) const |
virtual const std::string & | getKey () const |
CCopasiContainer * | getObjectAncestor (const std::string &type) const |
CCopasiDataModel * | getObjectDataModel () |
const CCopasiDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName (bool regular=true, bool richtext=false) const |
const std::string & | getObjectName () const |
CCopasiContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const |
virtual Refresh * | getRefresh () const |
UpdateMethod * | getUpdateMethod () const |
virtual void * | getValuePointer () const |
bool | hasCircularDependencies (DataObjectSet &candidates, DataObjectSet &verified, const DataObjectSet &context) const |
bool | hasUpdateMethod () const |
bool | isArray () const |
bool | isContainer () const |
bool | isDataModel () const |
bool | isMatrix () const |
bool | isNameVector () const |
bool | isNonUniqueName () const |
virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CMath::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const |
bool | isReference () const |
bool | isRoot () const |
bool | isSeparator () const |
bool | isStaticString () const |
bool | isValueBool () const |
bool | isValueDbl () const |
bool | isValueInt () const |
bool | isValueInt64 () const |
bool | isValueString () const |
bool | isVector () const |
virtual bool | mustBeDeleted (const DataObjectSet &deletedObjects) const |
void | removeDirectDependency (const CCopasiObject *pObject) |
void | setDirectDependencies (const DataObjectSet &directDependencies) |
bool | setObjectName (const std::string &name) |
virtual bool | setObjectParent (const CCopasiContainer *pParent) |
void | setObjectValue (const C_FLOAT64 &value) |
void | setObjectValue (const C_INT32 &value) |
void | setObjectValue (const bool &value) |
template<class CType > | |
void | setRefresh (CType *pType, void(CType::*method)(void)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const C_FLOAT64 &)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const C_INT32 &)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const bool &)) |
virtual | ~CCopasiObject () |
![]() | |
CObjectInterface () | |
virtual | ~CObjectInterface () |
Private Member Functions | |
void | initObjects () |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CEigen &A) |
Additional Inherited Members | |
![]() | |
typedef std::multimap < std::string, CCopasiObject * > | objectMap |
![]() | |
typedef std::set< const CCopasiObject * > | DataObjectSet |
typedef std::vector< Refresh * > | DataUpdateSequence |
![]() | |
typedef std::set< const CObjectInterface * > | ObjectSet |
typedef std::vector < CObjectInterface * > | UpdateSequence |
![]() | |
static std::vector< Refresh * > | buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet()) |
static void | setRenameHandler (CRenameHandler *rh) |
![]() | |
static const std::vector < CCopasiContainer * > | EmptyList |
![]() | |
enum | Flag { Container = 0x1, Vector = 0x2, Matrix = 0x4, NameVector = 0x8, Reference = 0x10, ValueBool = 0x20, ValueInt = 0x40, ValueInt64 = 0x80, ValueDbl = 0x100, NonUniqueName = 0x200, StaticString = 0x400, ValueString = 0x800, Separator = 0x1000, ModelEntity = 0x2000, Array = 0x4000, DataModel = 0x8000, Root = 0x10000, Gui = 0x20000 } |
![]() | |
template<class CType > | |
CCopasiObject * | addMatrixReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
template<class CType > | |
CCopasiObject * | addObjectReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
template<class CType > | |
CCopasiObject * | addVectorReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
void | initObjects () |
![]() | |
CCopasiObject () | |
CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0) | |
![]() | |
objectMap | mObjects |
![]() | |
static CRenameHandler * | smpRenameHandler = NULL |
File name: CEigen.h
Programmer: Yongqun He Contact email: yohe@ Purpose: This is the .h file for the class vt.e duCEigen. It is to calculate eigenvalues and eigenvectors of a matrix. It mainly uses the dgees_() subroutine of CLAPACK
CEigen::CEigen | ( | const std::string & | name = "NoName" , |
const CCopasiContainer * | pParent = NULL |
||
) |
Default constructor
const | std::string & name (default: "NoName") |
const | CCopasiContainer * pParent (default: NULL) |
File name: CEigen.cpp
Programmer: Yongqun He Contact email: yohe@ Purpose: This is the .cpp file for the class vt.e duCEigen. It is to calculate eigenvalues and eigenvectors of a matrix. Default constructor
Definition at line 50 of file CEigen.cpp.
References CONSTRUCTOR_TRACE, and initObjects().
CEigen::CEigen | ( | const CEigen & | src, |
const CCopasiContainer * | pParent = NULL |
||
) |
Copy constructor
const | CMetab & src |
const | CCopasiContainer * pParent (default: NULL) |
Definition at line 96 of file CEigen.cpp.
References CONSTRUCTOR_TRACE, and initObjects().
|
virtual |
Destructor
Deconstructor
Definition at line 144 of file CEigen.cpp.
References cleanup(), and DESTRUCTOR_TRACE.
Eigenvalue calculations
const | C_FLOAT64 * matrix |
const | unsigned C_INT32 & dim |
Definition at line 243 of file CEigen.cpp.
References CVectorCore< CType >::array(), CMatrix< CType >::array(), C_FLOAT64, C_INT, dgees_(), CCopasiMessage::EXCEPTION, fatalError, initialize(), mA, max, MCEigen, mI, mInfo, mJobvs, mLDA, mLdvs, mLWork, mN, mpBWork, mpVS, mR, mSdim, mSort, mWork, CMatrix< CType >::numCols(), CMatrix< CType >::numRows(), CMatrix< CType >::resize(), CVector< CType >::resize(), CMatrix< CType >::size(), and CCopasiMessage::WARNING.
Referenced by CSteadyStateTask::process().
void CEigen::cleanup | ( | ) |
Definition at line 240 of file CEigen.cpp.
Referenced by initialize(), and ~CEigen().
const C_FLOAT64 & CEigen::getHierarchy | ( | ) | const |
Definition at line 687 of file CEigen.cpp.
References mI.
Referenced by StateSubwidget::loadJacobian(), operator<<(), and CSteadyStateTask::process().
const C_FLOAT64 & CEigen::getMaximagpart | ( | ) | const |
Get the max eigenvalue imaginary part
Definition at line 202 of file CEigen.cpp.
References mMaximagpart.
const C_FLOAT64 & CEigen::getMaxrealpart | ( | ) | const |
Get the max eigenvalue real part
return the matrix Set the Matrix
Definition at line 196 of file CEigen.cpp.
References mMaxrealpart.
const size_t & CEigen::getNcplxconj | ( | ) | const |
Definition at line 666 of file CEigen.cpp.
References mNcplxconj.
const size_t & CEigen::getNimag | ( | ) | const |
Return the number of imaginary eigenvalue numbers
Definition at line 661 of file CEigen.cpp.
References mNimag.
Referenced by CLNATask::process().
const size_t & CEigen::getNnegreal | ( | ) | const |
Return the number of eigenvalues with negative real part
Definition at line 682 of file CEigen.cpp.
References mNnegreal.
const size_t & CEigen::getNposreal | ( | ) | const |
Return the number of eigenvalues with positive real part
Definition at line 674 of file CEigen.cpp.
References mNposreal.
Referenced by CLNATask::process().
const size_t & CEigen::getNreal | ( | ) | const |
Return number of real eigenvalues WeiSun 3/28/02
Definition at line 653 of file CEigen.cpp.
References mNreal.
const size_t & CEigen::getNzero | ( | ) | const |
Get the number of zero eigenvalues
Definition at line 208 of file CEigen.cpp.
References mNzero.
Referenced by CLNATask::process().
Definition at line 690 of file CEigen.cpp.
References mR.
Referenced by StateSubwidget::loadJacobian(), operator<<(), and CSteadyStateTask::process().
const C_FLOAT64 & CEigen::getStiffness | ( | ) | const |
void CEigen::initialize | ( | ) |
initialize variables for eigenvalue calculations
Definition at line 227 of file CEigen.cpp.
References cleanup(), mI, mLDA, mN, mNcplxconj, mNimag, mNnegreal, mNposreal, mNreal, mNzero, mR, and CVector< CType >::resize().
Referenced by calcEigenValues().
|
private |
Initialize the contained CCopasiObjects
Definition at line 152 of file CEigen.cpp.
References CCopasiContainer::addObjectReference(), CCopasiContainer::addVectorReference(), mBifurcationIndicator_Fold, mBifurcationIndicator_Fold_BDT, mBifurcationIndicator_Hopf, mBifurcationIndicator_Hopf_BDT, mFreqOfMaxComplex, mHierarchy, mI, mImagOfMaxComplex, mMaximagpart, mMaxRealOfComplex, mMaxrealpart, mNcplxconj, mNimag, mNnegreal, mNposreal, mNreal, mNzero, mOscillationIndicator, mOscillationIndicator_EV, mR, mResolution, mStiffness, CCopasiObject::ValueDbl, and CCopasiObject::ValueInt.
Referenced by CEigen().
|
virtual |
This is the output method for any object. The default implementation provided with CCopasiObject uses the ostream operator<< of the object to print the object.To overide this default behaviour one needs to reimplement the virtual print function.
std::ostream | * ostream |
Reimplemented from CCopasiObject.
Definition at line 150 of file CEigen.cpp.
Calculate various eigenvalue statistics
Definition at line 454 of file CEigen.cpp.
References CVectorCore< CType >::applyPivot(), CVectorCore< CType >::array(), C_FLOAT64, C_INT, C_INT32, mBifurcationIndicator_Fold, mBifurcationIndicator_Fold_BDT, mBifurcationIndicator_Hopf, mBifurcationIndicator_Hopf_BDT, mFreqOfMaxComplex, mHierarchy, mI, mImagOfMaxComplex, mMaximagpart, mMaxRealOfComplex, mMaxrealpart, mN, mNcplxconj, mNimag, mNnegreal, mNposreal, mNreal, mNzero, mOscillationIndicator, mOscillationIndicator_EV, mR, mResolution, mStiffness, CVectorCore< CType >::size(), and sortWithPivot().
Referenced by CSteadyStateTask::process().
|
friend |
Definition at line 693 of file CEigen.cpp.
#5: (input/output) The double precision array, dimension (LDA,N) On entry, the N-by-N matrix A On exit, A has been overwritten by its real Schur form T Use a pointer variable here instead of array since we don't know the dimension yet.
Definition at line 180 of file CEigen.h.
Referenced by calcEigenValues().
|
private |
A bifurcation test function, it is 0 for a Fold-type bifurcation.
Definition at line 126 of file CEigen.h.
Referenced by initObjects(), and stabilityAnalysis().
|
private |
A bifurcation test function, defined according to the "Bifurcation Discovery Tool", Chickarmane et al 2005
Definition at line 136 of file CEigen.h.
Referenced by initObjects(), and stabilityAnalysis().
|
private |
A bifurcation test function, it is 0 for a Hopf-bifurcation. Definition according to Kuznetsov. This is only a necessary, not a sufficient condition for a H.-bifurcation
Definition at line 121 of file CEigen.h.
Referenced by initObjects(), and stabilityAnalysis().
|
private |
A bifurcation test function, defined according to the "Bifurcation Discovery Tool", Chickarmane et al 2005
Definition at line 131 of file CEigen.h.
Referenced by initObjects(), and stabilityAnalysis().
|
private |
frequency of complex with largest real part
Definition at line 105 of file CEigen.h.
Referenced by initObjects(), and stabilityAnalysis().
|
private |
the hierary of the eigenvalues
Definition at line 89 of file CEigen.h.
Referenced by getHierarchy(), initObjects(), operator<<(), and stabilityAnalysis().
#9: array with dimension (mN)
Definition at line 203 of file CEigen.h.
Referenced by calcEigenValues(), getI(), initialize(), initObjects(), and stabilityAnalysis().
|
private |
imaginary part of complex with largest real part
Definition at line 100 of file CEigen.h.
Referenced by initObjects(), operator<<(), and stabilityAnalysis().
|
private |
#15: (output) an integer =0: successful exit <0: if mInfo=-i, the ith argument had an illegal value >0: if mInfo=i, and i is <=N: the QR algorithm failed to compute all the eigenvalues; =N+1: the eigenvalues could not be reordered because some eigenvalues were too close to separate (ill-conditioned) =N+2: after reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the Schur form no longer satisfy mSelect=.True. This could caused by underflow due to scaling
Definition at line 249 of file CEigen.h.
Referenced by calcEigenValues().
|
private |
#1: (input) characer*1 = 'N': Schur vectors are not computed = 'V': Schur vectors are computed
Definition at line 150 of file CEigen.h.
Referenced by calcEigenValues().
|
private |
#6: (input) The leading dimension of the array A. LDA >= max(1,N)
Definition at line 185 of file CEigen.h.
Referenced by calcEigenValues(), and initialize().
|
private |
#11: an integer, the leading dimension of the array VS. mLdvs >= 1; if mJobvs='V', mLdvs >= N.
Definition at line 216 of file CEigen.h.
Referenced by calcEigenValues().
|
private |
#13: (input) Dimension of array Work, its value >= max(1,3*mN). For good performance, it must generally be larger
Definition at line 228 of file CEigen.h.
Referenced by calcEigenValues().
|
private |
the imaginary part of the maximum eigenvalue
Definition at line 49 of file CEigen.h.
Referenced by getMaximagpart(), initObjects(), operator<<(), and stabilityAnalysis().
|
private |
largest real part of a complex eigenvalue. If there is no complex eigenvalue it will be the smallest ev.
Definition at line 95 of file CEigen.h.
Referenced by initObjects(), operator<<(), and stabilityAnalysis().
|
private |
the real part of the maximum eigenvalue
Definition at line 44 of file CEigen.h.
Referenced by getMaxrealpart(), initObjects(), operator<<(), and stabilityAnalysis().
|
private |
#4: (input) The order of the matrix A
Definition at line 171 of file CEigen.h.
Referenced by calcEigenValues(), initialize(), and stabilityAnalysis().
|
private |
Definition at line 74 of file CEigen.h.
Referenced by getNcplxconj(), initialize(), initObjects(), operator<<(), and stabilityAnalysis().
|
private |
the number of imaginary eigenvalue numbers
Definition at line 69 of file CEigen.h.
Referenced by getNimag(), initialize(), initObjects(), operator<<(), and stabilityAnalysis().
|
private |
the number of eigenvalues with negative real part
Definition at line 59 of file CEigen.h.
Referenced by getNnegreal(), initialize(), initObjects(), operator<<(), and stabilityAnalysis().
|
private |
the number of eigenvalues with positive real part
Definition at line 54 of file CEigen.h.
Referenced by getNposreal(), initialize(), initObjects(), operator<<(), and stabilityAnalysis().
|
private |
the number of real eigenvalues
Definition at line 64 of file CEigen.h.
Referenced by getNreal(), initialize(), initObjects(), operator<<(), and stabilityAnalysis().
|
private |
the number of eigenvalues with value of zero
Definition at line 79 of file CEigen.h.
Referenced by getNzero(), initialize(), initObjects(), operator<<(), and stabilityAnalysis().
|
private |
An index that is supposed to indicate the presence of oscillations
Definition at line 110 of file CEigen.h.
Referenced by initObjects(), and stabilityAnalysis().
|
private |
A heuristical index that is supposed to indicate the presence of oscillations, based on Eigenvalues
Definition at line 115 of file CEigen.h.
Referenced by initObjects(), and stabilityAnalysis().
|
private |
#14: (workspace) Logical array, dimension (N) Not referenced if mSort = 'N'
Definition at line 234 of file CEigen.h.
Referenced by calcEigenValues().
|
private |
|
private |
#10: (output) array with dimension (mLdvs, mN) If mJobvs='V', mVS contains the orthogoanl matrix Z of Schur vectors If mJobvs='N', mVS is not referenced
Definition at line 210 of file CEigen.h.
Referenced by calcEigenValues().
#8: array with dimension (mN)
Definition at line 198 of file CEigen.h.
Referenced by calcEigenValues(), getR(), initialize(), initObjects(), and stabilityAnalysis().
|
private |
The resolution of needed for the stability analysis
Definition at line 141 of file CEigen.h.
Referenced by initObjects(), operator<<(), and stabilityAnalysis().
|
private |
#7: (output) an integer if Sort = 'N', its value is 0 if Sort = 'S', its value = number of eigenvalues (after sorting) for which mSelect is true.
Definition at line 193 of file CEigen.h.
Referenced by calcEigenValues().
|
private |
#2: (input) characer*1 = 'N': Eigenvalues are not ordered = 'S': Eigenvalues are ordered
Definition at line 157 of file CEigen.h.
Referenced by calcEigenValues().
|
private |
the stiffness of eigenvalues
Definition at line 84 of file CEigen.h.
Referenced by getStiffness(), initObjects(), operator<<(), and stabilityAnalysis().
#12: (workspace/output) double precision array, dimension (mLWork) On exit, if mInfo=0; mWork(1) contains the optimal mLWork
Definition at line 222 of file CEigen.h.
Referenced by calcEigenValues().