// finally write the new value into the database
entries->put(path + path_separator + "value", entry_value);
+
+ auto map_iter = entries_set_status.find(path);
+ if (map_iter != entries_set_status.end())
+ map_iter->second =
+ std::pair<bool, bool>(map_iter->second.first, true);
+ else
+ AssertThrow(false,
+ ExcMessage("Could not find parameter " + path +
+ " in map entries_set_status."));
}
else
{
#include "../tests.h"
void
-success()
+success(const std::string &filename)
{
unsigned int dim = 2;
std::string precision = "double";
try
{
- std::string source = SOURCE_DIR;
- std::string filename = source + "/prm/parameter_handler_26_success.json";
prm.parse_input(filename, "", true, true);
}
catch (std::exception &exc)
}
void
-fail()
+fail(const std::string &filename)
{
unsigned int dim = 2;
std::string precision = "double";
try
{
- std::string source = SOURCE_DIR;
- std::string filename = source + "/prm/parameter_handler_26_fail.json";
prm.parse_input(filename, "", true, true);
}
catch (std::exception &exc)
initlog();
deallog.get_file_stream().precision(3);
+ const std::string source = SOURCE_DIR;
try
{
- success();
- fail();
+ success(source + "/prm/parameter_handler_26_success.json");
+ fail(source + "/prm/parameter_handler_26_fail.json");
+ success(source + "/prm/parameter_handler_26_success.prm");
+ fail(source + "/prm/parameter_handler_26_fail.prm");
}
catch (std::exception &exc)
{
correct.
--------------------------------------------------------
+DEAL::
+DEAL::successful
+DEAL::
+--------------------------------------------------------
+An error occurred in file <parameter_handler.cc> in function
+ void dealii::ParameterHandler::assert_that_entries_have_been_set() const
+The violated condition was:
+ entries_wrongly_not_set.size() == 0
+Additional information:
+ Not all entries of the parameter handler that were declared with
+ `has_to_be_set = true` have been set. The following parameters
+
+ General.Precision
+ General.dim
+
+ have not been set. A possible reason might be that you did not add
+ these parameter to the input file or that their spelling is not
+ correct.
+--------------------------------------------------------
+