21#include "arccore/common/Array.h"
23#include "arccore/message_passing_mpi/StandaloneMpiMessagePassingMng.h"
25#include "arccore/alina/AlinaLib.h"
27#include "./SampleProblemCommon.h"
29#include <gtest/gtest.h>
32using namespace Arcane::AlinaLib;
34TEST(alina_test_mpi, DistributedAlinaLib)
38 int comm_rank = mpm->commRank();
39 int comm_size = mpm->commSize();
44 using ColumnType = Int32;
48 std::vector<ColumnType> ptr;
49 std::vector<ColumnType> col;
50 std::vector<double> val;
51 std::vector<double> rhs;
53 Int32 chunk = Alina::PoissonProblemGenerator::createDistributedMatrix(comm_rank, comm_size, n, 1, ptr, col, val, rhs);
58 prm.setString(
"precond.coarsening.type",
"smoothed_aggregation");
59 prm.setString(
"precond.relax.type",
"spai0");
66 AlinaDistributedSolver solver(prm, matrix_view);
70 std::cout <<
"Iterations: " << cnv.iterations << std::endl
71 <<
"Error: " << cnv.residual << std::endl;
CSR Matrix view used in AlinaLib.
Handle parameters for solvers.
static Ref< IMessagePassingMng > createRef(MPI_Comm comm, bool clean_comm=false)
Creates a manager associated with the communicator comm.
InstanceType * get() const
Associated instance or nullptr if none.
Reference to an instance.
View of an array of elements of type T.
1D data vector with value semantics (STL style).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --