swh:1:snp:6088ab52ef49920e01e3f334cdf4d5d6c8a822b9
Raw File
Tip revision: a611f04c98d19298768351b98832f8b804425da7 authored by Norbert Grunwald on 20 September 2021, 13:08:24 UTC
update tests.cmake to include PT_full test
Tip revision: a611f04
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