https://gitlab.opengeosys.org/ogs/ogs.git
Raw File
Tip revision: 96cd9590182192387d171208b1d1e4a39b220612 authored by Lars Bilke on 04 March 2021, 12:52:59 UTC
[doxygen] Added preprocessor macros to complete docs.
Tip revision: 96cd959
LinearSolverOptions.h
/**
 * \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
 *
 */

#pragma once

#include "BaseLib/ConfigTree.h"

namespace MathLib
{

/*! Ignore linear solver settings not needed for the selected one.
 *
 * The project files support specifying linear solver options for all
 * known solver libraries (currently PETSC, LIS, Eigen) even though for
 * a specific build only one of those settings is used.
 * That clearly conflicts with the requirement of the config tree that
 * each setting present in the project file must be read exactly once.
 *
 * The purpose of this function is to explicitly ignore all the settings
 * that are not relevant for the currently used linear solver
 *
 * \param config The config tree snippet for the linear solver.
 * \param solver_name The tag under which the relevant configuration is found.
 *                    All other configurations will be ignored.
 *
 * This function is currently used in the option parsing code of our
 * \c EigenLinearSolver, \c LisOption and \c PETScLinearSolver
 */
void ignoreOtherLinearSolvers(BaseLib::ConfigTree const& config,
                              std::string const& solver_name);

}  // namespace MathLib
back to top