Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
HeartConfig.hpp
1/*
2
3Copyright (c) 2005-2024, University of Oxford.
4All rights reserved.
5
6University of Oxford means the Chancellor, Masters and Scholars of the
7University of Oxford, having an administrative office at Wellington
8Square, Oxford OX1 2JD, UK.
9
10This file is part of Chaste.
11
12Redistribution and use in source and binary forms, with or without
13modification, 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
23THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32OF 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
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
61#include <boost/serialization/split_member.hpp>
62#include <boost/serialization/map.hpp>
63#include <boost/serialization/set.hpp>
64
65namespace cp = chaste::parameters::v2017_1;
66
67// Forward declaration to avoid circular includes
68class HeartFileFinder;
69
70
82{
83private:
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
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;
122 archive & mBathConductivities;
123 archive & mTissueIdentifiers;
124 archive & mBathIdentifiers;
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;
156 archive & mBathConductivities;
157 archive & mTissueIdentifiers;
158 archive & mBathIdentifiers;
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
179public:
184 typedef std::map<std::string, std::string> SchemaLocationsMap;
185
186private:
191
196
197public:
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
608
609 // Post processing
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
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
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
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
1265private:
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
1391BOOST_CLASS_VERSION(HeartConfig, 2)
1392#include "SerializationExportWrapper.hpp"
1393// Declare identifier for the serializer
1395
1396#endif /*HEARTCONFIG_HPP_*/
gcov doesn't like this file...
#define CHASTE_CLASS_EXPORT(T)
SchemaLocationsMap mSchemaLocations
void SetRequestedNodalTimeTraces(std::vector< unsigned > &requestedNodes)
void GetStimuli(std::vector< boost::shared_ptr< AbstractStimulusFunction > > &rStimuliApplied, std::vector< boost::shared_ptr< AbstractChasteRegion< DIM > > > &rStimulatedAreas) const
DistributedTetrahedralMeshPartitionType::type GetMeshPartitioning() const
bool AreCellularTransmuralHeterogeneitiesRequested()
unsigned GetMaxCheckpointsOnDisk() const
std::map< std::string, std::string > SchemaLocationsMap
bool IsSimulationDefined() const
bool GetLoadMesh() const
void SetUseMassLumpingForPrecond(bool useMassLumping=true)
void SetIntracellularConductivities(const c_vector< double, 3 > &rIntraConductivities)
void GetSheetDimensions(c_vector< double, 2 > &sheetDimensions) const
void SetTissueAndBathIdentifiers(const std::set< unsigned > &rTissueIds, const std::set< unsigned > &rBathIds)
std::string GetMeshName() const
cp::media_type GetConductivityMedia() const
double GetCapacitance() const
std::set< unsigned > mBathIdentifiers
void SetMaxUpstrokeVelocityMaps(std::vector< double > &rMaxUpstrokeVelocityMaps)
void load(Archive &archive, const unsigned int version)
void SetConductivityHeterogeneitiesEllipsoid(std::vector< ChasteEllipsoid< 3 > > &rConductivityAreas, std::vector< c_vector< double, 3 > > &rIntraConductivities, std::vector< c_vector< double, 3 > > &rExtraConductivities)
double GetAbsoluteTolerance() const
void SetUseFixedNumberIterationsLinearSolver(bool useFixedNumberIterations=true, unsigned evaluateNumItsEveryNSolves=UINT_MAX)
void SetBathMultipleConductivities(std::map< unsigned, double > bathConductivities)
double GetPurkinjeSurfaceAreaToVolumeRatio()
HeartFileFinder GetArchivedSimulationDir() const
static boost::shared_ptr< HeartConfig > mpInstance
double GetPdeTimeStep() const
bool mUseFixedNumberIterations
double GetDrugDose() const
bool GetCreateFibre() const
double GetPrintingTimeStep() const
void SetDefaultIonicModel(const cp::ionic_models_available_type &rIonicModel)
void CheckResumeSimulationIsDefined(std::string callingMethod="") const
bool GetUseFixedNumberIterationsLinearSolver()
void CopySchema(const std::string &rToDirectory)
void SetElectrodeParameters(bool groundSecondElectrode, unsigned index, double magnitude, double startTime, double duration)
void GetOutputVariables(std::vector< std::string > &rOutputVariables) const
void SetSheetDimensions(double x, double y, double inter_node_space)
bool mUseFixedSchemaLocation
void SetPrintingTimeStep(double printingTimeStep)
boost::shared_ptr< cp::chaste_parameters_type > mpParameters
double GetMidLayerFraction()
void SetFibreLength(double x, double inter_node_space)
unsigned GetVisualizerOutputPrecision()
void SetPurkinjeCapacitance(double capacitance)
bool IsOutputVisualizerPresent() const
void SetUpstrokeTimeMaps(std::vector< double > &rUpstrokeTimeMaps)
void SetApdMaps(const std::vector< std::pair< double, double > > &rApdMaps)
unsigned mIndexEndo
double GetSurfaceAreaToVolumeRatio() const
double GetSimulationDuration() const
void SetDrugDose(double drugDose)
double GetOdeTimeStep() const
FileFinder mParametersFilePath
bool IsPostProcessingSectionPresent() const
bool IsMaxUpstrokeVelocityMapRequested() const
void SetKSPSolver(const char *kspSolver, bool warnOfChange=false)
bool IsPostProcessingRequested() const
void SetUseFixedSchemaLocation(bool useFixedSchemaLocation)
void SetOutputUsingOriginalNodeOrdering(bool useOriginal)
double mMidFraction
bool GetVisualizeWithParallelVtk() const
unsigned GetSpaceDimension() const
bool GetCreateMesh() const
void SetIc50Value(const std::string &rCurrentName, double ic50, double hill=1.0)
bool IsAnyNodalTimeTraceRequested() const
void SetOutputDirectory(const std::string &rOutputDirectory)
std::map< unsigned, double > mBathConductivities
FileFinder GetParametersFilePath()
void EnsurePostProcessingSectionPresent()
void SetUseReactionDiffusionOperatorSplitting(bool useOperatorSplitting=true)
void CheckTimeSteps() const
bool GetUseMassLumping()
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 SetDomain(const cp::domain_type &rDomain)
const char * GetKSPPreconditioner() const
bool GetUseAbsoluteTolerance() const
bool IsSimulationResumed() const
void SetFixedSchemaLocations(const SchemaLocationsMap &rSchemaLocations)
bool mUserAskedForCellularTransmuralHeterogeneities
bool GetVisualizeWithCmgui() const
void EnsureOutputVisualizerExists(void)
void SetUseStateVariableInterpolation(bool useStateVariableInterpolation=true)
bool GetOutputUsingOriginalNodeOrdering()
bool IsElectrodesPresent() const
void SetMeshPartitioning(const char *meshPartioningMethod)
bool IsApdMapsRequested() const
bool IsConductionVelocityMapsRequested() const
double GetRelativeTolerance() const
void GetNodalTimeTraceRequested(std::vector< unsigned > &rRequestedNodes) const
unsigned GetMidLayerIndex()
void SetUseRelativeTolerance(double relativeTolerance)
const std::set< unsigned > & rGetBathIdentifiers()
void SetVisualizeWithMeshalyzer(bool useMeshalyzer=true)
void SetPdeTimeStep(double pdeTimeStep)
cp::ionic_model_selection_type GetDefaultIonicModel() const
void SetSlabDimensions(double x, double y, double z, double inter_node_space)
void SetSpaceDimension(unsigned spaceDimension)
unsigned GetEvaluateNumItsEveryNSolves()
boost::shared_ptr< cp::chaste_parameters_type > ReadFile(const std::string &rFileName)
unsigned mEvaluateNumItsEveryNSolves
void GetApdMaps(std::vector< std::pair< double, double > > &rApdMaps) const
void SetSurfaceAreaToVolumeRatio(double ratio)
void GetIonicModelRegions(std::vector< boost::shared_ptr< AbstractChasteRegion< DIM > > > &rDefinedRegions, std::vector< cp::ionic_model_selection_type > &rIonicModels) const
void SetUseAbsoluteTolerance(double absoluteTolerance)
bool GetUseRelativeTolerance() const
void SetPurkinjeSurfaceAreaToVolumeRatio(double ratio)
void SetKSPPreconditioner(const char *kspPreconditioner)
void GetConductionVelocityMaps(std::vector< unsigned > &rConductionVelocityMaps) const
void SetDefaultSchemaLocations()
void SetOdeTimeStep(double odeTimeStep)
bool GetCreateSlab() const
double GetPurkinjeCapacitance()
unsigned GetEpiLayerIndex()
void SetBathConductivity(double bathConductivity)
double GetPurkinjeConductivity()
bool HasDrugDose() const
double mEndoFraction
void SetIonicModelRegions(std::vector< ChasteCuboid< 3 > > &rDefinedRegions, std::vector< cp::ionic_model_selection_type > &rIonicModels) const
bool GetUseReactionDiffusionOperatorSplitting()
void SetVisualizeWithVtk(bool useVtk=true)
void SetExtracellularConductivities(const c_vector< double, 3 > &rExtraConductivities)
std::string GetOutputFilenamePrefix() const
bool GetVisualizeWithMeshalyzer() const
void SetSimulationDuration(double simulationDuration)
void SetCapacitance(double capacitance)
void SetConductionVelocityMaps(std::vector< unsigned > &rConductionVelocityMaps)
unsigned mIndexEpi
double GetEndoLayerFraction()
void SetConductivityHeterogeneities(std::vector< ChasteCuboid< 3 > > &rConductivityAreas, std::vector< c_vector< double, 3 > > &rIntraConductivities, std::vector< c_vector< double, 3 > > &rExtraConductivities)
bool GetConductivityHeterogeneitiesProvided() const
void SetOutputVariables(const std::vector< std::string > &rOutputVariables)
void GetSlabDimensions(c_vector< double, 3 > &slabDimensions) const
void GetPseudoEcgElectrodePositions(std::vector< ChastePoint< SPACE_DIM > > &rPseudoEcgElectrodePositions) const
void GetElectrodeParameters(bool &rGroundSecondElectrode, unsigned &rIndex, double &rMagnitude, double &rStartTime, double &rDuration)
void LoadFromCheckpoint()
unsigned mIndexMid
void Write(bool useArchiveLocationInfo=false, std::string subfolderName="output")
std::map< std::string, std::pair< double, double > > GetIc50Values()
std::set< unsigned > mTissueIdentifiers
double GetEpiLayerFraction()
unsigned GetEndoLayerIndex()
bool mUseMassLumpingForPrecond
friend class boost::serialization::access
double GetCheckpointTimestep() const
bool IsMeshProvided() const
bool GetVisualizeWithVtk() const
void SetOutputFilenamePrefix(const std::string &rOutputFilenamePrefix)
void SetCheckpointSimulation(bool checkpointSimulation, double checkpointTimestep=-1.0, unsigned maxCheckpointsOnDisk=UINT_MAX)
void SetPurkinjeConductivity(double conductivity)
void GetIntracellularConductivities(c_vector< double, 3 > &rIntraConductivities) const
bool GetUseMassLumpingForPrecond()
void SetMeshFileName(std::string meshPrefix, cp::media_type fibreDefinition=cp::media_type::NoFibreOrientation)
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 GetUpstrokeTimeMaps(std::vector< double > &rUpstrokeTimeMaps) const
bool GetUseStateVariableInterpolation() const
const std::set< unsigned > & rGetTissueIdentifiers()
void save(Archive &archive, const unsigned int version) const
static void Reset()
unsigned GetVersionFromNamespace(const std::string &rNamespaceUri)
bool mUseReactionDiffusionOperatorSplitting
void GetMaxUpstrokeVelocityMaps(std::vector< double > &rUpstrokeVelocityMaps) const
double GetInterNodeSpace() const
cp::domain_type GetDomain() const
bool GetOutputVariablesProvided() const
std::string GetOutputDirectory() const
double GetBathConductivity(unsigned bathRegion=UINT_MAX) const
void SetUseMassLumping(bool useMassLumping=true)
bool IsPseudoEcgCalculationRequested() const
void CheckSimulationIsDefined(std::string callingMethod="") const
double mEpiFraction
bool IsUpstrokeTimeMapsRequested() const
void SetVisualizeWithCmgui(bool useCmgui=true)
void GetExtracellularConductivities(c_vector< double, 3 > &rExtraConductivities) const
bool GetCheckpointSimulation() const
void SetVisualizeWithParallelVtk(bool useParallelVtk=true)
void UpdateParametersFromResumeSimulation(boost::shared_ptr< cp::chaste_parameters_type > pResumeParameters)
void SetParametersFile(const std::string &rFileName)
void GetFibreLength(c_vector< double, 1 > &fibreLength) const
static HeartConfig * Instance()
const char * GetKSPSolver() const
void SetVisualizerOutputPrecision(unsigned numberOfDigits)
void SetOdePdeAndPrintingTimeSteps(double odeTimeStep, double pdeTimeStep, double printingTimeStep)
void SetPseudoEcgElectrodePositions(const std::vector< ChastePoint< SPACE_DIM > > &rPseudoEcgElectrodePositions)
bool IsAdaptivityParametersPresent() const
bool GetCreateSheet() const
static bool AmMaster()
static void Barrier(const std::string callerId="")