Revision 1a8392de8a8fa45dbdb1e2da1f525b9e9338d991 authored by wenqing on 12 July 2021, 08:14:46 UTC, committed by wenqing on 12 July 2021, 08:14:46 UTC
Changed the type of temperature reference to Parameter in the SmallDefomation project files

Closes #3168

See merge request ogs/ogs!3702
2 parent s f4a331e + 0ebe8aa
Raw File
PropertyType.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 "PropertyType.h"

#include <boost/algorithm/string/predicate.hpp>

#include "BaseLib/Error.h"

namespace MaterialPropertyLib
{
PropertyType convertStringToProperty(std::string const& string)
{
    for (int i = 0; i < static_cast<int>(PropertyType::number_of_properties);
         ++i)
    {
        if (boost::iequals(string, property_enum_to_string[i]))
        {
            return static_cast<PropertyType>(i);
        }
    }

    OGS_FATAL(
        "The property name '{:s}' does not correspond to any known property",
        string);
}
}  // namespace MaterialPropertyLib
back to top