OGS
CreateCubicLawPermeability.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
5
6#include <limits>
7#include <string>
8
11#include "ParameterLib/Utils.h"
12
13namespace MaterialPropertyLib
14{
15std::unique_ptr<Property> createCubicLawPermeability(
16 BaseLib::ConfigTree const& config,
17 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters)
18{
20 config.checkConfigParameter("type", "CubicLawPermeability");
21 DBUG("Create CubicLaw Permeability model");
22
23 // Second access for storage.
25 auto property_name = config.peekConfigParameter<std::string>("name");
26
27 auto const fracture_aperture_name =
29 config.getConfigParameter<std::string>("fracture_aperture", "");
30
32 fracture_aperture_name == ""
33 ? nullptr
35 fracture_aperture_name, parameters, 0, nullptr);
36
37 return std::make_unique<CubicLawPermeability>(std::move(property_name), b);
38}
39} // namespace MaterialPropertyLib
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
T peekConfigParameter(std::string const &param) const
T getConfigParameter(std::string const &param) const
void checkConfigParameter(std::string const &param, std::string_view const value) const
std::unique_ptr< Property > createCubicLawPermeability(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)