Chaste
Commit::baa90ac2819b962188b7562f2326be23c47859a7
AbstractOdeSystemInformation.hpp
1
/*
2
3
Copyright (c) 2005-2024, University of Oxford.
4
All rights reserved.
5
6
University of Oxford means the Chancellor, Masters and Scholars of the
7
University of Oxford, having an administrative office at Wellington
8
Square, Oxford OX1 2JD, UK.
9
10
This file is part of Chaste.
11
12
Redistribution and use in source and binary forms, with or without
13
modification, are permitted provided that the following conditions are met:
14
* Redistributions of source code must retain the above copyright notice,
15
this list of conditions and the following disclaimer.
16
* Redistributions in binary form must reproduce the above copyright notice,
17
this list of conditions and the following disclaimer in the documentation
18
and/or other materials provided with the distribution.
19
* Neither the name of the University of Oxford nor the names of its
20
contributors may be used to endorse or promote products derived from this
21
software without specific prior written permission.
22
23
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
34
*/
35
36
37
#ifndef _ABSTRACTODESYSTEMINFORMATION_HPP_
38
#define _ABSTRACTODESYSTEMINFORMATION_HPP_
39
40
#include <vector>
41
#include <string>
42
#include <map>
43
62
class
AbstractOdeSystemInformation
63
{
64
friend
class
TestAbstractOdeSystem;
65
66
protected
:
68
std::string
mSystemName
;
69
71
std::string
mFreeVariableName
;
72
74
std::string
mFreeVariableUnits
;
75
77
std::vector<std::string>
mVariableNames
;
78
80
std::vector<std::string>
mVariableUnits
;
81
83
std::vector<std::string>
mParameterNames
;
84
86
std::vector<std::string>
mParameterUnits
;
87
89
std::vector<std::string>
mDerivedQuantityNames
;
90
92
std::vector<std::string>
mDerivedQuantityUnits
;
93
95
std::map<std::string, double>
mAttributes
;
96
98
std::vector<double>
mInitialConditions
;
99
101
bool
mInitialised
;
102
108
virtual
void
Initialise
()=0;
109
110
public
:
111
115
AbstractOdeSystemInformation
();
116
120
virtual
~AbstractOdeSystemInformation
();
121
125
std::string
GetSystemName
()
const
;
126
130
std::string
GetFreeVariableName
()
const
;
131
135
std::string
GetFreeVariableUnits
()
const
;
136
143
void
SetDefaultInitialConditions
(
const
std::vector<double>& rInitialConditions);
144
152
void
SetDefaultInitialCondition
(
unsigned
index,
double
initialCondition);
153
157
std::vector<double>
GetInitialConditions
()
const
;
158
162
const
std::vector<std::string>&
rGetStateVariableNames
()
const
;
163
167
const
std::vector<std::string>&
rGetStateVariableUnits
()
const
;
168
178
unsigned
GetStateVariableIndex
(
const
std::string& rName)
const
;
179
188
bool
HasStateVariable
(
const
std::string& rName)
const
;
189
197
std::string
GetStateVariableUnits
(
unsigned
index)
const
;
198
202
const
std::vector<std::string>&
rGetParameterNames
()
const
;
203
207
const
std::vector<std::string>&
rGetParameterUnits
()
const
;
208
218
unsigned
GetParameterIndex
(
const
std::string& rName)
const
;
219
228
bool
HasParameter
(
const
std::string& rName)
const
;
229
237
std::string
GetParameterUnits
(
unsigned
index)
const
;
238
242
unsigned
GetNumberOfParameters
()
const
;
243
253
unsigned
GetAnyVariableIndex
(
const
std::string& rName)
const
;
254
264
bool
HasAnyVariable
(
const
std::string& rName)
const
;
265
273
std::string
GetAnyVariableUnits
(
unsigned
index)
const
;
274
278
const
std::vector<std::string>&
rGetDerivedQuantityNames
()
const
;
279
283
const
std::vector<std::string>&
rGetDerivedQuantityUnits
()
const
;
284
290
unsigned
GetDerivedQuantityIndex
(
const
std::string& rName)
const
;
291
300
bool
HasDerivedQuantity
(
const
std::string& rName)
const
;
301
308
std::string
GetDerivedQuantityUnits
(
unsigned
index)
const
;
309
313
unsigned
GetNumberOfDerivedQuantities
()
const
;
314
315
//
316
// Attribute methods
317
//
318
322
unsigned
GetNumberOfAttributes
()
const
;
323
328
bool
HasAttribute
(
const
std::string& rName)
const
;
329
334
double
GetAttribute
(
const
std::string& rName)
const
;
335
};
336
337
#endif
/*_ABSTRACTODESYSTEMINFORMATION_HPP_*/
AbstractOdeSystemInformation
Definition
AbstractOdeSystemInformation.hpp:63
AbstractOdeSystemInformation::mParameterUnits
std::vector< std::string > mParameterUnits
Definition
AbstractOdeSystemInformation.hpp:86
AbstractOdeSystemInformation::GetNumberOfAttributes
unsigned GetNumberOfAttributes() const
Definition
AbstractOdeSystemInformation.cpp:275
AbstractOdeSystemInformation::GetSystemName
std::string GetSystemName() const
Definition
AbstractOdeSystemInformation.cpp:52
AbstractOdeSystemInformation::rGetDerivedQuantityNames
const std::vector< std::string > & rGetDerivedQuantityNames() const
Definition
AbstractOdeSystemInformation.cpp:229
AbstractOdeSystemInformation::GetDerivedQuantityUnits
std::string GetDerivedQuantityUnits(unsigned index) const
Definition
AbstractOdeSystemInformation.cpp:259
AbstractOdeSystemInformation::mInitialised
bool mInitialised
Definition
AbstractOdeSystemInformation.hpp:101
AbstractOdeSystemInformation::mVariableNames
std::vector< std::string > mVariableNames
Definition
AbstractOdeSystemInformation.hpp:77
AbstractOdeSystemInformation::mInitialConditions
std::vector< double > mInitialConditions
Definition
AbstractOdeSystemInformation.hpp:98
AbstractOdeSystemInformation::GetParameterIndex
unsigned GetParameterIndex(const std::string &rName) const
Definition
AbstractOdeSystemInformation.cpp:137
AbstractOdeSystemInformation::GetParameterUnits
std::string GetParameterUnits(unsigned index) const
Definition
AbstractOdeSystemInformation.cpp:155
AbstractOdeSystemInformation::HasStateVariable
bool HasStateVariable(const std::string &rName) const
Definition
AbstractOdeSystemInformation.cpp:108
AbstractOdeSystemInformation::HasParameter
bool HasParameter(const std::string &rName) const
Definition
AbstractOdeSystemInformation.cpp:148
AbstractOdeSystemInformation::GetFreeVariableName
std::string GetFreeVariableName() const
Definition
AbstractOdeSystemInformation.cpp:57
AbstractOdeSystemInformation::mDerivedQuantityUnits
std::vector< std::string > mDerivedQuantityUnits
Definition
AbstractOdeSystemInformation.hpp:92
AbstractOdeSystemInformation::~AbstractOdeSystemInformation
virtual ~AbstractOdeSystemInformation()
Definition
AbstractOdeSystemInformation.cpp:48
AbstractOdeSystemInformation::GetFreeVariableUnits
std::string GetFreeVariableUnits() const
Definition
AbstractOdeSystemInformation.cpp:62
AbstractOdeSystemInformation::GetAnyVariableUnits
std::string GetAnyVariableUnits(unsigned index) const
Definition
AbstractOdeSystemInformation.cpp:199
AbstractOdeSystemInformation::SetDefaultInitialConditions
void SetDefaultInitialConditions(const std::vector< double > &rInitialConditions)
Definition
AbstractOdeSystemInformation.cpp:67
AbstractOdeSystemInformation::mFreeVariableUnits
std::string mFreeVariableUnits
Definition
AbstractOdeSystemInformation.hpp:74
AbstractOdeSystemInformation::rGetStateVariableNames
const std::vector< std::string > & rGetStateVariableNames() const
Definition
AbstractOdeSystemInformation.cpp:85
AbstractOdeSystemInformation::GetInitialConditions
std::vector< double > GetInitialConditions() const
Definition
AbstractOdeSystemInformation.cpp:79
AbstractOdeSystemInformation::Initialise
virtual void Initialise()=0
AbstractOdeSystemInformation::mFreeVariableName
std::string mFreeVariableName
Definition
AbstractOdeSystemInformation.hpp:71
AbstractOdeSystemInformation::rGetStateVariableUnits
const std::vector< std::string > & rGetStateVariableUnits() const
Definition
AbstractOdeSystemInformation.cpp:91
AbstractOdeSystemInformation::mAttributes
std::map< std::string, double > mAttributes
Definition
AbstractOdeSystemInformation.hpp:95
AbstractOdeSystemInformation::rGetParameterUnits
const std::vector< std::string > & rGetParameterUnits() const
Definition
AbstractOdeSystemInformation.cpp:131
AbstractOdeSystemInformation::mVariableUnits
std::vector< std::string > mVariableUnits
Definition
AbstractOdeSystemInformation.hpp:80
AbstractOdeSystemInformation::AbstractOdeSystemInformation
AbstractOdeSystemInformation()
Definition
AbstractOdeSystemInformation.cpp:43
AbstractOdeSystemInformation::GetAttribute
double GetAttribute(const std::string &rName) const
Definition
AbstractOdeSystemInformation.cpp:287
AbstractOdeSystemInformation::mDerivedQuantityNames
std::vector< std::string > mDerivedQuantityNames
Definition
AbstractOdeSystemInformation.hpp:89
AbstractOdeSystemInformation::HasAnyVariable
bool HasAnyVariable(const std::string &rName) const
Definition
AbstractOdeSystemInformation.cpp:193
AbstractOdeSystemInformation::rGetDerivedQuantityUnits
const std::vector< std::string > & rGetDerivedQuantityUnits() const
Definition
AbstractOdeSystemInformation.cpp:235
AbstractOdeSystemInformation::rGetParameterNames
const std::vector< std::string > & rGetParameterNames() const
Definition
AbstractOdeSystemInformation.cpp:125
AbstractOdeSystemInformation::GetStateVariableUnits
std::string GetStateVariableUnits(unsigned index) const
Definition
AbstractOdeSystemInformation.cpp:115
AbstractOdeSystemInformation::GetNumberOfDerivedQuantities
unsigned GetNumberOfDerivedQuantities() const
Definition
AbstractOdeSystemInformation.cpp:269
AbstractOdeSystemInformation::GetNumberOfParameters
unsigned GetNumberOfParameters() const
Definition
AbstractOdeSystemInformation.cpp:165
AbstractOdeSystemInformation::GetStateVariableIndex
unsigned GetStateVariableIndex(const std::string &rName) const
Definition
AbstractOdeSystemInformation.cpp:97
AbstractOdeSystemInformation::SetDefaultInitialCondition
void SetDefaultInitialCondition(unsigned index, double initialCondition)
Definition
AbstractOdeSystemInformation.cpp:73
AbstractOdeSystemInformation::mSystemName
std::string mSystemName
Definition
AbstractOdeSystemInformation.hpp:68
AbstractOdeSystemInformation::HasDerivedQuantity
bool HasDerivedQuantity(const std::string &rName) const
Definition
AbstractOdeSystemInformation.cpp:252
AbstractOdeSystemInformation::GetAnyVariableIndex
unsigned GetAnyVariableIndex(const std::string &rName) const
Definition
AbstractOdeSystemInformation.cpp:171
AbstractOdeSystemInformation::mParameterNames
std::vector< std::string > mParameterNames
Definition
AbstractOdeSystemInformation.hpp:83
AbstractOdeSystemInformation::GetDerivedQuantityIndex
unsigned GetDerivedQuantityIndex(const std::string &rName) const
Definition
AbstractOdeSystemInformation.cpp:241
AbstractOdeSystemInformation::HasAttribute
bool HasAttribute(const std::string &rName) const
Definition
AbstractOdeSystemInformation.cpp:281
ode
src
common
AbstractOdeSystemInformation.hpp
Generated by
1.9.8