COPASI API  4.16.103
Functions
CEigen.cpp File Reference
#include <cmath>
#include <complex>
#include "copasi.h"
#include "CEigen.h"
#include "report/CCopasiObjectReference.h"
#include "utilities/CReadConfig.h"
#include "utilities/CCopasiMessage.h"
#include "utilities/CSort.h"
#include "lapack/lapackwrap.h"
Include dependency graph for CEigen.cpp:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const CEigen &A)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CEigen A 
)

Definition at line 693 of file CEigen.cpp.

References CEigen::mHierarchy, CEigen::mImagOfMaxComplex, CEigen::mMaximagpart, CEigen::mMaxRealOfComplex, CEigen::mMaxrealpart, CEigen::mNcplxconj, CEigen::mNimag, CEigen::mNnegreal, CEigen::mNposreal, CEigen::mNreal, CEigen::mNzero, CEigen::mResolution, and CEigen::mStiffness.

694 {
695  os << std::endl;
696  os << "KINETIC STABILITY ANALYSIS";
697  os << std::endl;
698  os << "The linear stability analysis based on the eigenvalues" << std::endl;
699  os << "of the Jacobian matrix is only valid for steady states." << std::endl;
700  os << std::endl;
701  os << "Summary:" << std::endl;
702  os << "This state ";
703 
704  // Output statistics
705 
706  if (A.mMaxrealpart > A.mResolution)
707  os << "is unstable";
708  else if (A.mMaxrealpart < -A.mResolution)
709  os << "is asymptotically stable";
710  else
711  os << "'s stability is undetermined";
712 
713  if (A.mMaximagpart > A.mResolution)
714  {
715  os << "," << std::endl;
716  os << "transient states in its vicinity have oscillatory components";
717  }
718 
719  os << "." << std::endl;
720  os << std::endl;
721 
722  os << "Eigenvalue statistics:" << std::endl;
723  // Output Max Real Part
724  os << " Largest real part: ";
725  os << std::setprecision(6) << A.mMaxrealpart << std::endl;
726  // Output Max imaginary Part
727  os << " Largest absolute imaginary part: ";
728  os << std::setprecision(6) << A.mMaximagpart << std::endl;
729 
730  if (A.mImagOfMaxComplex > A.mResolution)
731  os << " The complex eigenvalues with the largest real part are: "
732  << A.mMaxRealOfComplex << " +|- " << A.mImagOfMaxComplex << "i" << std::endl;
733 
734  // Output Eigen-nreal
735  os.unsetf(std::ios_base::scientific);
736  os.unsetf(std::ios_base::showpoint);
737  os << " " << A.mNreal;
738  os << " are purely real" << std::endl;
739  // Output Eigen-nimage
740  os << " " << A.mNimag;
741  os << " are purely imaginary" << std::endl;
742  // Output Eigen-ncplxconj
743  os << " " << A.mNcplxconj;
744  os << " are complex" << std::endl;
745  // Output Eigen-nzero
746  os << " " << A.mNzero;
747  os << " are equal to zero" << std::endl;
748  // Output Eigen-nposreal
749  os << " " << A.mNposreal;
750  os << " have positive real part" << std::endl;
751  // Output Eigen-nnegreal
752  os << " " << A.mNnegreal;
753  os << " have negative real part" << std::endl;
754 
755  // Set point manipulators
756  os.setf(std::ios_base::showpoint);
757  // Output Eigne-stiffness
758  os << " stiffness = " << A.mStiffness << std::endl;
759  os << " time hierarchy = " << A.mHierarchy << std::endl;
760 
761  return os;
762 }
C_FLOAT64 mMaximagpart
Definition: CEigen.h:49
C_FLOAT64 mMaxRealOfComplex
Definition: CEigen.h:95
C_FLOAT64 mMaxrealpart
Definition: CEigen.h:44
size_t mNcplxconj
Definition: CEigen.h:74
C_FLOAT64 mHierarchy
Definition: CEigen.h:89
size_t mNnegreal
Definition: CEigen.h:59
size_t mNreal
Definition: CEigen.h:64
C_FLOAT64 mResolution
Definition: CEigen.h:141
C_FLOAT64 mImagOfMaxComplex
Definition: CEigen.h:100
size_t mNimag
Definition: CEigen.h:69
C_FLOAT64 mStiffness
Definition: CEigen.h:84
size_t mNzero
Definition: CEigen.h:79
size_t mNposreal
Definition: CEigen.h:54