[cig-commits] commit by bangerth to /var/svn/dealii/aspect
dealii.demon at gmail.com
dealii.demon at gmail.com
Thu Aug 22 11:40:49 PDT 2013
Revision 1848
Newer deal.II versions check that the default value of parameters matches the pattern. That is not the case for some of the plugin model names. Fix this.
U trunk/aspect/source/boundary_temperature/interface.cc
U trunk/aspect/source/geometry_model/interface.cc
U trunk/aspect/source/gravity_model/interface.cc
U trunk/aspect/source/initial_conditions/interface.cc
U trunk/aspect/source/material_model/interface.cc
http://www.dealii.org/websvn/revision.php?repname=Aspect+Repository&path=%2F&rev=1848&peg=1848
Diff:
Modified: trunk/aspect/source/boundary_temperature/interface.cc
===================================================================
--- trunk/aspect/source/boundary_temperature/interface.cc 2013-08-18 14:25:25 UTC (rev 1847)
+++ trunk/aspect/source/boundary_temperature/interface.cc 2013-08-22 18:39:47 UTC (rev 1848)
@@ -107,11 +107,19 @@
{
const std::string pattern_of_names
= std_cxx1x::get<dim>(registered_plugins).get_pattern_of_names ();
- prm.declare_entry ("Model name", "",
- Patterns::Selection (pattern_of_names),
- "Select one of the following models:
"
- +
- std_cxx1x::get<dim>(registered_plugins).get_description_string());
+ try
+ {
+ prm.declare_entry ("Model name", "",
+ Patterns::Selection (pattern_of_names),
+ "Select one of the following models:
"
+ +
+ std_cxx1x::get<dim>(registered_plugins).get_description_string());
+ }
+ catch (const ParameterHandler::ExcValueDoesNotMatchPattern &)
+ {
+ // ignore the fact that the default value for this parameter
+ // does not match the pattern
+ }
}
prm.leave_subsection ();
Modified: trunk/aspect/source/geometry_model/interface.cc
===================================================================
--- trunk/aspect/source/geometry_model/interface.cc 2013-08-18 14:25:25 UTC (rev 1847)
+++ trunk/aspect/source/geometry_model/interface.cc 2013-08-22 18:39:47 UTC (rev 1848)
@@ -103,11 +103,19 @@
{
const std::string pattern_of_names
= std_cxx1x::get<dim>(registered_plugins).get_pattern_of_names ();
+ try
+ {
prm.declare_entry ("Model name", "",
Patterns::Selection (pattern_of_names),
"Select one of the following models:
"
+
std_cxx1x::get<dim>(registered_plugins).get_description_string());
+ }
+ catch (const ParameterHandler::ExcValueDoesNotMatchPattern &)
+ {
+ // ignore the fact that the default value for this parameter
+ // does not match the pattern
+ }
}
prm.leave_subsection ();
Modified: trunk/aspect/source/gravity_model/interface.cc
===================================================================
--- trunk/aspect/source/gravity_model/interface.cc 2013-08-18 14:25:25 UTC (rev 1847)
+++ trunk/aspect/source/gravity_model/interface.cc 2013-08-22 18:39:47 UTC (rev 1848)
@@ -110,11 +110,19 @@
{
const std::string pattern_of_names
= std_cxx1x::get<dim>(registered_plugins).get_pattern_of_names ();
+ try
+ {
prm.declare_entry ("Model name", "",
Patterns::Selection (pattern_of_names),
"Select one of the following models:
"
+
std_cxx1x::get<dim>(registered_plugins).get_description_string());
+ }
+ catch (const ParameterHandler::ExcValueDoesNotMatchPattern &)
+ {
+ // ignore the fact that the default value for this parameter
+ // does not match the pattern
+ }
}
prm.leave_subsection ();
Modified: trunk/aspect/source/initial_conditions/interface.cc
===================================================================
--- trunk/aspect/source/initial_conditions/interface.cc 2013-08-18 14:25:25 UTC (rev 1847)
+++ trunk/aspect/source/initial_conditions/interface.cc 2013-08-22 18:39:47 UTC (rev 1848)
@@ -125,11 +125,19 @@
{
const std::string pattern_of_names
= std_cxx1x::get<dim>(registered_plugins).get_pattern_of_names ();
+ try
+ {
prm.declare_entry ("Model name", "",
Patterns::Selection (pattern_of_names),
"Select one of the following models:
"
+
std_cxx1x::get<dim>(registered_plugins).get_description_string());
+ }
+ catch (const ParameterHandler::ExcValueDoesNotMatchPattern &)
+ {
+ // ignore the fact that the default value for this parameter
+ // does not match the pattern
+ }
}
prm.leave_subsection ();
Modified: trunk/aspect/source/material_model/interface.cc
===================================================================
--- trunk/aspect/source/material_model/interface.cc 2013-08-18 14:25:25 UTC (rev 1847)
+++ trunk/aspect/source/material_model/interface.cc 2013-08-22 18:39:47 UTC (rev 1848)
@@ -304,11 +304,19 @@
{
const std::string pattern_of_names
= std_cxx1x::get<dim>(registered_plugins).get_pattern_of_names ();
- prm.declare_entry ("Model name", "",
- Patterns::Selection (pattern_of_names),
- "Select one of the following models:
"
- +
- std_cxx1x::get<dim>(registered_plugins).get_description_string());
+ try
+ {
+ prm.declare_entry ("Model name", "",
+ Patterns::Selection (pattern_of_names),
+ "Select one of the following models:
"
+ +
+ std_cxx1x::get<dim>(registered_plugins).get_description_string());
+ }
+ catch (const ParameterHandler::ExcValueDoesNotMatchPattern &)
+ {
+ // ignore the fact that the default value for this parameter
+ // does not match the pattern
+ }
}
prm.leave_subsection ();
More information about the CIG-COMMITS
mailing list