Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
linear_solver_strategy.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2025 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
4#ifndef lethe_linear_solver_strategy_h
5#define lethe_linear_solver_strategy_h
6
8
9/**
10 * @brief The linear solver strategy class is used to solve the physics as a linear problem.
11 */
12template <typename VectorType>
14{
15public:
16 /**
17 * @brief Constructor for the linear solver strategy.
18 *
19 * @param[in] physics_solver A pointer to the physics solver to which the
20 * solving strategy is attached.
21 *
22 */
24
25
26 /**
27 * @brief Solve the linear system of equations.
28 */
29 void
30 solve() override;
31};
32
33template <typename VectorType>
38
39template <typename VectorType>
40void
50
51#endif
LinearSolverStrategy(PhysicsSolver< VectorType > *physics_solver)
Constructor for the linear solver strategy.
void solve() override
Solve the linear system of equations.
PhysicsSolver< VectorType > * physics_solver
Physics solver for which we need a non-linear solver.
PhysicsSolverStrategy(PhysicsSolver< VectorType > *physics_solver, const Parameters::NonLinearSolver &params)
Constructor for the non-linear solver strategies.
Contain all the common elements of a physics solver. It creates the non-linear solver as specified by...
virtual void solve_linear_system()=0
Solve the linear system of equations.
virtual void setup_preconditioner()=0
Set up the preconditioner.
virtual void assemble_system_matrix()=0
Assemble the matrix.
virtual void assemble_system_rhs()=0
Assemble the right-hand side (rhs).
GlobalVectorType VectorType