https://gitlab.opengeosys.org/ogs/ogs.git
Raw File
Tip revision: 7f929a5108ab58cf1be0bb5093daf71becdbd8ec authored by Lars Bilke on 09 February 2021, 12:19:51 UTC
[CMake] Removed option OGS_USE_EIGEN.
Tip revision: 7f929a5
SourceTerm.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 "SourceTerm.h"

namespace DataHolderLib
{
SourceTerm::SourceTerm(ProcessVariable const& process_var,
                       std::string const& param_name, ConditionType type)
    : FemCondition(process_var, param_name), _type(type)
{
}

SourceTerm::ConditionType SourceTerm::convertStringToType(
    std::string const& str)
{
    if (str == "Nodal")
    {
        return ConditionType::NODAL;
    }
    if (str == "Volume")
    {
        return ConditionType::VOLUME;
    }

    return ConditionType::NONE;
}

std::string SourceTerm::convertTypeToString(ConditionType type)
{
    if (type == ConditionType::NODAL)
    {
        return "Nodal";
    }
    if (type == ConditionType::VOLUME)
    {
        return "Volume";
    }

    return "";
}

}  // namespace DataHolderLib
back to top