12#ifndef ARCCORE_ALINA_DISTRIBUTEDEIGENSPARSELUDIRECTSOLVER_H
13#define ARCCORE_ALINA_DISTRIBUTEDEIGENSPARSELUDIRECTSOLVER_H
26#include "arccore/alina/BuiltinBackend.h"
27#include "arccore/alina/EigenSolver.h"
28#include "arccore/alina/MessagePassingUtils.h"
29#include "arccore/alina/DistributedDirectSolverBase.h"
31#include <Eigen/SparseLU>
36namespace Arcane::Alina
47template <
typename value_type>
49:
public DistributedDirectSolverBase<value_type, DistributedEigenSparseLUDirectSolver<value_type>>
53 using EigenMatrix = Eigen::SparseMatrix<value_type, Eigen::ColMajor, int>;
55 typedef typename Solver::params params;
59 template <
class Matrix>
61 const params& prm = params())
64 static_cast<Base*
>(
this)->init(comm, A);
67 static size_t coarse_enough()
69 return Base::coarse_enough();
72 int comm_size(
int )
const
77 void init(mpi_communicator,
const build_matrix& A)
79 S = std::make_shared<Solver>(A, prm);
88 template <
class Vec1,
class Vec2>
89 void solve(
const Vec1& rhs, Vec2& x)
const
98 std::shared_ptr<Solver> S;
Base class for distributed direct solver.
void solve(const Vec1 &rhs, Vec2 &x) const
Solves the problem for the given right-hand side.
DistributedEigenSparseLUDirectSolver(mpi_communicator comm, const Matrix &A, const params &prm=params())
Constructor.
Wrapper around eigen direct solvers.
Matrix class, to be used by user.
Sparse matrix stored in CSR (Compressed Sparse Row) format.
Convenience wrapper around MPI_Comm.