swh:1:snp:f521c49ab17ef7db6ec70b2430e1ed203f50383f
Raw File
Tip revision: ea8796f1311f7c3ce550d1c29e507a6c3f748796 authored by Dmitry Yu. Naumov on 30 August 2021, 14:08:41 UTC
Merge branch 'SpeedupDirichletBCsForDeactivatedSubdomains' into 'master'
Tip revision: ea8796f
CreateTESProcess.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 "CreateTESProcess.h"

#include "ProcessLib/Output/CreateSecondaryVariables.h"
#include "ProcessLib/Utils/ProcessUtils.h"
#include "TESProcess.h"

namespace ProcessLib
{
namespace TES
{
std::unique_ptr<Process> createTESProcess(
    std::string 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)
{
    //! \ogs_file_param{prj__processes__process__type}
    config.checkConfigParameter("type", "TES");

    DBUG("Create TESProcess.");

    //! \ogs_file_param{prj__processes__process__TES__process_variables}
    auto const pv_config = config.getConfigSubtree("process_variables");

    auto per_process_variables = findProcessVariables(
        variables, pv_config,
        {//! \ogs_file_param_special{prj__processes__process__TES__process_variables__fluid_pressure}
         "fluid_pressure",
         //! \ogs_file_param_special{prj__processes__process__TES__process_variables__temperature}
         "temperature",
         //! \ogs_file_param_special{prj__processes__process__TES__process_variables__vapour_mass_fraction}
         "vapour_mass_fraction"});
    std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
        process_variables;
    process_variables.push_back(std::move(per_process_variables));

    SecondaryVariableCollection secondary_variables;

    ProcessLib::createSecondaryVariables(config, secondary_variables);

    return std::make_unique<TESProcess>(
        std::move(name), mesh, std::move(jacobian_assembler), parameters,
        integration_order, std::move(process_variables),
        std::move(secondary_variables), config);
}

}  // namespace TES
}  // namespace ProcessLib
back to top