OGS
CreateTESProcess.cpp
Go to the documentation of this file.
1
11#include "CreateTESProcess.h"
12
15#include "TESProcess.h"
16
17namespace ProcessLib
18{
19namespace TES
20{
21std::unique_ptr<Process> createTESProcess(
22 std::string const& name,
23 MeshLib::Mesh& mesh,
24 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
25 std::vector<ProcessVariable> const& variables,
26 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
27 unsigned const integration_order,
28 BaseLib::ConfigTree const& config)
29{
31 config.checkConfigParameter("type", "TES");
32
33 DBUG("Create TESProcess.");
34
36
38 auto const pv_config = config.getConfigSubtree("process_variables");
39
41 auto per_process_variables = findProcessVariables(
42 variables, pv_config,
43 {
44 "fluid_pressure",
46 "temperature",
48 "vapour_mass_fraction"});
49 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
50 process_variables;
51 process_variables.push_back(std::move(per_process_variables));
52
53 SecondaryVariableCollection secondary_variables;
54
55 ProcessLib::createSecondaryVariables(config, secondary_variables);
56
57 return std::make_unique<TESProcess>(
58 std::move(name), mesh, std::move(jacobian_assembler), parameters,
59 integration_order, std::move(process_variables),
60 std::move(secondary_variables), config);
61}
62
63} // namespace TES
64} // namespace ProcessLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
ConfigTree getConfigSubtree(std::string const &root) const
void checkConfigParameter(std::string const &param, std::string_view const value) const
Handles configuration of several secondary variables from the project file.
std::unique_ptr< Process > createTESProcess(std::string const &name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< ProcessVariable > const &variables, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, unsigned const integration_order, BaseLib::ConfigTree const &config)
std::vector< std::reference_wrapper< ProcessVariable > > findProcessVariables(std::vector< ProcessVariable > const &variables, BaseLib::ConfigTree const &pv_config, std::initializer_list< std::string > tags)
void createSecondaryVariables(BaseLib::ConfigTree const &config, SecondaryVariableCollection &secondary_variables)