00001 /* 00002 00003 Copyright (C) University of Oxford, 2005-2010 00004 00005 University of Oxford means the Chancellor, Masters and Scholars of the 00006 University of Oxford, having an administrative office at Wellington 00007 Square, Oxford OX1 2JD, UK. 00008 00009 This file is part of Chaste. 00010 00011 Chaste is free software: you can redistribute it and/or modify it 00012 under the terms of the GNU Lesser General Public License as published 00013 by the Free Software Foundation, either version 2.1 of the License, or 00014 (at your option) any later version. 00015 00016 Chaste is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00019 License for more details. The offer of Chaste under the terms of the 00020 License is subject to the License being interpreted in accordance with 00021 English Law and subject to any action against the University of Oxford 00022 being under the jurisdiction of the English Courts. 00023 00024 You should have received a copy of the GNU Lesser General Public License 00025 along with Chaste. If not, see <http://www.gnu.org/licenses/>. 00026 00027 */ 00028 00029 00030 #ifndef _ABSTRACTODESYSTEMINFORMATION_HPP_ 00031 #define _ABSTRACTODESYSTEMINFORMATION_HPP_ 00032 00033 #include <vector> 00034 #include <string> 00035 00055 class AbstractOdeSystemInformation 00056 { 00057 friend class TestAbstractOdeSystem; 00058 00059 protected: 00061 std::string mSystemName; 00062 00064 std::vector<std::string> mVariableNames; 00065 00067 std::vector<std::string> mVariableUnits; 00068 00070 std::vector<std::string> mParameterNames; 00071 00073 std::vector<std::string> mParameterUnits; 00074 00076 std::vector<std::string> mDerivedQuantityNames; 00077 00079 std::vector<std::string> mDerivedQuantityUnits; 00080 00082 std::vector<double> mInitialConditions; 00083 00085 bool mInitialised; 00086 00092 virtual void Initialise()=0; 00093 00094 public: 00095 00099 AbstractOdeSystemInformation(); 00100 00104 virtual ~AbstractOdeSystemInformation(); 00105 00109 std::string GetSystemName() const; 00110 00117 void SetDefaultInitialConditions(const std::vector<double>& rInitialConditions); 00118 00126 void SetDefaultInitialCondition(unsigned index, double initialCondition); 00127 00131 std::vector<double> GetInitialConditions() const; 00132 00136 const std::vector<std::string>& rGetStateVariableNames() const; 00137 00141 const std::vector<std::string>& rGetStateVariableUnits() const; 00142 00152 unsigned GetStateVariableIndex(const std::string& rName) const; 00153 00161 std::string GetStateVariableUnits(unsigned index) const; 00162 00166 const std::vector<std::string>& rGetParameterNames() const; 00167 00171 const std::vector<std::string>& rGetParameterUnits() const; 00172 00182 unsigned GetParameterIndex(const std::string& rName) const; 00183 00191 std::string GetParameterUnits(unsigned index) const; 00192 00193 00201 unsigned GetAnyVariableIndex(const std::string& rName) const; 00202 00210 std::string GetAnyVariableUnits(unsigned index) const; 00211 00212 00216 const std::vector<std::string>& rGetDerivedQuantityNames() const; 00217 00221 const std::vector<std::string>& rGetDerivedQuantityUnits() const; 00222 00228 unsigned GetDerivedQuantityIndex(const std::string& rName) const; 00229 00236 std::string GetDerivedQuantityUnits(unsigned index) const; 00237 }; 00238 00239 00240 #endif /*_ABSTRACTODESYSTEMINFORMATION_HPP_*/