From: rschulz Date: Tue, 19 Jul 2005 11:12:56 +0000 (+0000) Subject: added "yes" and "no" to the possible values for bool values as read in by ParameterHa... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c31005a284f7cb8c2304f066ffbf8e3232c35d69;p=dealii-svn.git added "yes" and "no" to the possible values for bool values as read in by ParameterHandler::get_bool. git-svn-id: https://svn.dealii.org/trunk@11177 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/parameter_handler.h b/deal.II/base/include/base/parameter_handler.h index c97c055d87..27489b2b3a 100644 --- a/deal.II/base/include/base/parameter_handler.h +++ b/deal.II/base/include/base/parameter_handler.h @@ -1371,7 +1371,10 @@ class ParameterHandler /** * Return value of entry * entry_string as bool. - */ + * The entry may be "true" or "yes" + * for true, "false" or + * "no" for false respectively. + */ bool get_bool (const std::string &entry_string) const; /** diff --git a/deal.II/base/source/parameter_handler.cc b/deal.II/base/source/parameter_handler.cc index 8c5cdae149..117b20a86b 100644 --- a/deal.II/base/source/parameter_handler.cc +++ b/deal.II/base/source/parameter_handler.cc @@ -786,8 +786,8 @@ bool ParameterHandler::get_bool (const std::string &entry_string) const { std::string s = get(entry_string); - AssertThrow ((s=="true") || (s=="false"), ExcConversionError(s)); - if (s=="true") + AssertThrow ((s=="true") || (s=="false") || (s=="yes") || (s=="no"), ExcConversionError(s)); + if (s=="true" || s=="yes") return true; else return false; diff --git a/deal.II/doc/news/changes.html b/deal.II/doc/news/changes.html index f7a36431b0..96c2d02048 100644 --- a/deal.II/doc/news/changes.html +++ b/deal.II/doc/news/changes.html @@ -251,6 +251,14 @@ inconvenience this causes.

base

    +
  1. + Changed: ParameterHandler::get_bool() only accepted + "true" or "false" as boolean values, now it also considers "yes" + and "no" as "true" and "false" respectively. +
    + (Ralf B. Schulz, 2005/07/19) +

    +
  2. Removed: The write_multigrid flag in DataOutBase::DXFlags