PolyDiM
C++ library for POLYtopal DIscretization Methods
Loading...
Searching...
No Matches
ILinearSolver.hpp
Go to the documentation of this file.
1// _LICENSE_HEADER_
2//
3// Copyright (C) 2019 - 2025.
4// Terms register on the GPL-3.0 license.
5//
6// This file can be redistributed and/or modified under the license terms.
7//
8// See top level LICENSE file for more details.
9//
10// This file can be used citing references in CITATION.cff file.
11
12#ifndef __ILINEARSOLVER_H
13#define __ILINEARSOLVER_H
14
15#include "IArray.hpp"
16#include "ISparseArray.hpp"
17
18namespace Gedim
19{
22{
23 public:
25 {
26 unsigned int MaxIterations;
27 double Tolerance;
28 };
29
31 {
32 unsigned int Iterations;
33 double Residual;
34 };
35
36 public:
38 {
39 }
40
45 virtual void Initialize(const ISparseArray &matrix,
46 const IArray &rightHandSide,
47 IArray &solution,
48 const Configuration &config = {100, 1e-6}) = 0;
49
51 virtual SolutionInfo Solve() const = 0;
52
55 virtual void Initialize(const ISparseArray &matrix, const Configuration &config = {100, 1e-6}) = 0;
56
60 virtual SolutionInfo Solve(const IArray &rightHandSide, IArray &solution) const = 0;
61};
62} // namespace Gedim
63
64#endif // __ILINEARSOLVER_H
Eigen column vector.
Definition Eigen_Array.hpp:23
Interface used for column double Array.
Definition IArray.hpp:23
Interface used for algebra linear solvers.
Definition ILinearSolver.hpp:22
virtual void Initialize(const ISparseArray &matrix, const Configuration &config={100, 1e-6})=0
Initialize the linear solver for system Ax = b.
virtual SolutionInfo Solve() const =0
Compute the solution.
virtual SolutionInfo Solve(const IArray &rightHandSide, IArray &solution) const =0
Compute the solution for system Ax = b.
virtual void Initialize(const ISparseArray &matrix, const IArray &rightHandSide, IArray &solution, const Configuration &config={100, 1e-6})=0
Initialize the linear solver Ax = b.
virtual ~ILinearSolver()
Definition ILinearSolver.hpp:37
Interface used for sparse Array of double.
Definition ISparseArray.hpp:25
Definition Eigen_Array.cpp:22
Definition ILinearSolver.hpp:25
double Tolerance
Definition ILinearSolver.hpp:27
unsigned int MaxIterations
Definition ILinearSolver.hpp:26
Definition ILinearSolver.hpp:31
double Residual
Definition ILinearSolver.hpp:33
unsigned int Iterations
Definition ILinearSolver.hpp:32