COPASI API
4.40.278
|
#include <CEigen.h>
Public Member Functions | |
void | calcEigenValues (const CMatrix< C_FLOAT64 > &matrix) |
CEigen (const CEigen &src, const CDataContainer *pParent) | |
CEigen (const std::string &name="NoName", const CDataContainer *pParent=NO_PARENT) | |
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 () |
Public Member Functions inherited from CDataContainer | |
virtual bool | add (CDataObject *pObject, const bool &adopt=true) |
virtual bool | appendDeletedDependentData (CUndoData &undoData) const |
virtual bool | applyData (const CData &data, CUndoData::CChangeSet &changes) override |
CDataContainer (const CDataContainer &src, const CDataContainer *pParent) | |
CDataContainer (const std::string &name, const CDataContainer *pParent=NO_PARENT, const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
virtual void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const override |
virtual std::string | getChildObjectUnits (const CDataObject *pObject) const |
void | getDescendants (CDataObject::DataObjectSet &descendants, const bool &recursive=false) const |
virtual size_t | getIndex (const CDataObject *pObject) const |
virtual const CObjectInterface * | getObject (const CCommonName &cn) const override |
virtual objectMap & | getObjects () |
virtual const objectMap & | getObjects () const |
virtual const std::string | getUnits () const override |
virtual const CDataObject * | getValueObject () const override |
virtual CUndoObjectInterface * | insert (const CData &data) override |
void | objectRenamed (CDataObject *pObject, const std::string &oldName) |
virtual bool | remove (CDataObject *pObject) |
virtual CData | toData () const override |
virtual | ~CDataContainer () |
Public Member Functions inherited from CDataObject | |
void | addIssue (const CIssue &issue) |
void | addReference (const CDataContainer *pReference) |
virtual void | calculateValue () override |
CDataObject (const CDataObject &src, const CDataContainer *pParent=NULL) | |
virtual void | destruct () override |
virtual CCommonName | getCN () const override |
virtual const CDataObject * | getDataObject () const override |
virtual const std::string & | getKey () const |
CDataContainer * | getObjectAncestor (const std::string &type) const |
CDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName () const override |
const CObjectInterface * | getObjectFromCN (const CCommonName &cn) const |
const std::string & | getObjectName () const |
CDataContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const override |
virtual const CValidity & | getValidity () const override |
virtual void * | getValuePointer () const override |
bool | hasFlag (const Flag &flag) const |
virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const override |
bool | prerequisitsContains (const DataObjectSet &objects) const |
void | removeIssue (const CIssue &issue) |
void | removeReference (const CDataContainer *pReference) |
bool | setObjectName (const std::string &name) |
virtual bool | setObjectParent (const CDataContainer *pParent) |
void | validityChanged (const CValidity &changedValidity) override |
void | validityRemoved (const CValidity &changedValidity) |
virtual | ~CDataObject () |
Public Member Functions inherited from CObjectInterface | |
CObjectInterface () | |
CObjectInterface (const CObjectInterface &src) | |
virtual | ~CObjectInterface () |
Public Member Functions inherited from CUndoObjectInterface | |
CUndoObjectInterface () | |
CUndoObjectInterface (const CUndoObjectInterface &src) | |
bool | generateUuid () |
const xg::Guid & | getUuid () const |
bool | setUuid (const std::string &uuid) |
bool | setUuid (const xg::Guid &uuid) |
virtual void | updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject) |
virtual | ~CUndoObjectInterface () |
Private Member Functions | |
void | initObjects () |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CEigen &A) |
Additional Inherited Members | |
Public Types inherited from CDataContainer | |
typedef CDataObjectMap | objectMap |
Public Types inherited from CDataObject | |
typedef std::set< const CDataObject * > | DataObjectSet |
enum | Flag { Container , Vector , Matrix , NameVector , Reference , ValueBool , ValueInt , ValueInt64 , ValueDbl , NonUniqueName , StaticString , ValueString , Separator , DisplayName , ModelEntity , Array , DataModel , Root , Gui , __SIZE } |
Public Types inherited from CObjectInterface | |
typedef std::vector< const CDataContainer * > | ContainerList |
typedef std::set< const CObjectInterface * > | ObjectSet |
Static Public Member Functions inherited from CDataContainer | |
static CDataContainer * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CDataObject | |
static CDataObject * | fromData (const CData &data, CUndoObjectInterface *pParent) |
static void | sanitizeObjectName (std::string &name) |
Static Public Member Functions inherited from CObjectInterface | |
static const CDataObject * | DataObject (const CObjectInterface *pInterface) |
static CObjectInterface * | GetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName) |
Static Public Member Functions inherited from CUndoObjectInterface | |
template<class CType > | |
static CType * | fromData (const CData &, CUndoObjectInterface *) |
Static Public Attributes inherited from CDataContainer | |
static const CObjectInterface::ContainerList | EmptyList |
Protected Member Functions inherited from CDataContainer | |
template<class CType > | |
CDataMatrixReference< CType > * | addMatrixReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataObjectReference< CType > * | addObjectReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataVectorReference< CType > * | addVectorReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
CDataContainer (const CDataContainer &src) | |
void | initObjects () |
Protected Member Functions inherited from CDataObject | |
CDataObject () | |
CDataObject (const std::string &name, const CDataContainer *pParent=static_cast< CDataContainer * >((void *) 0), const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
Protected Attributes inherited from CDataContainer | |
objectMap | mObjects |
Protected Attributes inherited from CDataObject | |
ObjectSet | mPrerequisits |
std::set< CDataContainer * > | mReferences |
Protected Attributes inherited from CObjectInterface | |
CValidity | mValidity |
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 CDataContainer * | pParent = NO_PARENT |
||
) |
Default constructor
const | std::string & name (default: "NoName") |
const | CDataContainer * 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
References CONSTRUCTOR_TRACE, and initObjects().
CEigen::CEigen | ( | const CEigen & | src, |
const CDataContainer * | pParent | ||
) |
Copy constructor
const | CMetab & src |
const | CDataContainer * pParent (default: NULL) |
References CONSTRUCTOR_TRACE, and initObjects().
|
virtual |
Eigenvalue calculations
const | C_FLOAT64 * matrix |
const | unsigned C_INT32 & dim |
References CMatrix< CType >::array(), CVectorCore< 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 | ( | ) |
Referenced by initialize(), and ~CEigen().
const C_FLOAT64 & CEigen::getHierarchy | ( | ) | const |
Get the eigenvalue hierarchy
References mHierarchy.
References mI.
Referenced by CSteadyStateTask::process().
const C_FLOAT64 & CEigen::getMaximagpart | ( | ) | const |
Get the max eigenvalue imaginary part
References mMaximagpart.
const C_FLOAT64 & CEigen::getMaxrealpart | ( | ) | const |
const size_t & CEigen::getNcplxconj | ( | ) | const |
References mNcplxconj.
const size_t & CEigen::getNimag | ( | ) | const |
Return the number of imaginary eigenvalue numbers
References mNimag.
Referenced by CLNATask::process().
const size_t & CEigen::getNnegreal | ( | ) | const |
Return the number of eigenvalues with negative real part
References mNnegreal.
const size_t & CEigen::getNposreal | ( | ) | const |
Return the number of eigenvalues with positive real part
References mNposreal.
Referenced by CLNATask::process().
const size_t & CEigen::getNreal | ( | ) | const |
Return number of real eigenvalues WeiSun 3/28/02
References mNreal.
const size_t & CEigen::getNzero | ( | ) | const |
References mR.
Referenced by CSteadyStateTask::process().
const C_FLOAT64 & CEigen::getStiffness | ( | ) | const |
Get the eigenvalue stiffness
References mStiffness.
void CEigen::initialize | ( | ) |
initialize variables for eigenvalue calculations
References cleanup(), mI, mLDA, mN, mNcplxconj, mNimag, mNnegreal, mNposreal, mNreal, mNzero, mR, and CVector< CType >::resize().
Referenced by calcEigenValues().
|
private |
Initialize the contained CDataObjects
References CDataContainer::addObjectReference(), CDataContainer::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, CDataObject::ValueDbl, and CDataObject::ValueInt.
Referenced by CEigen().
|
virtual |
This is the output method for any object. The default implementation provided with CDataObject 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 CDataObject.
void CEigen::stabilityAnalysis | ( | const C_FLOAT64 & | resolution | ) |
Calculate various eigenvalue statistics
References CVectorCore< CType >::applyPivot(), CVectorCore< CType >::array(), C_FLOAT64, C_INT, 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 |
#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.
Referenced by calcEigenValues().
|
private |
A bifurcation test function, it is 0 for a Fold-type bifurcation.
Referenced by initObjects(), and stabilityAnalysis().
|
private |
A bifurcation test function, defined according to the "Bifurcation Discovery Tool", Chickarmane et al 2005
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
Referenced by initObjects(), and stabilityAnalysis().
|
private |
A bifurcation test function, defined according to the "Bifurcation Discovery Tool", Chickarmane et al 2005
Referenced by initObjects(), and stabilityAnalysis().
|
private |
frequency of complex with largest real part
Referenced by initObjects(), and stabilityAnalysis().
|
private |
the hierary of the eigenvalues
Referenced by getHierarchy(), initObjects(), and stabilityAnalysis().
#9: array with dimension (mN)
Referenced by calcEigenValues(), getI(), initialize(), initObjects(), and stabilityAnalysis().
|
private |
imaginary part of complex with largest real part
Referenced by initObjects(), 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
Referenced by calcEigenValues().
|
private |
#1: (input) characer*1 = 'N': Schur vectors are not computed = 'V': Schur vectors are computed
Referenced by calcEigenValues().
|
private |
#6: (input) The leading dimension of the array A. LDA >= max(1,N)
Referenced by calcEigenValues(), and initialize().
|
private |
#11: an integer, the leading dimension of the array VS. mLdvs >= 1; if mJobvs='V', mLdvs >= N.
Referenced by calcEigenValues().
|
private |
#13: (input) Dimension of array Work, its value >= max(1,3*mN). For good performance, it must generally be larger
Referenced by calcEigenValues().
|
private |
the imaginary part of the maximum eigenvalue
Referenced by getMaximagpart(), initObjects(), and stabilityAnalysis().
|
private |
largest real part of a complex eigenvalue. If there is no complex eigenvalue it will be the smallest ev.
Referenced by initObjects(), and stabilityAnalysis().
|
private |
the real part of the maximum eigenvalue
Referenced by getMaxrealpart(), initObjects(), and stabilityAnalysis().
|
private |
#4: (input) The order of the matrix A
Referenced by calcEigenValues(), initialize(), and stabilityAnalysis().
|
private |
Referenced by getNcplxconj(), initialize(), initObjects(), and stabilityAnalysis().
|
private |
the number of imaginary eigenvalue numbers
Referenced by getNimag(), initialize(), initObjects(), and stabilityAnalysis().
|
private |
the number of eigenvalues with negative real part
Referenced by getNnegreal(), initialize(), initObjects(), and stabilityAnalysis().
|
private |
the number of eigenvalues with positive real part
Referenced by getNposreal(), initialize(), initObjects(), and stabilityAnalysis().
|
private |
the number of real eigenvalues
Referenced by getNreal(), initialize(), initObjects(), and stabilityAnalysis().
|
private |
the number of eigenvalues with value of zero
Referenced by getNzero(), initialize(), initObjects(), and stabilityAnalysis().
|
private |
An index that is supposed to indicate the presence of oscillations
Referenced by initObjects(), and stabilityAnalysis().
|
private |
A heuristical index that is supposed to indicate the presence of oscillations, based on Eigenvalues
Referenced by initObjects(), and stabilityAnalysis().
|
private |
#14: (workspace) Logical array, dimension (N) Not referenced if mSort = 'N'
Referenced by calcEigenValues().
|
private |
#3: (input) Logical function of two double precision arguments It must be declared external = 'S': Select is used to select eigenvalues to sort to the top left of the Schur form = 'N': Eigenvalues are ordered Select is not refereced.
|
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
Referenced by calcEigenValues().
#8: array with dimension (mN)
Referenced by calcEigenValues(), getR(), initialize(), initObjects(), and stabilityAnalysis().
|
private |
The resolution of needed for the stability analysis
Referenced by initObjects(), 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.
Referenced by calcEigenValues().
|
private |
#2: (input) characer*1 = 'N': Eigenvalues are not ordered = 'S': Eigenvalues are ordered
Referenced by calcEigenValues().
|
private |
the stiffness of eigenvalues
Referenced by getStiffness(), initObjects(), and stabilityAnalysis().
#12: (workspace/output) double precision array, dimension (mLWork) On exit, if mInfo=0; mWork(1) contains the optimal mLWork
Referenced by calcEigenValues().