ElectroMechanicsProblemDefinition.hpp

00001 /*
00002 
00003 Copyright (C) University of Oxford, 2005-2011
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 #ifndef ELECTROMECHANICSPROBLEMDEFINITION_HPP_
00030 #define ELECTROMECHANICSPROBLEMDEFINITION_HPP_
00031 
00032 #include "SolidMechanicsProblemDefinition.hpp"
00033 #include "ContractionModelName.hpp"
00034 #include "NashHunterPoleZeroLaw.hpp"
00035 #include "CompressibleExponentialLaw.hpp"
00036 
00037 
00038 
00043 template<unsigned DIM>
00044 class ElectroMechanicsProblemDefinition : public SolidMechanicsProblemDefinition<DIM>
00045 {
00046 private:
00051     ContractionModelName mContractionModel;
00052 
00054     double mContractionModelOdeTimeStep;
00055 
00057     double mMechanicsSolveTimestep;
00058 
00063     bool mDeformationAffectsConductivity;
00064 
00069     bool mDeformationAffectsCellModels;
00070 
00074     AbstractMaterialLaw<DIM>* mpDefaultMaterialLaw;
00075 
00076 
00078     bool mReadFibreSheetInformationFromFile;
00079 
00084     std::string mFibreSheetDirectionsFile;
00085 
00090     bool mFibreSheetDirectionsDefinedPerQuadraturePoint;
00091 
00092 public:
00097     ElectroMechanicsProblemDefinition(QuadraticMesh<DIM>& rMesh);
00098 
00100     ~ElectroMechanicsProblemDefinition();
00101 
00112     void SetContractionModel(ContractionModelName contractionModel, double timestep);
00113 
00119     void SetUseDefaultCardiacMaterialLaw(CompressibilityType compressibilityType);
00120 
00143     void SetDeformationAffectsElectrophysiology(bool deformationAffectsConductivity, bool deformationAffectsCellModels);
00144 
00149     void SetMechanicsSolveTimestep(double timestep);
00150 
00151 
00166     void SetVariableFibreSheetDirectionsFile(std::string fibreSheetDirectionsFile, bool definedPerQuadPoint);
00167 
00168 
00172     ContractionModelName GetContractionModel()
00173     {
00174         assert(mContractionModelOdeTimeStep>0.0); // if this fails SetContractionModel() probably hasn't been called - call Validate() to check
00175         return mContractionModel;
00176     }
00177 
00181     double GetContractionModelOdeTimestep()
00182     {
00183         assert(mContractionModelOdeTimeStep>0.0); // if this fails SetContractionModel() probably hasn't been called - call Validate() to check
00184         return mContractionModelOdeTimeStep;
00185     }
00186 
00190     double GetMechanicsSolveTimestep()
00191     {
00192         assert(mMechanicsSolveTimestep>0.0); // if this fails SetMechanicsSolveTimestep() probably hasn't been called - call Validate() to check
00193         return mMechanicsSolveTimestep;
00194     }
00195 
00200     bool GetDeformationAffectsConductivity()
00201     {
00202         return mDeformationAffectsConductivity;
00203     }
00204 
00209     bool GetDeformationAffectsCellModels()
00210     {
00211         return mDeformationAffectsCellModels;
00212     }
00213 
00217     bool ReadFibreSheetDirectionsFromFile()
00218     {
00219         return mReadFibreSheetInformationFromFile;
00220     }
00221 
00225     std::string GetFibreSheetDirectionsFile()
00226     {
00227         assert(mReadFibreSheetInformationFromFile);
00228         assert(mFibreSheetDirectionsFile!="");
00229         return mFibreSheetDirectionsFile;
00230     }
00231 
00237     bool GetFibreSheetDirectionsDefinedPerQuadraturePoint()
00238     {
00239         assert(mReadFibreSheetInformationFromFile);
00240         return mFibreSheetDirectionsDefinedPerQuadraturePoint;
00241     }
00242 
00247     virtual void Validate();
00248 };
00249 
00250 #endif // ELECTROMECHANICSPROBLEMDEFINITION_HPP_
Generated on Thu Dec 22 13:00:06 2011 for Chaste by  doxygen 1.6.3