COPASI API  4.40.278
CLyapTask Class Reference

#include <CLyapTask.h>

Inheritance diagram for CLyapTask:
[legend]

Public Member Functions

const C_FLOAT64averageDivergence () const
 
 CLyapTask (const CDataContainer *pParent, const CTaskEnum::Task &type=CTaskEnum::Task::lyap)
 
 CLyapTask (const CLyapTask &src, const CDataContainer *pParent)
 
const CVector< C_FLOAT64 > & exponents () const
 
virtual const CTaskEnum::MethodgetValidMethods () const
 
virtual bool initialize (const OutputFlag &of, COutputHandler *pOutputHandler, std::ostream *pOstream)
 
bool methodCallback (const C_FLOAT64 &percentage, bool onlyProgress)
 
size_t modelVariablesInResult () const
 
size_t numberOfExponentsCalculated () const
 
void printResult (std::ostream *ostream) const
 
virtual bool process (const bool &useInitialValues)
 
bool resultAvailable () const
 
bool resultHasDivergence () const
 
const C_FLOAT64sumOfExponents () const
 
 ~CLyapTask ()
 
- Public Member Functions inherited from CCopasiTask
virtual bool applyData (const CData &data, CUndoData::CChangeSet &changes)
 
 CCopasiTask (const CCopasiTask &src, const CDataContainer *pParent)
 
 CCopasiTask (const CDataContainer *pParent, const CTaskEnum::Task &taskType, const std::string &type="Task")
 
void cleanup ()
 
virtual void clearCallBack ()
 
virtual void createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const
 
const CProcessReportLevelgetCallBack () const
 
const CDescriptiongetDescription () const
 
virtual const std::string & getKey () const
 
CMathContainergetMathContainer () const
 
CCopasiMethodgetMethod ()
 
const CCopasiMethodgetMethod () const
 
COutputHandlergetOutputHandler () const
 
const OutputFlaggetOutputMode () const
 
CCopasiProblemgetProblem ()
 
const CCopasiProblemgetProblem () const
 
CReportgetReport ()
 
const CReportgetReport () const
 
const CResultgetResult () const
 
CCopasiParameterGroupgetSliders ()
 
CTaskEnum::Task getType () const
 
const bool & isScheduled () const
 
const bool & isUpdateModel () const
 
virtual void output (const COutputInterface::Activity &activity)
 
virtual bool restore (const bool &updateModel=true)
 
virtual void separate (const COutputInterface::Activity &activity)
 
virtual bool setCallBack (CProcessReportLevel callBack)
 
void setIgnoreProblemData (const bool &ignoreProblemData)
 
void setMathContainer (CMathContainer *pContainer)
 
bool setMethodType (const CTaskEnum::Method &type)
 
void setScheduled (const bool &scheduled)
 
void setType (const CTaskEnum::Task &type)
 
virtual void setUpdateModel (const bool &updateModel)
 
virtual CData toData () const
 
virtual bool updateMatrices ()
 
virtual ~CCopasiTask ()
 
- Public Member Functions inherited from CDataContainer
virtual bool add (CDataObject *pObject, const bool &adopt=true)
 
virtual bool appendDeletedDependentData (CUndoData &undoData) const
 
 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 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 CObjectInterfacegetObject (const CCommonName &cn) const override
 
virtual objectMapgetObjects ()
 
virtual const objectMapgetObjects () const
 
virtual const std::string getUnits () const override
 
virtual const CDataObjectgetValueObject () const override
 
virtual CUndoObjectInterfaceinsert (const CData &data) override
 
void objectRenamed (CDataObject *pObject, const std::string &oldName)
 
virtual bool remove (CDataObject *pObject)
 
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 CDataObjectgetDataObject () const override
 
CDataContainergetObjectAncestor (const std::string &type) const
 
CDataModelgetObjectDataModel () const
 
virtual std::string getObjectDisplayName () const override
 
const CObjectInterfacegetObjectFromCN (const CCommonName &cn) const
 
const std::string & getObjectName () const
 
CDataContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const CObjectInterface::ObjectSetgetPrerequisites () const override
 
virtual const CValiditygetValidity () 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
 
virtual void print (std::ostream *ostream) const override
 
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 calculationsBeforeOutput ()
 
void cleanup ()
 
 CLyapTask ()
 
void initObjects ()
 

Private Attributes

C_FLOAT64 mAverageDivergence
 
CVector< C_FLOAT64mExponents
 
size_t mhProcess
 
C_FLOAT64 mIntervalDivergence
 
CVector< C_FLOAT64mLocalExponents
 
size_t mModelVariablesInResult
 
size_t mNumExponentsCalculated
 
C_FLOAT64 mPercentage
 
CLyapMethodmpLyapMethod
 
CLyapProblemmpLyapProblem
 
bool mResultAvailable
 
bool mResultHasDivergence
 
C_FLOAT64 mSumOfExponents
 
C_FLOAT64 mSumOfLocalExponents
 
std::vector< CDataObjectReference< C_FLOAT64 > * > mvExpRef
 
