00001 /* 00002 00003 Copyright (C) University of Oxford, 2005-2009 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 #ifndef TISSUECONFIG_HPP_ 00029 #define TISSUECONFIG_HPP_ 00030 00031 #include <boost/serialization/access.hpp> 00032 #include <cassert> 00033 #include "Exception.hpp" 00034 00045 class TissueConfig 00046 { 00047 public: 00048 00054 static TissueConfig* Instance(); 00055 00059 double GetStemCellG1Duration(); 00063 double GetTransitCellG1Duration(); 00067 double GetHepaOneCellG1Duration(); 00071 double GetMinimumGapDuration(); 00075 double GetSG2MDuration(); 00079 double GetSDuration(); 00083 double GetG2Duration(); 00087 double GetMDuration(); 00091 unsigned GetMaxTransitGenerations(); 00095 double GetCryptLength(); 00099 double GetCryptWidth(); 00103 double GetSpringStiffness(); 00107 double GetMechanicsCutOffLength(); 00111 double GetDampingConstantNormal(); 00115 double GetDampingConstantMutant(); 00119 double GetBetaCatSpringScaler(); 00123 double GetApoptosisTime(); 00127 double GetDivisionRestingSpringLength(); 00131 double GetDivisionSeparation(); 00135 double GetHepaOneCellHypoxicConcentration(); 00139 double GetHepaOneCellQuiescentConcentration(); 00143 double GetWntTransitThreshold(); 00147 double GetWntStemThreshold(); 00151 double GetTopOfLinearWntConcentration(); 00155 double GetCriticalHypoxicDuration(); 00159 double GetCryptProjectionParameterA(); 00163 double GetCryptProjectionParameterB(); 00167 double GetApoptoticSpringTensionStiffness(); 00171 double GetApoptoticSpringCompressionStiffness(); 00175 double GetWntChemotaxisStrength(); 00179 double GetSymmetricDivisionProbability(); 00183 double GetAreaBasedDampingConstantParameter(); 00187 double GetMatureCellTargetArea(); 00191 double GetDeformationEnergyParameter(); 00195 double GetMembraneSurfaceEnergyParameter(); 00199 double GetCellCellAdhesionEnergyParameter(); 00203 double GetCellBoundaryAdhesionEnergyParameter(); 00207 bool GetOutputCellIdData(); 00211 bool GetOutputCellMutationStates(); 00215 bool GetOutputCellAncestors(); 00219 bool GetOutputCellTypes(); 00223 bool GetOutputCellVariables(); 00227 bool GetOutputCellCyclePhases(); 00231 bool GetOutputCellAges(); 00235 bool GetOutputCellAreas(); 00239 bool GetOutputVoronoiData(); 00243 bool GetOutputTissueAreas(); 00244 00248 void SetStemCellG1Duration(double); 00252 void SetTransitCellG1Duration(double); 00256 void SetHepaOneCellG1Duration(double); 00260 void SetMinimumGapDuration(double); 00264 void SetSDuration(double); 00268 void SetG2Duration(double); 00272 void SetMDuration(double); 00276 void SetMaxTransitGenerations(unsigned); 00280 void SetCryptLength(double); 00284 void SetCryptWidth(double); 00288 void SetSpringStiffness(double); 00292 void SetMechanicsCutOffLength(double); 00296 void SetDampingConstantNormal(double); 00300 void SetDampingConstantMutant(double); 00304 void SetBetaCatSpringScaler(double); 00308 void SetApoptosisTime(double); 00312 void SetDivisionRestingSpringLength(double); 00316 void SetDivisionSeparation(double); 00320 void SetHepaOneCellHypoxicConcentration(double); 00324 void SetHepaOneCellQuiescentConcentration(double); 00328 void SetWntTransitThreshold(double); 00332 void SetWntStemThreshold(double); 00336 void SetTopOfLinearWntConcentration(double); 00340 void SetCriticalHypoxicDuration(double); 00344 void SetHepaOneParameters(); 00348 void SetCryptProjectionParameterA(double); 00352 void SetCryptProjectionParameterB(double); 00356 void SetApoptoticSpringTensionStiffness(double); 00360 void SetApoptoticSpringCompressionStiffness(double); 00364 void SetWntChemotaxisStrength(double); 00368 void SetSymmetricDivisionProbability(double); 00372 void SetAreaBasedDampingConstantParameter(double); 00376 void SetMatureCellTargetArea(double); 00380 void SetDeformationEnergyParameter(double); 00384 void SetMembraneSurfaceEnergyParameter(double); 00388 void SetCellCellAdhesionEnergyParameter(double); 00392 void SetCellBoundaryAdhesionEnergyParameter(double); 00396 void SetOutputCellIdData(bool); 00400 void SetOutputCellMutationStates(bool); 00404 void SetOutputCellAncestors(bool); 00408 void SetOutputCellTypes(bool); 00412 void SetOutputCellVariables(bool); 00416 void SetOutputCellCyclePhases(bool); 00420 void SetOutputCellAges(bool); 00424 void SetOutputCellAreas(bool); 00428 void SetOutputVoronoiData(bool); 00432 void SetOutputTissueAreas(bool); 00433 00437 void Reset(); 00438 00439 protected: 00440 00444 TissueConfig(); 00445 00449 TissueConfig(const TissueConfig&); 00450 00454 TissueConfig& operator= (const TissueConfig&); 00455 00456 private: 00457 00459 static TissueConfig *mpInstance; 00460 00466 double mStemCellG1Duration; 00467 00472 double mTransitCellG1Duration; 00473 00478 double mHepaOneCellG1Duration; 00479 00485 double mMinimumGapDuration; 00486 00490 double mSDuration; 00491 00495 double mG2Duration; 00496 00500 double mMDuration; 00501 00505 unsigned mMaxTransitGenerations; 00506 00511 double mCryptLength; 00512 00517 double mCryptWidth; 00518 00526 double mSpringStiffness; 00527 00532 double mMechanicsCutOffLength; 00533 00540 double mDampingConstantNormal; 00541 00545 double mDampingConstantMutant; 00546 00550 double mBetaCatSpringScaler; 00551 00555 double mApoptosisTime; 00556 00560 double mDivisionSeparation; 00561 00567 double mDivisionRestingSpringLength; 00568 00574 double mHepaOneCellHypoxicConcentration; 00575 00581 double mHepaOneCellQuiescentConcentration; 00582 00586 double mWntTransitThreshold; 00587 00591 double mWntStemThreshold; 00592 00597 double mTopOfLinearWntConcentration; 00598 00602 double mCriticalHypoxicDuration; 00603 00608 double mCryptProjectionParameterA; 00609 00614 double mCryptProjectionParameterB; 00615 00619 double mApoptoticSpringTensionStiffness; 00620 00624 double mApoptoticSpringCompressionStiffness; 00625 00629 double mWntChemotaxisStrength; 00630 00634 double mSymmetricDivisionProbability; 00635 00639 double mAreaBasedDampingConstantParameter; 00640 00645 double mMatureCellTargetArea; 00646 00651 double mDeformationEnergyParameter; 00652 00657 double mMembraneSurfaceEnergyParameter; 00658 00663 double mCellCellAdhesionEnergyParameter; 00664 00669 double mCellBoundaryAdhesionEnergyParameter; 00670 00672 bool mOutputCellIdData; 00673 00678 bool mOutputCellMutationStates; 00679 00684 bool mOutputCellAncestors; 00685 00690 bool mOutputCellTypes; 00691 00695 bool mOutputCellVariables; 00696 00698 bool mOutputCellCyclePhases; 00699 00701 bool mOutputCellAges; 00702 00704 bool mOutputCellAreas; 00705 00707 bool mOutputVoronoiData; 00708 00710 bool mOutputTissueAreas; 00711 00713 friend class boost::serialization::access; 00722 template<class Archive> 00723 void serialize(Archive & archive, const unsigned int version) 00724 { 00725 archive & mStemCellG1Duration; 00726 archive & mTransitCellG1Duration; 00727 archive & mHepaOneCellG1Duration; 00728 archive & mMinimumGapDuration; 00729 archive & mSDuration; 00730 archive & mG2Duration; 00731 archive & mMDuration; 00732 archive & mMaxTransitGenerations; 00733 archive & mCryptLength; 00734 archive & mCryptWidth; 00735 archive & mSpringStiffness; 00736 archive & mMechanicsCutOffLength; 00737 archive & mDampingConstantNormal; 00738 archive & mDampingConstantMutant; 00739 archive & mBetaCatSpringScaler; 00740 archive & mApoptosisTime; 00741 archive & mHepaOneCellHypoxicConcentration; 00742 archive & mHepaOneCellQuiescentConcentration; 00743 archive & mWntTransitThreshold; 00744 archive & mWntStemThreshold; 00745 archive & mTopOfLinearWntConcentration; 00746 archive & mCriticalHypoxicDuration; 00747 archive & mCryptProjectionParameterA; 00748 archive & mCryptProjectionParameterB; 00749 archive & mApoptoticSpringTensionStiffness; 00750 archive & mApoptoticSpringCompressionStiffness; 00751 archive & mWntChemotaxisStrength; 00752 archive & mSymmetricDivisionProbability; 00753 archive & mAreaBasedDampingConstantParameter; 00754 archive & mMatureCellTargetArea; 00755 archive & mDeformationEnergyParameter; 00756 archive & mMembraneSurfaceEnergyParameter; 00757 archive & mCellCellAdhesionEnergyParameter; 00758 archive & mCellBoundaryAdhesionEnergyParameter; 00759 archive & mOutputCellIdData; 00760 archive & mOutputCellMutationStates; 00761 archive & mOutputCellAncestors; 00762 archive & mOutputCellTypes; 00763 archive & mOutputCellVariables; 00764 archive & mOutputCellCyclePhases; 00765 archive & mOutputCellAges; 00766 archive & mOutputCellAreas; 00767 archive & mOutputVoronoiData; 00768 archive & mOutputTissueAreas; 00769 } 00770 }; 00771 00772 00773 #endif /*TISSUECONFIG_HPP_*/