Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
IInternalLinearSolverT.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7#pragma once
8
9#include <arccore/message_passing/MessagePassingGlobal.h>
10#include <alien/utils/Precomp.h>
11#include <memory>
12
13/*---------------------------------------------------------------------------*/
14/*---------------------------------------------------------------------------*/
15
16namespace Alien
17{
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22class ILinearAlgebra;
23class SolverStat;
24struct SolverStatus;
25
35template <class Matrix, class Vector>
37{
38 public:
41
50 virtual void updateParallelMng([[maybe_unused]] Arccore::MessagePassing::IMessagePassingMng* pm) {}
51
53 virtual void init() {}
54
56 virtual void end() {}
57
65 virtual bool solve(const Matrix& A, const Vector& b, Vector& x) = 0;
66
75 virtual SolverStat const& getSolverStat() const = 0;
76
85 virtual SolverStat& getSolverStat() = 0;
86
91 virtual bool hasParallelSupport() const = 0;
92
97 virtual const SolverStatus& getStatus() const = 0;
98
103 virtual std::shared_ptr<ILinearAlgebra> algebra() const
104 {
105 return std::shared_ptr<ILinearAlgebra>();
106 }
107};
108
109/*---------------------------------------------------------------------------*/
110/*---------------------------------------------------------------------------*/
111
112} // namespace Alien
113
114/*---------------------------------------------------------------------------*/
115/*---------------------------------------------------------------------------*/
Internal linear solver interface.
virtual void end()
Finalize the linear solver.
virtual void updateParallelMng(Arccore::MessagePassing::IMessagePassingMng *pm)
Update parallel manager.
virtual SolverStat const & getSolverStat() const =0
Get statistics on the solve phase.
virtual SolverStat & getSolverStat()=0
Get statistics on the solve phase.
virtual ~IInternalLinearSolver()
Free resources.
virtual const SolverStatus & getStatus() const =0
Get solver resolution status.
virtual void init()
Initialize the linear solver.
virtual bool hasParallelSupport() const =0
Indicates if the kernel is parallel.
virtual std::shared_ptr< ILinearAlgebra > algebra() const
Get compatible linear algebra.
virtual bool solve(const Matrix &A, const Vector &b, Vector &x)=0
Solve the linear system A * x = b.
Interface for linear algebra.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition BackEnd.h:17
Structure to store a solver status.