Revision 140004c45e7f998da1cf2f1d0da52ce85f779a5c authored by eike-radeisen on 25 October 2023, 09:22:38 UTC, committed by eike-radeisen on 25 October 2023, 09:22:38 UTC
New bimodal strain-dependent water retention model based on van Genuchten See merge request ogs/ogs!4752
Utils.cpp
/**
* \file
* \copyright
* Copyright (c) 2012-2023, 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 "Utils.h"
namespace ParameterLib
{
ParameterBase* findParameterByName(
std::string const& parameter_name,
std::vector<std::unique_ptr<ParameterBase>> const& parameters)
{
// Find corresponding parameter by name.
auto const it =
std::find_if(parameters.cbegin(), parameters.cend(),
[¶meter_name](std::unique_ptr<ParameterBase> const& p)
{ return p->name == parameter_name; });
if (it == parameters.end())
{
return nullptr;
}
DBUG("Found parameter `{:s}'.", (*it)->name);
return it->get();
}
} // namespace ParameterLib
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...