std::vector< CDataObjectReference< C_FLOAT64 > * > mvLocExpRef
 

Friends

class CLyapWolfMethod
 

Additional Inherited Members

- Public Types inherited from CCopasiTask
enum  eOutputFlagBase {
  INITIALIZE = 0x01 , STREAM = 0x02 , FINISH = 0x04 , REPORT = 0x10 ,
  PLOT = 0x20 , TIME_SERIES = 0x40
}
 
enum  OutputFlag {
  NO_OUTPUT = 0 , OUTPUT_BEFORE = INITIALIZE , OUTPUT_DURING = STREAM , OUTPUT_AFTER = FINISH ,
  OUTPUT = REPORT | PLOT | STREAM , OUTPUT_SE = REPORT | PLOT | INITIALIZE | STREAM | FINISH , OUTPUT_UI = REPORT | PLOT | TIME_SERIES | INITIALIZE | STREAM | FINISH , ONLY_TIME_SERIES = TIME_SERIES | INITIALIZE | STREAM | FINISH
}
 
- 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 CCopasiTask
static CCopasiTaskfromData (const CData &data, CUndoObjectInterface *pParent)
 
static bool isValidMethod (const CTaskEnum::Method &method, const CTaskEnum::Method *validMethods)
 
- Static Public Member Functions inherited from CDataContainer
static CDataContainerfromData (const CData &data, CUndoObjectInterface *pParent)
 
- Static Public Member Functions inherited from CDataObject
static CDataObjectfromData (const CData &data, CUndoObjectInterface *pParent)
 
static void sanitizeObjectName (std::string &name)
 
- Static Public Member Functions inherited from CObjectInterface
static const CDataObjectDataObject (const CObjectInterface *pInterface)
 
static CObjectInterfaceGetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName)
 
- Static Public Member Functions inherited from CUndoObjectInterface
template<class CType >
static CType * fromData (const CData &, CUndoObjectInterface *)
 
- Public Attributes inherited from CCopasiTask
std::string Error
 
std::string Warning
 
- Static Public Attributes inherited from CDataContainer
static const CObjectInterface::ContainerList EmptyList
 
- Protected Member Functions inherited from CCopasiTask
bool isTaskValid () const
 
virtual void signalMathContainerChanged ()
 
virtual void signalMethodChanged ()
 
- 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 CCopasiTask
CDescription mDescription
 
OutputFlag mDoOutput
 
bool mIgnoreProblemData
 
CVector< C_FLOAT64mInitialState
 
std::string mKey
 
unsigned C_INT32 mOutputCounter
 
CMathContainermpContainer
 
CCopasiMethodmpMethod
 
COutputHandlermpOutputHandler
 
CCopasiProblemmpProblem
 
CProcessReportLevel mProcessReport
 
CCopasiParameterGroupmpSliders
 
CReport mReport
 
CResult mResult
 
bool mScheduled
 
CTaskEnum::Task mType
 
bool mUpdateModel
 
- 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
 

Constructor & Destructor Documentation

◆ CLyapTask() [1/3]

CLyapTask::CLyapTask ( )
private

Default constructor

◆ CLyapTask() [2/3]

CLyapTask::CLyapTask ( const CDataContainer pParent,
const CTaskEnum::Task type = CTaskEnum::Task::lyap 
)

Default constructor

Parameters
constCDataContainer * pParent
constCTaskEnum::Task & type (default: lyap)

References CMethodFactory::create(), initObjects(), CTaskEnum::lyap, CTaskEnum::lyapWolf, and CCopasiTask::mpMethod.

◆ CLyapTask() [3/3]

CLyapTask::CLyapTask ( const CLyapTask src,
const CDataContainer pParent 
)

Copy constructor

Parameters
constCLyapTaks &src
constCDataContainer * pParent

References initObjects().

◆ ~CLyapTask()

CLyapTask::~CLyapTask ( )

Destructor

References cleanup().

Member Function Documentation

◆ averageDivergence()

const C_FLOAT64& CLyapTask::averageDivergence ( ) const
inline

References mAverageDivergence.

◆ calculationsBeforeOutput()

void CLyapTask::calculationsBeforeOutput ( )
private

this does calculations that need to be done before output: sum of exponents, divergence, ...

References C_INT32, CLyapProblem::getExponentNumber(), mExponents, mLocalExponents, mpLyapProblem, mSumOfExponents, and mSumOfLocalExponents.

Referenced by methodCallback(), and process().

◆ cleanup()

void CLyapTask::cleanup ( )
private

cleanup()

Referenced by ~CLyapTask().

◆ exponents()

const CVector<C_FLOAT64>& CLyapTask::exponents ( ) const
inline

References mExponents.

◆ getValidMethods()

const CTaskEnum::Method * CLyapTask::getValidMethods ( ) const
virtual

Retrieve the list of valid methods

Returns
const CTaskEnum::Method * pValidMethods

Reimplemented from CCopasiTask.

References CTaskEnum::lyapWolf, and CTaskEnum::UnsetMethod.

◆ initialize()

