From c31005a284f7cb8c2304f066ffbf8e3232c35d69 Mon Sep 17 00:00:00 2001 From: rschulz Date: Tue, 19 Jul 2005 11:12:56 +0000 Subject: [PATCH] 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 --- deal.II/base/include/base/parameter_handler.h | 5 ++++- deal.II/base/source/parameter_handler.cc | 4 ++-- deal.II/doc/news/changes.html | 8 ++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) 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 -- 2.39.5