Line data Source code
1 : // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 : // SPDX-License-Identifier: Apache-2.0
3 :
4 : #ifndef PALACE_LINALG_AMG_HPP
5 : #define PALACE_LINALG_AMG_HPP
6 :
7 : #include <mfem.hpp>
8 : #include "utils/iodata.hpp"
9 :
10 : namespace palace
11 : {
12 :
13 : //
14 : // A wrapper for Hypre's BoomerAMG solver.
15 : //
16 : class BoomerAmgSolver : public mfem::HypreBoomerAMG
17 : {
18 : public:
19 : BoomerAmgSolver(int cycle_it = 1, int smooth_it = 1, bool agg_coarsen = true,
20 : int print = 0);
21 : BoomerAmgSolver(const IoData &iodata, bool coarse_solver, int print)
22 0 : : BoomerAmgSolver(coarse_solver ? 1 : iodata.solver.linear.mg_cycle_it,
23 0 : iodata.solver.linear.mg_smooth_it,
24 0 : iodata.solver.linear.amg_agg_coarsen, print)
25 : {
26 0 : }
27 : };
28 :
29 : } // namespace palace
30 :
31 : #endif // PALACE_LINALG_AMG_HPP
|