bool CLyapTask::initialize ( const OutputFlag of,
COutputHandler pOutputHandler,
std::ostream *  pOstream 
)
virtual

Initialize the task. If an ostream is given this ostream is used instead of the target specified in the report. This allows nested tasks to share the same output device.

Parameters
constOutputFlag & of
COutputHandler* pOutputHandler
std::ostream* pOstream (default: NULL)
Returns
bool success

Reimplemented from CCopasiTask.

References CVectorCore< CType >::array(), CLyapProblem::getExponentNumber(), CCopasiTask::initialize(), CCopasiMethod::isValidProblem(), LYAP_NUM_REF, mExponents, mLocalExponents, mpLyapMethod, mpLyapProblem, CCopasiTask::mpMethod, CCopasiTask::mpProblem, mvExpRef, mvLocExpRef, CVector< CType >::resize(), and CLyapMethod::setProblem().

◆ initObjects()

◆ methodCallback()

bool CLyapTask::methodCallback ( const C_FLOAT64 percentage,
bool  onlyProgress 
)

This is called by the method to generate the output and update the progress bar. The parameter is the percentage for the progress bar. The return value is the return value of the progress bar handler (and determines if the calculation will be stopped). If onlyProgess is true, no output is done.

References calculationsBeforeOutput(), COutputInterface::DURING, mhProcess, mPercentage, CCopasiTask::mProcessReport, CCopasiTask::output(), and CProcessReportLevel::progressItem().

Referenced by CLyapWolfMethod::calculate().

◆ modelVariablesInResult()

size_t CLyapTask::modelVariablesInResult ( ) const

how many independent variables had the model at the time of the last calculation?

References mModelVariablesInResult.

◆ numberOfExponentsCalculated()

size_t CLyapTask::numberOfExponentsCalculated ( ) const

◆ printResult()

void CLyapTask::printResult ( std::ostream *  ostream) const

This functionality is expected from CLyapProblem but has to be implmented here for the moment. This is called from the corresponding method of the problem

References C_INT32, CLyapProblem::divergenceRequested(), CLyapProblem::getExponentNumber(), mAverageDivergence, mExponents, and mpLyapProblem.

Referenced by CLyapProblem::printResult().

◆ process()

◆ resultAvailable()

bool CLyapTask::resultAvailable ( ) const

References mResultAvailable.

◆ resultHasDivergence()

bool CLyapTask::resultHasDivergence ( ) const

was divergence requested for the last calculation?

References mResultHasDivergence.

◆ sumOfExponents()

const C_FLOAT64& CLyapTask::sumOfExponents ( ) const
inline

References mSumOfExponents.

Friends And Related Function Documentation

◆ CLyapWolfMethod

friend class CLyapWolfMethod
friend

Member Data Documentation

◆ mAverageDivergence

C_FLOAT64 CLyapTask::mAverageDivergence
private

Divergence averaged over the whole integration time

Referenced by averageDivergence(), CLyapWolfMethod::calculate(), initObjects(), printResult(), and CLyapWolfMethod::start().

◆ mExponents

◆ mhProcess

size_t CLyapTask::mhProcess
private

Referenced by methodCallback(), and process().

◆ mIntervalDivergence

C_FLOAT64 CLyapTask::mIntervalDivergence
private

Divergence averaged over the last orthonormalization interval

Referenced by CLyapWolfMethod::calculate(), initObjects(), and CLyapWolfMethod::start().

◆ mLocalExponents

CVector<C_FLOAT64> CLyapTask::mLocalExponents
private

◆ mModelVariablesInResult

size_t CLyapTask::mModelVariablesInResult
private

Referenced by modelVariablesInResult(), and process().

◆ mNumExponentsCalculated

size_t CLyapTask::mNumExponentsCalculated
private

◆ mPercentage

C_FLOAT64 CLyapTask::mPercentage
private

Referenced by methodCallback(), and process().

◆ mpLyapMethod

CLyapMethod* CLyapTask::mpLyapMethod
private

A pointer to the trajectory method

Referenced by initialize(), and process().

◆ mpLyapProblem

CLyapProblem* CLyapTask::mpLyapProblem
private

A pointer to the trajectory Problem

Referenced by calculationsBeforeOutput(), initialize(), printResult(), and process().

◆ mResultAvailable

bool CLyapTask::mResultAvailable
private

Referenced by process(), and resultAvailable().

◆ mResultHasDivergence

bool CLyapTask::mResultHasDivergence
private

Referenced by process(), and resultHasDivergence().

◆ mSumOfExponents

C_FLOAT64 CLyapTask::mSumOfExponents
private

◆ mSumOfLocalExponents

C_FLOAT64 CLyapTask::mSumOfLocalExponents
private

◆ mvExpRef

std::vector<CDataObjectReference< C_FLOAT64 > * > CLyapTask::mvExpRef
private

Referenced by initialize(), and initObjects().

◆ mvLocExpRef

std::vector<CDataObjectReference< C_FLOAT64 > * > CLyapTask::mvLocExpRef
private

Referenced by initialize(), and initObjects().


The documentation for this class was generated from the following files: