Arcane  4.2.2.0
Developer documentation
Loading...
Searching...
No Matches
HypreComparer.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/*---------------------------------------------------------------------------*/
8/* HypreComparer.h (C) 2000-2026 */
9/* */
10/* Utilitary class to use Hypre as a solver for sample matrix. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_ALINA_SAMPLES_HYPRECOMPARER_H
13#define ARCCORE_ALINA_SAMPLES_HYPRECOMPARER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arccore/alina/AlinaGlobal.h"
18
19#include <vector>
20#include <cstddef>
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25class HypreComparer
26{
27 public:
28
29 HypreComparer(bool do_mpi_init_and_finalize)
30 : m_do_mpi_init_and_finalize(do_mpi_init_and_finalize)
31 {
32 }
33 ~HypreComparer();
34
35 public:
36
37 void solve(int nb_row,
38 std::vector<ptrdiff_t> const& _ptr,
39 std::vector<ptrdiff_t> const& _col,
40 std::vector<double> const& _val,
41 std::vector<double> const& _rhs,
42 std::vector<double>& _x,
43 int argc, char* argv[]);
44
45 private:
46
47 bool m_do_mpi_init_and_finalize = false;
48 bool m_need_finalize = false;
49};
50
51/*---------------------------------------------------------------------------*/
52/*---------------------------------------------------------------------------*/
53
54#endif
55
56/*---------------------------------------------------------------------------*/
57/*---------------------------------------------------------------------------*/