00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef HEARTCONFIGDEFAULTS_HPP_
00030 #define HEARTCONFIGDEFAULTS_HPP_
00031
00079 boost::shared_ptr<cp::chaste_parameters_type> CreateDefaultParameters()
00080 {
00081
00082 cp::simulation_type simulation_params;
00083 simulation_params.SpaceDimension().set(3);
00084 cp::domain_type domain("Mono");
00085 simulation_params.Domain().set(domain);
00086 cp::ionic_model_selection_type default_ionic_model;
00087 cp::ionic_models_available_type ionic_model("LuoRudyI");
00088 default_ionic_model.Hardcoded().set(ionic_model);
00089 cp::ionic_models_type ionic_models(default_ionic_model);
00090 simulation_params.IonicModels().set(ionic_models);
00091 simulation_params.OutputDirectory().set("ChasteResults");
00092 simulation_params.OutputFilenamePrefix().set("SimulationResults");
00093
00094
00095 cp::physiological_type phys_params;
00096 XSD_CREATE_WITH_FIXED_ATTR3(cp::conductivities_type, intra_conductivities,
00097 1.75, 1.75, 1.75, "mS/cm");
00098 phys_params.IntracellularConductivities().set(intra_conductivities);
00099 XSD_CREATE_WITH_FIXED_ATTR3(cp::conductivities_type, extra_conductivities,
00100 7.0, 7.0, 7.0, "mS/cm");
00101 phys_params.ExtracellularConductivities().set(extra_conductivities);
00102 XSD_CREATE_WITH_FIXED_ATTR1(cp::conductivity_type, bath_conductivity, 7.0, "mS/cm");
00103 phys_params.BathConductivity().set(bath_conductivity);
00104 XSD_CREATE_WITH_FIXED_ATTR1(cp::inverse_length_type, surface_area_to_volume_ratio, 1400, "1/cm");
00105 phys_params.SurfaceAreaToVolumeRatio().set(surface_area_to_volume_ratio);
00106 XSD_CREATE_WITH_FIXED_ATTR1(cp::capacitance_type, capacitance, 1.0, "uF/cm^2");
00107 phys_params.Capacitance().set(capacitance);
00108
00109
00110 cp::numerical_type numerical_params;
00111 XSD_CREATE_WITH_FIXED_ATTR3(cp::time_steps_type, timesteps, 0.01, 0.01, 0.01, "ms");
00112 cp::ksp_tolerances_type tolerances;
00113 tolerances.KSPAbsolute().set(2e-4);
00114 cp::ksp_solver_type ksp_solver("cg");
00115 cp::ksp_preconditioner_type ksp_precond("bjacobi");
00116 numerical_params.TimeSteps().set(timesteps);
00117 numerical_params.KSPTolerances().set(tolerances);
00118 numerical_params.KSPSolver().set(ksp_solver);
00119 numerical_params.KSPPreconditioner().set(ksp_precond);
00120
00121
00122 cp::postprocessing_type postproc;
00123
00124
00125 boost::shared_ptr<cp::chaste_parameters_type> p_defaults(new cp::chaste_parameters_type(phys_params, numerical_params));
00126 p_defaults->Simulation().set(simulation_params);
00127 p_defaults->PostProcessing().set(postproc);
00128 return p_defaults;
00129 }
00130
00131 #endif