OGS
CreateTemperatureDependentDiffusion.cpp
Go to the documentation of this file.
1
10#include "BaseLib/ConfigTree.h"
11#include "ParameterLib/Utils.h"
13
14namespace MaterialPropertyLib
15{
16std::unique_ptr<Property> createTemperatureDependentDiffusion(
17 BaseLib::ConfigTree const& config,
18 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters)
19{
21 config.checkConfigParameter("type", "TemperatureDependentDiffusion");
22
25 config.getConfigParameter<std::string>("reference_diffusion"),
26 parameters, 0, nullptr);
27
28 auto const Ea =
30 config.getConfigParameter<double>("activation_energy");
31
32 auto const T0 =
34 config.getConfigParameter<double>("reference_temperature");
35
36 return std::make_unique<TemperatureDependentDiffusion>(D0, Ea, T0);
37}
38} // namespace MaterialPropertyLib
T getConfigParameter(std::string const &param) const
void checkConfigParameter(std::string const &param, std::string_view const value) const
std::unique_ptr< Property > createTemperatureDependentDiffusion(BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters)
OGS_NO_DANGLING Parameter< ParameterDataType > & findParameter(std::string const &parameter_name, std::vector< std::unique_ptr< ParameterBase > > const &parameters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
Definition Utils.h:102