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 #ifndef TISSUECONFIG_HPP_ 00029 #define TISSUECONFIG_HPP_ 00030 00031 #include "ChasteSerialization.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 GetWntLabelledThreshold(); 00155 double GetWntConcentrationParameter(); 00159 double GetCriticalHypoxicDuration(); 00163 double GetCryptProjectionParameterA(); 00167 double GetCryptProjectionParameterB(); 00171 double GetApoptoticSpringTensionStiffness(); 00175 double GetApoptoticSpringCompressionStiffness(); 00179 double GetWntChemotaxisStrength(); 00183 double GetSymmetricDivisionProbability(); 00187 double GetAreaBasedDampingConstantParameter(); 00191 double GetMatureCellTargetArea(); 00195 double GetDeformationEnergyParameter(); 00199 double GetMembraneSurfaceEnergyParameter(); 00203 double GetCellCellAdhesionEnergyParameter(); 00207 double GetCellBoundaryAdhesionEnergyParameter(); 00211 double GetWelikyOsterAreaParameter(); 00215 double GetWelikyOsterPerimeterParameter(); 00219 bool GetOutputCellIdData(); 00223 bool GetOutputCellMutationStates(); 00227 bool GetOutputCellAncestors(); 00231 bool GetOutputCellProliferativeTypes(); 00235 bool GetOutputCellVariables(); 00239 bool GetOutputCellCyclePhases(); 00243 bool GetOutputCellAges(); 00247 bool GetOutputCellAreas(); 00251 bool GetOutputVoronoiData(); 00255 bool GetOutputTissueAreas(); 00259 bool GetOutputNodeVelocities(); 00260 00264 void SetStemCellG1Duration(double); 00268 void SetTransitCellG1Duration(double); 00272 void SetHepaOneCellG1Duration(double); 00276 void SetMinimumGapDuration(double); 00280 void SetSDuration(double); 00284 void SetG2Duration(double); 00288 void SetMDuration(double); 00292 void SetMaxTransitGenerations(unsigned); 00296 void SetCryptLength(double); 00300 void SetCryptWidth(double); 00304 void SetSpringStiffness(double); 00308 void SetMechanicsCutOffLength(double); 00312 void SetDampingConstantNormal(double); 00316 void SetDampingConstantMutant(double); 00320 void SetBetaCatSpringScaler(double); 00324 void SetApoptosisTime(double); 00328 void SetDivisionRestingSpringLength(double); 00332 void SetDivisionSeparation(double); 00336 void SetHepaOneCellHypoxicConcentration(double); 00340 void SetHepaOneCellQuiescentConcentration(double); 00344 void SetWntTransitThreshold(double); 00348 void SetWntStemThreshold(double); 00352 void SetWntLabelledThreshold(double); 00356 void SetWntConcentrationParameter(double); 00360 void SetCriticalHypoxicDuration(double); 00364 void SetHepaOneParameters(); 00368 void SetCryptProjectionParameterA(double); 00372 void SetCryptProjectionParameterB(double); 00376 void SetApoptoticSpringTensionStiffness(double); 00380 void SetApoptoticSpringCompressionStiffness(double); 00384 void SetWntChemotaxisStrength(double); 00388 void SetSymmetricDivisionProbability(double); 00392 void SetAreaBasedDampingConstantParameter(double); 00396 void SetMatureCellTargetArea(double); 00400 void SetDeformationEnergyParameter(double); 00404 void SetMembraneSurfaceEnergyParameter(double); 00408 void SetCellCellAdhesionEnergyParameter(double); 00412 void SetCellBoundaryAdhesionEnergyParameter(double); 00416 void SetWelikyOsterAreaParameter(double); 00420 void SetWelikyOsterPerimeterParameter(double); 00424 void SetOutputCellIdData(bool); 00428 void SetOutputCellMutationStates(bool); 00432 void SetOutputCellAncestors(bool); 00436 void SetOutputCellProliferativeTypes(bool); 00440 void SetOutputCellVariables(bool); 00444 void SetOutputCellCyclePhases(bool); 00448 void SetOutputCellAges(bool); 00452 void SetOutputCellAreas(bool); 00456 void SetOutputVoronoiData(bool); 00460 void SetOutputTissueAreas(bool); 00464 void SetOutputNodeVelocities(bool); 00465 00469 void Reset(); 00470 00471 protected: 00472 00476 TissueConfig(); 00477 00481 TissueConfig(const TissueConfig&); 00482 00486 TissueConfig& operator= (const TissueConfig&); 00487 00488 private: 00489 00491 static TissueConfig* mpInstance; 00492 00498 double mStemCellG1Duration; 00499 00504 double mTransitCellG1Duration; 00505 00510 double mHepaOneCellG1Duration; 00511 00517 double mMinimumGapDuration; 00518 00522 double mSDuration; 00523 00527 double mG2Duration; 00528 00532 double mMDuration; 00533 00537 unsigned mMaxTransitGenerations; 00538 00543 double mCryptLength; 00544 00549 double mCryptWidth; 00550 00558 double mSpringStiffness; 00559 00564 double mMechanicsCutOffLength; 00565 00572 double mDampingConstantNormal; 00573 00577 double mDampingConstantMutant; 00578 00582 double mBetaCatSpringScaler; 00583 00587 double mApoptosisTime; 00588 00592 double mDivisionSeparation; 00593 00599 double mDivisionRestingSpringLength; 00600 00606 double mHepaOneCellHypoxicConcentration; 00607 00613 double mHepaOneCellQuiescentConcentration; 00614 00618 double mWntTransitThreshold; 00619 00623 double mWntStemThreshold; 00624 00628 double mWntLabelledThreshold; 00629 00639 double mWntConcentrationParameter; 00640 00644 double mCriticalHypoxicDuration; 00645 00650 double mCryptProjectionParameterA; 00651 00656 double mCryptProjectionParameterB; 00657 00661 double mApoptoticSpringTensionStiffness; 00662 00666 double mApoptoticSpringCompressionStiffness; 00667 00671 double mWntChemotaxisStrength; 00672 00676 double mSymmetricDivisionProbability; 00677 00681 double mAreaBasedDampingConstantParameter; 00682 00687 double mMatureCellTargetArea; 00688 00693 double mDeformationEnergyParameter; 00694 00699 double mMembraneSurfaceEnergyParameter; 00700 00705 double mCellCellAdhesionEnergyParameter; 00706 00711 double mCellBoundaryAdhesionEnergyParameter; 00712 00717 double mWelikyOsterAreaParameter; 00718 00723 double mWelikyOsterPerimeterParameter; 00724 00726 bool mOutputCellIdData; 00727 00732 bool mOutputCellMutationStates; 00733 00738 bool mOutputCellAncestors; 00739 00744 bool mOutputCellProliferativeTypes; 00745 00749 bool mOutputCellVariables; 00750 00752 bool mOutputCellCyclePhases; 00753 00755 bool mOutputCellAges; 00756 00758 bool mOutputCellAreas; 00759 00761 bool mOutputVoronoiData; 00762 00764 bool mOutputTissueAreas; 00765 00767 bool mOutputNodeVelocities; 00768 00770 friend class boost::serialization::access; 00779 template<class Archive> 00780 void serialize(Archive & archive, const unsigned int version) 00781 { 00782 archive & mStemCellG1Duration; 00783 archive & mTransitCellG1Duration; 00784 archive & mHepaOneCellG1Duration; 00785 archive & mMinimumGapDuration; 00786 archive & mSDuration; 00787 archive & mG2Duration; 00788 archive & mMDuration; 00789 archive & mMaxTransitGenerations; 00790 archive & mCryptLength; 00791 archive & mCryptWidth; 00792 archive & mSpringStiffness; 00793 archive & mMechanicsCutOffLength; 00794 archive & mDampingConstantNormal; 00795 archive & mDampingConstantMutant; 00796 archive & mBetaCatSpringScaler; 00797 archive & mApoptosisTime; 00798 archive & mHepaOneCellHypoxicConcentration; 00799 archive & mHepaOneCellQuiescentConcentration; 00800 archive & mWntTransitThreshold; 00801 archive & mWntStemThreshold; 00802 archive & mWntLabelledThreshold; 00803 archive & mWntConcentrationParameter; 00804 archive & mCriticalHypoxicDuration; 00805 archive & mCryptProjectionParameterA; 00806 archive & mCryptProjectionParameterB; 00807 archive & mApoptoticSpringTensionStiffness; 00808 archive & mApoptoticSpringCompressionStiffness; 00809 archive & mWntChemotaxisStrength; 00810 archive & mSymmetricDivisionProbability; 00811 archive & mAreaBasedDampingConstantParameter; 00812 archive & mMatureCellTargetArea; 00813 archive & mDeformationEnergyParameter; 00814 archive & mMembraneSurfaceEnergyParameter; 00815 archive & mCellCellAdhesionEnergyParameter; 00816 archive & mCellBoundaryAdhesionEnergyParameter; 00817 archive & mWelikyOsterAreaParameter; 00818 archive & mWelikyOsterPerimeterParameter; 00819 archive & mOutputCellIdData; 00820 archive & mOutputCellMutationStates; 00821 archive & mOutputCellAncestors; 00822 archive & mOutputCellProliferativeTypes; 00823 archive & mOutputCellVariables; 00824 archive & mOutputCellCyclePhases; 00825 archive & mOutputCellAges; 00826 archive & mOutputCellAreas; 00827 archive & mOutputVoronoiData; 00828 archive & mOutputTissueAreas; 00829 archive & mOutputNodeVelocities; 00830 } 00831 }; 00832 00833 00834 #endif /*TISSUECONFIG_HPP_*/