Revision a5f86cc25cdb4de1ff0c204fd0fd8a3e3c38e6e9 authored by Norbert Grunwald on 24 September 2021, 10:00:35 UTC, committed by Norbert Grunwald on 24 September 2021, 10:00:35 UTC
TH2M Benchmark test Liakopoulos See merge request ogs/ogs!3795
VariableType.cpp
/**
* \file
*
* \copyright
* Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*/
#include "VariableType.h"
#include <boost/algorithm/string/predicate.hpp>
#include "BaseLib/Error.h"
namespace MaterialPropertyLib
{
Variable convertStringToVariable(std::string const& string)
{
for (int i = 0; i < static_cast<int>(Variable::number_of_variables); ++i)
{
if (boost::iequals(string, variable_enum_to_string[i]))
{
return static_cast<Variable>(i);
}
}
OGS_FATAL(
"The variable name '{:s}' does not correspond to any known variable",
string);
}
} // namespace MaterialPropertyLib
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...