Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
|
Go to the source code of this file.
Macros | |
#define | MERGE_PARAM(path) |
#define | ELSE_IF_DEFAULT(path) else if (pDefaults->path().present()) |
Functions | |
boost::shared_ptr< cp::chaste_parameters_type > | CreateDefaultParameters () |
void | MergeDefaults (boost::shared_ptr< cp::chaste_parameters_type > pParams, boost::shared_ptr< cp::chaste_parameters_type > pDefaults) |
This file is designed to be included within HeartConfig.cpp, and defines a single function, CreateDefaultParameters. The only reason it is a separate file is for easy identification of what the default parameters are.
Definition in file HeartConfigDefaults.hpp.
#define ELSE_IF_DEFAULT | ( | path | ) | else if (pDefaults->path().present()) |
An "else if" clause that tests if the given parameter is present in the defaults.
path | the XSD data model path to the given parameter |
Definition at line 172 of file HeartConfigDefaults.hpp.
#define MERGE_PARAM | ( | path | ) |
If the given parameter is not present in the user parameters, but is in the defaults, then copy its value from defaults to user parameters.
path | the XSD data model path to the given parameter |
Definition at line 161 of file HeartConfigDefaults.hpp.
boost::shared_ptr< cp::chaste_parameters_type > CreateDefaultParameters | ( | ) |
It sets up an object equivalent to the following XML file:
<?xml version="1.0" encoding="UTF-8"?> <ChasteParameters> <Simulation> <SpaceDimension>3</SpaceDimension> <Domain>Mono</Domain> <IonicModels> <Default><Hardcoded>LuoRudyI</Hardcoded></Default> </IonicModels> <OutputDirectory>ChasteResults</OutputDirectory> <OutputFilenamePrefix>SimulationResults</OutputFilenamePrefix> </Simulation> <Physiological> <IntracellularConductivities longi="1.75" trans="1.75" normal="1.75" unit="mS/cm" /> <ExtracellularConductivities longi="7.0" trans="7.0" normal="7.0" unit="mS/cm" /> <BathConductivity unit="mS/cm"> 7.0 </BathConductivity> <SurfaceAreaToVolumeRatio unit="1/cm"> 1400 </SurfaceAreaToVolumeRatio> <Capacitance unit="uF/cm^2"> 1.0 </Capacitance> <Purkinje> <SurfaceAreaToVolumeRatio unit="1/cm"> 2800 </SurfaceAreaToVolumeRatio> <Capacitance unit="uF/cm^2"> 1.0 </Capacitance> <Conductivity unit="mS/cm"> 1.75 </Conductivity> </Purkinje> </Physiological> <Numerical> <TimeSteps ode="0.01" pde="0.01" printing="0.01" unit="ms" /> <KSPTolerances> <KSPAbsolute>2e-4</KSPAbsolute> </KSPTolerances> <KSPSolver>cg</KSPSolver> <KSPPreconditioner>bjacobi</KSPPreconditioner> <MeshPartitioning>parmetis</MeshPartitioning> <UseStateVariableInterpolation>no</UseStateVariableInterpolation> </Numerical> </ChasteParameters>
Definition at line 90 of file HeartConfigDefaults.hpp.
Referenced by HeartConfig::HeartConfig(), and HeartConfig::SetParametersFile().
void MergeDefaults | ( | boost::shared_ptr< cp::chaste_parameters_type > | pParams, |
boost::shared_ptr< cp::chaste_parameters_type > | pDefaults | ||
) |
Merge the default parameters (as defined by CreateDefaultParameters above) into given user parameters. Any parameter that is in the defaults but not the user parameters will have its value copied over.
pParams | the user parameters |
pDefaults | the default parameters, which must have been created by CreateDefaultParameters (or be a subset thereof) for this method to work as intended |
Definition at line 184 of file HeartConfigDefaults.hpp.
References ELSE_IF_DEFAULT, and MERGE_PARAM.
Referenced by HeartConfig::LoadFromCheckpoint(), and HeartConfig::SetParametersFile().