Revision b9d5fea916d5eb46940b1b86875a04f1a9540c6d authored by Haibing Shao on 19 January 2023, 14:30:59 UTC, committed by Haibing Shao on 15 February 2023, 08:04:12 UTC
1 parent 145c422
TimeDiscretizationBuilder.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 "TimeDiscretizationBuilder.h"
#include "BaseLib/ConfigTree.h"
#include "BaseLib/Error.h"
#include "TimeDiscretization.h"
namespace NumLib
{
std::unique_ptr<TimeDiscretization> createTimeDiscretization(
BaseLib::ConfigTree const& config)
{
//! \ogs_file_param{prj__time_loop__processes__process__time_discretization__type}
auto const type = config.getConfigParameter<std::string>("type");
//! \ogs_file_param_special{prj__time_loop__processes__process__time_discretization__BackwardEuler}
if (type == "BackwardEuler")
{
return std::make_unique<BackwardEuler>();
}
OGS_FATAL("Unrecognized time discretization type `{:s}'", type);
}
} // namespace NumLib
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...