Chaste  Release::2018.1
HeartConfig.hpp
1 /*
2 
3 Copyright (c) 2005-2018, 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 HEARTCONFIG_HPP_
38 #define HEARTCONFIG_HPP_
39 
40 #include <string>
41 #include <vector>
42 #include <set>
43 #include <map>
44 #include <boost/shared_ptr.hpp>
45 
46 #include "UblasVectorInclude.hpp"
47 
48 #include "ChasteParameters_2017_1.hpp"
49 
50 #include "AbstractStimulusFunction.hpp"
51 #include "AbstractChasteRegion.hpp"
52 #include "ChastePoint.hpp"
53 #include "ChasteCuboid.hpp"
54 #include "ChasteEllipsoid.hpp"
55 #include "DistributedTetrahedralMeshPartitionType.hpp"
56 #include "PetscTools.hpp"
57 #include "FileFinder.hpp"
58 
59 #include "ChasteSerialization.hpp"
61 #include <boost/serialization/split_member.hpp>
62 #include <boost/serialization/map.hpp>
63 #include <boost/serialization/set.hpp>
64 
65 namespace cp = chaste::parameters::v2017_1;
66 
67 // Forward declaration to avoid circular includes
68 class HeartFileFinder;
69 
70 
82 {
83 private:
90  void CheckTimeSteps() const;
91 
100  template<class Archive>
101  void save(Archive & archive, const unsigned int version) const
102  {
103  //Only the Master should be writing the configuration file
104  if (PetscTools::AmMaster())
105  {
106  mpInstance->Write( true );
107  }
108 
109  // Archive other member variables that don't appear in the XML
110  if (version > 1)
111  {
112  archive & mEpiFraction;
113  archive & mEndoFraction;
114  archive & mMidFraction;
115  archive & mIndexMid;
116  archive & mIndexEpi;
117  archive & mIndexEndo;
119  archive & mUseMassLumping;
120  archive & mUseMassLumpingForPrecond;
122  archive & mBathConductivities;
123  archive & mTissueIdentifiers;
124  archive & mBathIdentifiers;
125  archive & mUseFixedNumberIterations;
126  archive & mEvaluateNumItsEveryNSolves;
127  }
128 
129  PetscTools::Barrier("HeartConfig::save");
130  }
131 
138  template<class Archive>
139  void load(Archive & archive, const unsigned int version)
140  {
142 
143  // Load other member variables
144  if (version > 1)
145  {
146  archive & mEpiFraction;
147  archive & mEndoFraction;
148  archive & mMidFraction;
149  archive & mIndexMid;
150  archive & mIndexEpi;
151  archive & mIndexEndo;
153  archive & mUseMassLumping;
154  archive & mUseMassLumpingForPrecond;
156  archive & mBathConductivities;
157  archive & mTissueIdentifiers;
158  archive & mBathIdentifiers;
159  archive & mUseFixedNumberIterations;
160  archive & mEvaluateNumItsEveryNSolves;
161  }
162  }
163  BOOST_SERIALIZATION_SPLIT_MEMBER()
164 
165 
169  void LoadFromCheckpoint();
170 
177  void UpdateParametersFromResumeSimulation(boost::shared_ptr<cp::chaste_parameters_type> pResumeParameters);
178 
179 public:
184  typedef std::map<std::string, std::string> SchemaLocationsMap;
185 
186 private:
190  SchemaLocationsMap mSchemaLocations;
191 
196 
197 public:
203  static HeartConfig* Instance();
204 
210  void SetUseFixedSchemaLocation(bool useFixedSchemaLocation);
211 
218  void SetFixedSchemaLocations(const SchemaLocationsMap& rSchemaLocations);
219 
224  void SetParametersFile(const std::string& rFileName);
225 
237  void Write(bool useArchiveLocationInfo=false, std::string subfolderName="output");
238 
248  void CopySchema(const std::string& rToDirectory);
249 
255  boost::shared_ptr<cp::chaste_parameters_type> ReadFile(const std::string& rFileName);
256 
261  static void Reset();
262 
263  ~HeartConfig();
271  unsigned GetVersionFromNamespace(const std::string& rNamespaceUri);
272 
274  //
275  // Get methods
276  //
278 
284 
285  // Methods for asking the configuration file about which sections are defined.
286 
292  bool IsSimulationDefined() const;
293 
299  bool IsSimulationResumed() const;
300 
301  // Simulation
302  unsigned GetSpaceDimension() const;
303  double GetSimulationDuration() const;
310  cp::domain_type GetDomain() const;
311 
319  cp::ionic_model_selection_type GetDefaultIonicModel() const;
320 
331  template<unsigned DIM>
332  void GetIonicModelRegions(std::vector<boost::shared_ptr<AbstractChasteRegion<DIM> > >& rDefinedRegions,
333  std::vector<cp::ionic_model_selection_type>& rIonicModels) const;
334 
346  void SetIonicModelRegions(std::vector<ChasteCuboid<3> >& rDefinedRegions,
347  std::vector<cp::ionic_model_selection_type>& rIonicModels) const;
348 
349  bool IsMeshProvided() const;
350  bool GetCreateMesh() const;
351  bool GetCreateSlab() const;
352  bool GetCreateSheet() const;
353  bool GetCreateFibre() const;
354  bool GetLoadMesh() const;
359  void GetSlabDimensions(c_vector<double, 3>& slabDimensions) const;
363  void GetSheetDimensions(c_vector<double, 2>& sheetDimensions) const;
367  void GetFibreLength(c_vector<double, 1>& fibreLength) const;
368  double GetInterNodeSpace() const;
370  std::string GetMeshName() const;
372  cp::media_type GetConductivityMedia() const;
383  template<unsigned DIM>
384  void GetStimuli(std::vector<boost::shared_ptr<AbstractStimulusFunction> >& rStimuliApplied,
385  std::vector<boost::shared_ptr<AbstractChasteRegion<DIM> > >& rStimulatedAreas) const;
386 
402  template<unsigned DIM>
403  void GetCellHeterogeneities(std::vector<boost::shared_ptr<AbstractChasteRegion<DIM> > >& rCellHeterogeneityRegions,
404  std::vector<double>& rScaleFactorGks,
405  std::vector<double>& rScaleFactorIto,
406  std::vector<double>& rScaleFactorGkr,
407  std::vector<std::map<std::string, double> >* pParameterSettings);
408 
415 
419  double GetEpiLayerFraction();
420 
424  double GetEndoLayerFraction();
425 
429  double GetMidLayerFraction();
430 
434  unsigned GetEpiLayerIndex();
435 
439  unsigned GetEndoLayerIndex();
440 
444  unsigned GetMidLayerIndex();
445 
446 
455  template<unsigned DIM>
456  void GetConductivityHeterogeneities(std::vector<boost::shared_ptr<AbstractChasteRegion<DIM> > >& conductivitiesHeterogeneityAreas,
457  std::vector< c_vector<double,3> >& intraConductivities,
458  std::vector< c_vector<double,3> >& extraConductivities) const;
459  std::string GetOutputDirectory() const;
471  std::string GetOutputFilenamePrefix() const;
472 
476  bool GetOutputVariablesProvided() const;
477 
484  void GetOutputVariables(std::vector<std::string>& rOutputVariables) const;
485 
492 
498  bool GetCheckpointSimulation() const;
499 
505  double GetCheckpointTimestep() const;
506 
512  unsigned GetMaxCheckpointsOnDisk() const;
513 
514  // ResumeSimulation
519 
520 
521  // Physiological
526  void GetIntracellularConductivities(c_vector<double, 3>& rIntraConductivities) const;
527 
532  void GetIntracellularConductivities(c_vector<double, 2>& rIntraConductivities) const;
533 
538  void GetIntracellularConductivities(c_vector<double, 1>& rIntraConductivities) const;
539 
544  void GetExtracellularConductivities(c_vector<double, 3>& rExtraConductivities) const;
545 
550  void GetExtracellularConductivities(c_vector<double, 2>& rExtraConductivities) const;
551 
556  void GetExtracellularConductivities(c_vector<double, 1>& rExtraConductivities) const;
557 
565  double GetBathConductivity(unsigned bathRegion=UINT_MAX) const;
566 
572  const std::set<unsigned>& rGetTissueIdentifiers();
573 
579  const std::set<unsigned>& rGetBathIdentifiers();
580 
581 
582  double GetSurfaceAreaToVolumeRatio() const;
584  double GetCapacitance() const;
586  // Numerical
587  double GetOdeTimeStep() const;
588  double GetPdeTimeStep() const;
589  double GetPrintingTimeStep() const;
591  bool GetUseAbsoluteTolerance() const;
592  double GetAbsoluteTolerance() const;
594  bool GetUseRelativeTolerance() const;
595  double GetRelativeTolerance() const;
597  const char* GetKSPSolver() const;
598  const char* GetKSPPreconditioner() const;
602  // Adaptivity
607  bool IsAdaptivityParametersPresent() const;
608 
609  // Post processing
613  bool IsPostProcessingSectionPresent() const;
614 
619 
623  bool IsPostProcessingRequested() const;
624 
628  bool IsApdMapsRequested() const;
629 
635  void GetApdMaps(std::vector<std::pair<double,double> >& rApdMaps) const;
636 
640  bool IsUpstrokeTimeMapsRequested() const;
645  void GetUpstrokeTimeMaps (std::vector<double>& rUpstrokeTimeMaps) const;
646 
651 
656  void GetMaxUpstrokeVelocityMaps(std::vector<double>& rUpstrokeVelocityMaps) const;
657 
662 
667  void GetConductionVelocityMaps(std::vector<unsigned>& rConductionVelocityMaps) const;
668 
672  bool IsAnyNodalTimeTraceRequested() const;
673 
677  void GetNodalTimeTraceRequested(std::vector<unsigned>& rRequestedNodes) const;
678 
682  bool IsPseudoEcgCalculationRequested() const;
683 
688  template<unsigned SPACE_DIM>
689  void GetPseudoEcgElectrodePositions(std::vector<ChastePoint<SPACE_DIM> >& rPseudoEcgElectrodePositions) const;
690 
695 
696 
697  // Output visualization
698 
700  bool IsOutputVisualizerPresent() const;
701 
703  bool GetVisualizeWithMeshalyzer() const;
704 
706  bool GetVisualizeWithCmgui() const;
707 
709  bool GetVisualizeWithVtk() const;
710 
712  bool GetVisualizeWithParallelVtk() const;
713 
715  unsigned GetVisualizerOutputPrecision();
716 
720  bool IsElectrodesPresent() const;
721 
722 
732  void GetElectrodeParameters(bool& rGroundSecondElectrode,
733  unsigned& rIndex, double& rMagnitude,
734  double& rStartTime, double& rDuration );
735 
739  bool GetUseMassLumping();
740 
745 
751 
756 
761 
762 
764  //
765  // Set methods
766  //
768 
769  // Simulation
773  void SetSpaceDimension(unsigned spaceDimension);
774 
779  void SetSimulationDuration(double simulationDuration);
780 
787  void SetDomain(const cp::domain_type& rDomain);
788 
796  void SetDefaultIonicModel(const cp::ionic_models_available_type& rIonicModel);
797 
805  void SetSlabDimensions(double x, double y, double z, double inter_node_space);
806 
813  void SetSheetDimensions(double x, double y, double inter_node_space);
814 
820  void SetFibreLength(double x, double inter_node_space);
821 
828  void SetMeshFileName(std::string meshPrefix, cp::media_type fibreDefinition=cp::media_type::NoFibreOrientation);
829 
837  void SetConductivityHeterogeneities(std::vector<ChasteCuboid<3> >& rConductivityAreas,
838  std::vector< c_vector<double,3> >& rIntraConductivities,
839  std::vector< c_vector<double,3> >& rExtraConductivities);
847  void SetConductivityHeterogeneitiesEllipsoid(std::vector<ChasteEllipsoid<3> >& rConductivityAreas,
848  std::vector< c_vector<double,3> >& rIntraConductivities,
849  std::vector< c_vector<double,3> >& rExtraConductivities);
853  void SetOutputDirectory(const std::string& rOutputDirectory);
854 
865  void SetOutputFilenamePrefix(const std::string& rOutputFilenamePrefix);
866 
873  void SetOutputVariables(const std::vector<std::string>& rOutputVariables);
874 
883  void SetOutputUsingOriginalNodeOrdering(bool useOriginal);
884 
892  void SetCheckpointSimulation(bool checkpointSimulation, double checkpointTimestep=-1.0, unsigned maxCheckpointsOnDisk=UINT_MAX);
893 
894  // Physiological
899  void SetIntracellularConductivities(const c_vector<double, 3>& rIntraConductivities);
900 
905  void SetIntracellularConductivities(const c_vector<double, 2>& rIntraConductivities);
906 
911  void SetIntracellularConductivities(const c_vector<double, 1>& rIntraConductivities);
912 
917  void SetExtracellularConductivities(const c_vector<double, 3>& rExtraConductivities);
918 
923  void SetExtracellularConductivities(const c_vector<double, 2>& rExtraConductivities);
924 
929  void SetExtracellularConductivities(const c_vector<double, 1>& rExtraConductivities);
930 
936  void SetBathConductivity(double bathConductivity);
937 
943  void SetBathMultipleConductivities(std::map<unsigned, double> bathConductivities);
944 
951  void SetTissueAndBathIdentifiers(const std::set<unsigned>& rTissueIds, const std::set<unsigned>& rBathIds);
952 
959  //void SetTissueIdentifiers(const std::set<unsigned>& tissueIds);
960 
965  void SetSurfaceAreaToVolumeRatio(double ratio);
966 
971  void SetCapacitance(double capacitance);
972 
973  // Numerical
997  void SetOdePdeAndPrintingTimeSteps(double odeTimeStep, double pdeTimeStep, double printingTimeStep);
998 
1011  void SetOdeTimeStep(double odeTimeStep);
1012 
1017  void SetPdeTimeStep(double pdeTimeStep);
1018 
1028  void SetPrintingTimeStep(double printingTimeStep);
1029 
1033  void SetUseRelativeTolerance(double relativeTolerance);
1034 
1038  void SetUseAbsoluteTolerance(double absoluteTolerance);
1039 
1045  void SetKSPSolver(const char* kspSolver, bool warnOfChange=false);
1046 
1050  void SetKSPPreconditioner(const char* kspPreconditioner);
1051 
1055  void SetMeshPartitioning(const char* meshPartioningMethod);
1056 
1063  void SetApdMaps(const std::vector<std::pair<double,double> >& rApdMaps);
1064 
1070  void SetUpstrokeTimeMaps(std::vector<double>& rUpstrokeTimeMaps);
1071 
1077  void SetMaxUpstrokeVelocityMaps(std::vector<double>& rMaxUpstrokeVelocityMaps);
1078 
1083  void SetConductionVelocityMaps(std::vector<unsigned>& rConductionVelocityMaps);
1084 
1091  void SetRequestedNodalTimeTraces(std::vector<unsigned>& requestedNodes);
1092 
1098  template<unsigned SPACE_DIM>
1099  void SetPseudoEcgElectrodePositions(const std::vector<ChastePoint<SPACE_DIM> >& rPseudoEcgElectrodePositions);
1100 
1101 
1102  // Output visualization
1103 
1105  void EnsureOutputVisualizerExists(void);
1106 
1111  void SetVisualizeWithMeshalyzer(bool useMeshalyzer=true);
1112 
1117  void SetVisualizeWithCmgui(bool useCmgui=true);
1118 
1123  void SetVisualizeWithVtk(bool useVtk=true);
1124 
1129  void SetVisualizeWithParallelVtk(bool useParallelVtk=true);
1130 
1137  void SetVisualizerOutputPrecision(unsigned numberOfDigits);
1138 
1148  void SetElectrodeParameters(bool groundSecondElectrode,
1149  unsigned index, double magnitude,
1150  double startTime, double duration);
1151 
1158  void SetUseStateVariableInterpolation(bool useStateVariableInterpolation = true);
1159 
1165  void SetUseMassLumping(bool useMassLumping = true);
1166 
1172  void SetUseMassLumpingForPrecond(bool useMassLumping = true);
1173 
1182  void SetUseReactionDiffusionOperatorSplitting(bool useOperatorSplitting = true);
1183 
1190  void SetUseFixedNumberIterationsLinearSolver(bool useFixedNumberIterations = true, unsigned evaluateNumItsEveryNSolves=UINT_MAX);
1191 
1195  bool HasDrugDose() const;
1196 
1200  double GetDrugDose() const;
1201 
1205  void SetDrugDose(double drugDose);
1206 
1214  void SetIc50Value(const std::string& rCurrentName, double ic50, double hill=1.0);
1215 
1221  std::map<std::string, std::pair<double, double> > GetIc50Values();
1222 
1223  //
1224  // Purkinje-related methods
1225  //
1226 
1230  bool HasPurkinje();
1231 
1235  double GetPurkinjeCapacitance();
1236 
1241  void SetPurkinjeCapacitance(double capacitance);
1242 
1247 
1252  void SetPurkinjeSurfaceAreaToVolumeRatio(double ratio);
1253 
1257  double GetPurkinjeConductivity();
1258 
1263  void SetPurkinjeConductivity(double conductivity);
1264 
1265 private:
1266  // Only to be accessed by the tests
1267  friend class TestHeartConfig;
1268 
1269  /*Constructor is private, since the class is only accessed by the singleton instance() method*/
1270  HeartConfig();
1271 
1273  boost::shared_ptr<cp::chaste_parameters_type> mpParameters;
1274 
1276  static boost::shared_ptr<HeartConfig> mpInstance;
1277 
1282 
1288 
1293 
1298 
1303 
1307  unsigned mIndexMid;
1308 
1312  unsigned mIndexEpi;
1313 
1317  unsigned mIndexEndo;
1318 
1323 
1328 
1333 
1339 
1343  std::map<unsigned, double> mBathConductivities;
1344 
1348  std::set<unsigned> mTissueIdentifiers;
1349 
1353  std::set<unsigned> mBathIdentifiers;
1354 
1359 
1366 
1376  void CheckSimulationIsDefined(std::string callingMethod="") const;
1377 
1387  void CheckResumeSimulationIsDefined(std::string callingMethod="") const;
1388 };
1389 
1390 
1391 BOOST_CLASS_VERSION(HeartConfig, 2)
1392 #include "SerializationExportWrapper.hpp"
1393 // Declare identifier for the serializer
1394 CHASTE_CLASS_EXPORT(HeartConfig)
1395 
1396 #endif /*HEARTCONFIG_HPP_*/
void UpdateParametersFromResumeSimulation(boost::shared_ptr< cp::chaste_parameters_type > pResumeParameters)
double GetBathConductivity(unsigned bathRegion=UINT_MAX) const
void EnsureOutputVisualizerExists(void)
void SetIc50Value(const std::string &rCurrentName, double ic50, double hill=1.0)
void SetMeshFileName(std::string meshPrefix, cp::media_type fibreDefinition=cp::media_type::NoFibreOrientation)
void SetApdMaps(const std::vector< std::pair< double, double > > &rApdMaps)
void SetUseRelativeTolerance(double relativeTolerance)
std::map< std::string, std::string > SchemaLocationsMap
std::string GetOutputFilenamePrefix() const
bool GetUseAbsoluteTolerance() const
SchemaLocationsMap mSchemaLocations
void SetDomain(const cp::domain_type &rDomain)
double GetPurkinjeSurfaceAreaToVolumeRatio()
cp::media_type GetConductivityMedia() const
unsigned mEvaluateNumItsEveryNSolves
void SetRequestedNodalTimeTraces(std::vector< unsigned > &requestedNodes)
double GetSimulationDuration() const
void SetSpaceDimension(unsigned spaceDimension)
bool GetCreateSheet() const
void GetIonicModelRegions(std::vector< boost::shared_ptr< AbstractChasteRegion< DIM > > > &rDefinedRegions, std::vector< cp::ionic_model_selection_type > &rIonicModels) const
const std::set< unsigned > & rGetTissueIdentifiers()
bool GetVisualizeWithVtk() const
bool IsAnyNodalTimeTraceRequested() const
void SetVisualizeWithMeshalyzer(bool useMeshalyzer=true)
void SetOutputDirectory(const std::string &rOutputDirectory)
static void Barrier(const std::string callerId="")
Definition: PetscTools.cpp:134
void SetUseFixedNumberIterationsLinearSolver(bool useFixedNumberIterations=true, unsigned evaluateNumItsEveryNSolves=UINT_MAX)
bool IsConductionVelocityMapsRequested() const
void SetPseudoEcgElectrodePositions(const std::vector< ChastePoint< SPACE_DIM > > &rPseudoEcgElectrodePositions)
void SetSlabDimensions(double x, double y, double z, double inter_node_space)
unsigned GetVersionFromNamespace(const std::string &rNamespaceUri)
void SetBathMultipleConductivities(std::map< unsigned, double > bathConductivities)
unsigned GetEvaluateNumItsEveryNSolves()
void SetSheetDimensions(double x, double y, double inter_node_space)
bool HasPurkinje()
void GetCellHeterogeneities(std::vector< boost::shared_ptr< AbstractChasteRegion< DIM > > > &rCellHeterogeneityRegions, std::vector< double > &rScaleFactorGks, std::vector< double > &rScaleFactorIto, std::vector< double > &rScaleFactorGkr, std::vector< std::map< std::string, double > > *pParameterSettings)
void SetDefaultIonicModel(const cp::ionic_models_available_type &rIonicModel)
void GetIntracellularConductivities(c_vector< double, 3 > &rIntraConductivities) const
void GetExtracellularConductivities(c_vector< double, 3 > &rExtraConductivities) const
void CheckResumeSimulationIsDefined(std::string callingMethod="") const
void CheckSimulationIsDefined(std::string callingMethod="") const
bool GetUseMassLumpingForPrecond()
unsigned mIndexMid
void GetConductionVelocityMaps(std::vector< unsigned > &rConductionVelocityMaps) const
void Write(bool useArchiveLocationInfo=false, std::string subfolderName="output")
void GetSlabDimensions(c_vector< double, 3 > &slabDimensions) const
void SetPdeTimeStep(double pdeTimeStep)
double GetCheckpointTimestep() const
bool mUseMassLumpingForPrecond
double mMidFraction
boost::shared_ptr< cp::chaste_parameters_type > mpParameters
std::map< unsigned, double > mBathConductivities
bool mUseFixedSchemaLocation
void SetTissueAndBathIdentifiers(const std::set< unsigned > &rTissueIds, const std::set< unsigned > &rBathIds)
void EnsurePostProcessingSectionPresent()
bool IsSimulationDefined() const
void SetVisualizeWithCmgui(bool useCmgui=true)
void SetUseMassLumpingForPrecond(bool useMassLumping=true)
void SetUseStateVariableInterpolation(bool useStateVariableInterpolation=true)
bool GetOutputUsingOriginalNodeOrdering()
void SetKSPPreconditioner(const char *kspPreconditioner)
static bool AmMaster()
Definition: PetscTools.cpp:120
bool IsPseudoEcgCalculationRequested() const
unsigned mIndexEpi
unsigned GetEndoLayerIndex()
void SetElectrodeParameters(bool groundSecondElectrode, unsigned index, double magnitude, double startTime, double duration)
bool IsMaxUpstrokeVelocityMapRequested() const
void SetOutputUsingOriginalNodeOrdering(bool useOriginal)
bool GetVisualizeWithCmgui() const
void GetOutputVariables(std::vector< std::string > &rOutputVariables) const
DistributedTetrahedralMeshPartitionType::type GetMeshPartitioning() const
bool GetCreateFibre() const
double GetPrintingTimeStep() const
void SetVisualizeWithParallelVtk(bool useParallelVtk=true)
std::set< unsigned > mTissueIdentifiers
void SetPurkinjeSurfaceAreaToVolumeRatio(double ratio)
bool GetOutputVariablesProvided() const
void SetUseReactionDiffusionOperatorSplitting(bool useOperatorSplitting=true)
double GetAbsoluteTolerance() const
void SetDrugDose(double drugDose)
void SetCheckpointSimulation(bool checkpointSimulation, double checkpointTimestep=-1.0, unsigned maxCheckpointsOnDisk=UINT_MAX)
void SetUseFixedSchemaLocation(bool useFixedSchemaLocation)
double GetPdeTimeStep() const
void GetUpstrokeTimeMaps(std::vector< double > &rUpstrokeTimeMaps) const
bool IsApdMapsRequested() const
bool IsPostProcessingSectionPresent() const
void save(Archive &archive, const unsigned int version) const
void SetSurfaceAreaToVolumeRatio(double ratio)
double GetRelativeTolerance() const
bool mUseReactionDiffusionOperatorSplitting
std::string GetMeshName() const
void GetConductivityHeterogeneities(std::vector< boost::shared_ptr< AbstractChasteRegion< DIM > > > &conductivitiesHeterogeneityAreas, std::vector< c_vector< double, 3 > > &intraConductivities, std::vector< c_vector< double, 3 > > &extraConductivities) const
void GetFibreLength(c_vector< double, 1 > &fibreLength) const
bool GetUseFixedNumberIterationsLinearSolver()
bool IsAdaptivityParametersPresent() const
void SetSimulationDuration(double simulationDuration)
void SetOdeTimeStep(double odeTimeStep)
cp::domain_type GetDomain() const
double GetEpiLayerFraction()
void SetExtracellularConductivities(const c_vector< double, 3 > &rExtraConductivities)
bool GetCreateSlab() const
bool mUserAskedForCellularTransmuralHeterogeneities
double GetDrugDose() const
void GetNodalTimeTraceRequested(std::vector< unsigned > &rRequestedNodes) const
void GetSheetDimensions(c_vector< double, 2 > &sheetDimensions) const
void SetConductivityHeterogeneities(std::vector< ChasteCuboid< 3 > > &rConductivityAreas, std::vector< c_vector< double, 3 > > &rIntraConductivities, std::vector< c_vector< double, 3 > > &rExtraConductivities)
double GetMidLayerFraction()
void SetUseMassLumping(bool useMassLumping=true)
bool GetUseStateVariableInterpolation() const
std::set< unsigned > mBathIdentifiers
bool IsPostProcessingRequested() const
unsigned GetVisualizerOutputPrecision()
void LoadFromCheckpoint()
void SetConductionVelocityMaps(std::vector< unsigned > &rConductionVelocityMaps)
void SetFibreLength(double x, double inter_node_space)
void CheckTimeSteps() const
void SetCapacitance(double capacitance)
double GetOdeTimeStep() const
unsigned GetSpaceDimension() const
void GetElectrodeParameters(bool &rGroundSecondElectrode, unsigned &rIndex, double &rMagnitude, double &rStartTime, double &rDuration)
unsigned GetEpiLayerIndex()
friend class boost::serialization::access
Definition: HeartConfig.hpp:93
void GetPseudoEcgElectrodePositions(std::vector< ChastePoint< SPACE_DIM > > &rPseudoEcgElectrodePositions) const
bool GetUseReactionDiffusionOperatorSplitting()
void SetDefaultSchemaLocations()
bool IsElectrodesPresent() const
FileFinder GetParametersFilePath()
void SetMaxUpstrokeVelocityMaps(std::vector< double > &rMaxUpstrokeVelocityMaps)
bool GetUseMassLumping()
double mEndoFraction
cp::ionic_model_selection_type GetDefaultIonicModel() const
void SetUpstrokeTimeMaps(std::vector< double > &rUpstrokeTimeMaps)
void SetMeshPartitioning(const char *meshPartioningMethod)
bool IsMeshProvided() const
unsigned GetMaxCheckpointsOnDisk() const
boost::shared_ptr< cp::chaste_parameters_type > ReadFile(const std::string &rFileName)
void SetFixedSchemaLocations(const SchemaLocationsMap &rSchemaLocations)
double GetInterNodeSpace() const
double GetPurkinjeConductivity()
bool HasDrugDose() const
double GetEndoLayerFraction()
unsigned GetMidLayerIndex()
void GetApdMaps(std::vector< std::pair< double, double > > &rApdMaps) const
void SetParametersFile(const std::string &rFileName)
bool GetCreateMesh() const
void SetIonicModelRegions(std::vector< ChasteCuboid< 3 > > &rDefinedRegions, std::vector< cp::ionic_model_selection_type > &rIonicModels) const
bool GetCheckpointSimulation() const
bool GetVisualizeWithParallelVtk() const
double GetPurkinjeCapacitance()
void SetKSPSolver(const char *kspSolver, bool warnOfChange=false)
void load(Archive &archive, const unsigned int version)
bool GetLoadMesh() const
bool mUseFixedNumberIterations
const std::set< unsigned > & rGetBathIdentifiers()
double GetCapacitance() const
gcov doesn't like this file...
bool IsOutputVisualizerPresent() const
#define CHASTE_CLASS_EXPORT(T)
void SetIntracellularConductivities(const c_vector< double, 3 > &rIntraConductivities)
bool GetVisualizeWithMeshalyzer() const
FileFinder mParametersFilePath
void SetPurkinjeCapacitance(double capacitance)
double GetSurfaceAreaToVolumeRatio() const
std::string GetOutputDirectory() const
void SetOutputVariables(const std::vector< std::string > &rOutputVariables)
const char * GetKSPPreconditioner() const
bool IsSimulationResumed() const
void GetMaxUpstrokeVelocityMaps(std::vector< double > &rUpstrokeVelocityMaps) const
void SetVisualizerOutputPrecision(unsigned numberOfDigits)
HeartFileFinder GetArchivedSimulationDir() const
static void Reset()
void SetPrintingTimeStep(double printingTimeStep)
unsigned mIndexEndo
void SetPurkinjeConductivity(double conductivity)
bool AreCellularTransmuralHeterogeneitiesRequested()
void GetStimuli(std::vector< boost::shared_ptr< AbstractStimulusFunction > > &rStimuliApplied, std::vector< boost::shared_ptr< AbstractChasteRegion< DIM > > > &rStimulatedAreas) const
void SetUseAbsoluteTolerance(double absoluteTolerance)
void SetOutputFilenamePrefix(const std::string &rOutputFilenamePrefix)
bool mUseMassLumping
static HeartConfig * Instance()
static boost::shared_ptr< HeartConfig > mpInstance
bool GetUseRelativeTolerance() const
void SetBathConductivity(double bathConductivity)
bool IsUpstrokeTimeMapsRequested() const
void SetVisualizeWithVtk(bool useVtk=true)
const char * GetKSPSolver() const
bool GetConductivityHeterogeneitiesProvided() const
double mEpiFraction
void CopySchema(const std::string &rToDirectory)
void SetOdePdeAndPrintingTimeSteps(double odeTimeStep, double pdeTimeStep, double printingTimeStep)
void SetConductivityHeterogeneitiesEllipsoid(std::vector< ChasteEllipsoid< 3 > > &rConductivityAreas, std::vector< c_vector< double, 3 > > &rIntraConductivities, std::vector< c_vector< double, 3 > > &rExtraConductivities)
std::map< std::string, std::pair< double, double > > GetIc50Values()