COPASI API  4.16.103
CLyapProblem.cpp
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/lyap/CLyapProblem.cpp,v $
3 // $Revision: 1.6 $
4 // $Name: $
5 // $Author: ssahle $
6 // $Date: 2012/04/22 14:54:54 $
7 // End CVS Header
8 
9 // Copyright (C) 2012 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc. and EML Research, gGmbH.
16 // All rights reserved.
17 
18 /**
19  * CLyapProblem class.
20  */
21 
22 #include <cmath>
23 #include <string>
24 
25 #include "copasi.h"
26 #include "CLyapProblem.h"
27 #include "CLyapTask.h"
28 #include "model/CModel.h"
29 //#include "model/CState.h"
31 
32 /**
33  * Default constructor.
34  */
36  CCopasiProblem(CCopasiTask::lyap, pParent),
37  mpExponentNumber(NULL),
38  //mpTimeSeriesRequested(NULL),
39  mpDivergenceRequested(NULL),
40  mpTransientTime(NULL)
41 {
44 }
45 
46 /**
47  * Copy constructor.
48  * @param "const CLyapProblem &" src
49  */
51  const CCopasiContainer * pParent):
52  CCopasiProblem(src, pParent),
53  mpExponentNumber(NULL),
54  //mpTimeSeriesRequested(NULL),
55  mpDivergenceRequested(NULL),
56  mpTransientTime(NULL)
57 {
60 }
61 
62 /**
63  * Destructor.
64  */
67 
69 {
70  return true;
71 }
72 
74 {
76  assertParameter("ExponentNumber", CCopasiParameter::UINT, (unsigned C_INT32) 3)->getValue().pUINT;
78  assertParameter("DivergenceRequested", CCopasiParameter::BOOL, (bool) true)->getValue().pBOOL;
81 
83 }
84 
85 void CLyapProblem::setExponentNumber(const unsigned C_INT32 & number)
86 {
87  *mpExponentNumber = number;
88 }
89 
90 const unsigned C_INT32 & CLyapProblem::getExponentNumber() const
91 {return *mpExponentNumber;}
92 
94 {
95  *mpTransientTime = startTime;
96 }
97 
99 {return *mpTransientTime;}
100 
101 /*void CLyapProblem::setTimeSeriesRequested(bool flag)
102 {
103  *mpTimeSeriesRequested = flag;
104 }
105 
106 bool CLyapProblem::timeSeriesRequested() const
107  {return *mpTimeSeriesRequested;}
108  */
109 
111 {
113 }
114 
116 {return *mpDivergenceRequested;}
117 
118 void CLyapProblem::printResult(std::ostream * ostream) const
119 {
120  CLyapTask* parent = dynamic_cast<CLyapTask*>(getObjectParent());
121 
122  if (!parent) return;
123 
124  parent->printResult(ostream);
125 }
unsigned C_INT32 * mpExponentNumber
Definition: CLyapProblem.h:32
void initializeParameter()
virtual void printResult(std::ostream *ostream) const
C_FLOAT64 * mpTransientTime
Definition: CLyapProblem.h:48
void setDivergenceRequested(bool flag)
bool * mpDivergenceRequested
Definition: CLyapProblem.h:42
void setTransientTime(const C_FLOAT64 &endTime)
#define C_INT32
Definition: copasi.h:90
CLyapProblem(const CCopasiContainer *pParent=NULL)
#define DESTRUCTOR_TRACE
Definition: copasi.h:206
void setExponentNumber(const unsigned C_INT32 &number)
const C_FLOAT64 & getTransientTime() const
const Value & getValue() const
unsigned C_INT32 * pUINT
virtual bool elevateChildren()
const unsigned C_INT32 & getExponentNumber() const
long int flag
Definition: f2c.h:52
void printResult(std::ostream *ostream) const
Definition: CLyapTask.cpp:292
#define C_FLOAT64
Definition: copasi.h:92
bool divergenceRequested() const
CCopasiParameter * assertParameter(const std::string &name, const CCopasiParameter::Type type, const CType &defaultValue)
CCopasiContainer * getObjectParent() const
#define CONSTRUCTOR_TRACE
Definition: copasi.h:202