Skip to content
Snippets Groups Projects
Commit 30eaaefa authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

Move linear_solver documentation.

parent c7f3097d
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 21 deletions
......@@ -471,7 +471,7 @@ void ProjectData::parseLinearSolvers(BaseLib::ConfigTree const& config)
//! \ogs_file_param{prj__linear_solvers__linear_solver}
for (auto conf : config.getConfigSubtreeList("linear_solver"))
{
//! \ogs_file_param{linear_solver__name}
//! \ogs_file_param{prj__linear_solvers__linear_solver__name}
auto const name = conf.getConfigParameter<std::string>("name");
BaseLib::insertIfKeyUniqueElseError(
_linear_solvers,
......
......@@ -14,7 +14,7 @@ different prefixes, namely:
file.<br>
Usually one can choose one of several cases by specifying the associated
<tt>&lt;type&gt;</tt> tag in the input file.<br>
Example: \ref ogs_file_param__linear_solver
Example: \ref ogs_file_param__prj__linear_solvers__linear_solver
and \ref ogs_file_param__parameter__Constant (<tt>&lt;type&gt;Constant&lt;/type&gt;</tt>)
vs. \ref ogs_file_param__parameter__MeshNode (<tt>&lt;type&gt;MeshNode&lt;/type&gt;</tt>)
......
In this group the configuration of linear solvers is described.
Unlike all other options, there can be configurations for linear solvers from
the Eigen, LIS, PETSc, etc. libraries at the same time. Which solver will be
applied in the end is determined by the build configuration of the OGS
executable.
Contains linear solver settings.
In this group the configuration of linear solvers is described.
The linear solvers are distinguished by their names.
Defines a single linear solver.
See \ref ogs_file_param__linear_solver.
Unlike all other options, there can be configurations for linear solvers from
the Eigen, LIS, PETSc, etc. libraries at the same time. Which solver will be
applied in the end is determined by the build configuration of the OGS
executable.
Specifies the linear solver used to solve the linearized equation systems.
The linear solver is referenced by \ref ogs_file_param__linear_solver__name
The linear solver is referenced by \ref ogs_file_param__prj__linear_solvers__linear_solver__name
"name".
......@@ -218,33 +218,33 @@ EigenLinearSolver::~EigenLinearSolver() = default;
void EigenLinearSolver::setOption(BaseLib::ConfigTree const& option)
{
ignoreOtherLinearSolvers(option, "eigen");
//! \ogs_file_param{linear_solver__eigen}
//! \ogs_file_param{prj__linear_solvers__linear_solver__eigen}
auto const ptSolver = option.getConfigSubtreeOptional("eigen");
if (!ptSolver)
return;
if (auto solver_type =
//! \ogs_file_param{linear_solver__eigen__solver_type}
//! \ogs_file_param{prj__linear_solvers__linear_solver__eigen__solver_type}
ptSolver->getConfigParameterOptional<std::string>("solver_type")) {
_option.solver_type = _option.getSolverType(*solver_type);
}
if (auto precon_type =
//! \ogs_file_param{linear_solver__eigen__precon_type}
//! \ogs_file_param{prj__linear_solvers__linear_solver__eigen__precon_type}
ptSolver->getConfigParameterOptional<std::string>("precon_type")) {
_option.precon_type = _option.getPreconType(*precon_type);
}
if (auto error_tolerance =
//! \ogs_file_param{linear_solver__eigen__error_tolerance}
//! \ogs_file_param{prj__linear_solvers__linear_solver__eigen__error_tolerance}
ptSolver->getConfigParameterOptional<double>("error_tolerance")) {
_option.error_tolerance = *error_tolerance;
}
if (auto max_iteration_step =
//! \ogs_file_param{linear_solver__eigen__max_iteration_step}
//! \ogs_file_param{prj__linear_solvers__linear_solver__eigen__max_iteration_step}
ptSolver->getConfigParameterOptional<int>("max_iteration_step")) {
_option.max_iterations = *max_iteration_step;
}
if (auto scaling =
//! \ogs_file_param{linear_solver__eigen__scaling}
//! \ogs_file_param{prj__linear_solvers__linear_solver__eigen__scaling}
ptSolver->getConfigParameterOptional<bool>("scaling")) {
#ifdef USE_EIGEN_UNSUPPORTED
_option.scaling = *scaling;
......
......@@ -44,7 +44,7 @@ struct LisOption
{
if (options) {
ignoreOtherLinearSolvers(*options, "lis");
//! \ogs_file_param{linear_solver__lis}
//! \ogs_file_param{prj__linear_solvers__linear_solver__lis}
if (auto s = options->getConfigParameterOptional<std::string>("lis")) {
if (!s->empty()) {
_option_string += " " + *s;
......
......@@ -33,16 +33,16 @@ PETScLinearSolver::PETScLinearSolver(const std::string /*prefix*/,
if (option) {
ignoreOtherLinearSolvers(*option, "petsc");
//! \ogs_file_param{linear_solver__petsc}
//! \ogs_file_param{prj__linear_solvers__linear_solver__petsc}
if (auto const subtree = option->getConfigSubtreeOptional("petsc"))
{
if (auto const parameters =
//! \ogs_file_param{linear_solver__petsc__parameters}
//! \ogs_file_param{prj__linear_solvers__linear_solver__petsc__parameters}
subtree->getConfigParameterOptional<std::string>("parameters")) {
petsc_options = *parameters;
}
//! \ogs_file_param{linear_solver__petsc__prefix}
//! \ogs_file_param{prj__linear_solvers__linear_solver__petsc__prefix}
if (auto const pre = subtree->getConfigParameterOptional<std::string>("prefix")) {
if (!pre->empty())
prefix = *pre + "_";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment