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
00081 boost::shared_ptr<cp::chaste_parameters_type> CreateDefaultParameters()
00082 {
00083
00084 cp::simulation_type simulation_params;
00085 simulation_params.SpaceDimension().set(3);
00086 cp::domain_type domain("Mono");
00087 simulation_params.Domain().set(domain);
00088 cp::ionic_model_selection_type default_ionic_model;
00089 cp::ionic_models_available_type ionic_model("LuoRudyI");
00090 default_ionic_model.Hardcoded().set(ionic_model);
00091 cp::ionic_models_type ionic_models(default_ionic_model);
00092 simulation_params.IonicModels().set(ionic_models);
00093 simulation_params.OutputDirectory().set("ChasteResults");
00094 simulation_params.OutputFilenamePrefix().set("SimulationResults");
00095
00096
00097 cp::physiological_type phys_params;
00098 XSD_CREATE_WITH_FIXED_ATTR3(cp::conductivities_type, intra_conductivities,
00099 1.75, 1.75, 1.75, "mS/cm");
00100 phys_params.IntracellularConductivities().set(intra_conductivities);
00101 XSD_CREATE_WITH_FIXED_ATTR3(cp::conductivities_type, extra_conductivities,
00102 7.0, 7.0, 7.0, "mS/cm");
00103 phys_params.ExtracellularConductivities().set(extra_conductivities);
00104 XSD_CREATE_WITH_FIXED_ATTR1(cp::conductivity_type, bath_conductivity, 7.0, "mS/cm");
00105 phys_params.BathConductivity().set(bath_conductivity);
00106 XSD_CREATE_WITH_FIXED_ATTR1(cp::inverse_length_type, surface_area_to_volume_ratio, 1400, "1/cm");
00107 phys_params.SurfaceAreaToVolumeRatio().set(surface_area_to_volume_ratio);
00108 XSD_CREATE_WITH_FIXED_ATTR1(cp::capacitance_type, capacitance, 1.0, "uF/cm^2");
00109 phys_params.Capacitance().set(capacitance);
00110
00111
00112 cp::numerical_type numerical_params;
00113 XSD_CREATE_WITH_FIXED_ATTR3(cp::time_steps_type, timesteps, 0.01, 0.01, 0.01, "ms");
00114 cp::ksp_tolerances_type tolerances;
00115 tolerances.KSPAbsolute().set(2e-4);
00116 cp::ksp_solver_type ksp_solver("cg");
00117 cp::ksp_preconditioner_type ksp_precond("bjacobi");
00118 cp::mesh_partitioning_type mesh_partitioning("metis");
00119 numerical_params.TimeSteps().set(timesteps);
00120 numerical_params.KSPTolerances().set(tolerances);
00121 numerical_params.KSPSolver().set(ksp_solver);
00122 numerical_params.KSPPreconditioner().set(ksp_precond);
00123 numerical_params.MeshPartitioning().set(mesh_partitioning);
00124 numerical_params.UseStateVariableInterpolation().set(cp::yesno_type::no);
00125
00126
00127 cp::postprocessing_type postproc;
00128
00129
00130 boost::shared_ptr<cp::chaste_parameters_type> p_defaults(new cp::chaste_parameters_type(phys_params, numerical_params));
00131 p_defaults->Simulation().set(simulation_params);
00132 p_defaults->PostProcessing().set(postproc);
00133 return p_defaults;
00134 }
00135
00136 #endif