/home/runner/work/amr-wind/amr-wind/amr-wind/core/MLMGOptions.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/core/MLMGOptions.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
MLMGOptions.H
Go to the documentation of this file.
1#ifndef MLMGOPTIONS_H
2#define MLMGOPTIONS_H
3
4#include <string>
5
6#include "AMReX_REAL.H"
7#include "AMReX_ParmParse.H"
8#include "AMReX_MLLinOp.H"
9#include "AMReX_MLMG.H"
10
11namespace Hydro {
12class NodalProjector;
13class MacProjector;
14} // namespace Hydro
15
16namespace amr_wind {
17
25{
30 explicit MLMGOptions(const std::string& prefix);
31
41 const std::string& default_prefix, const std::string& custom_prefix);
42
43 void operator()(amrex::MLMG& /*mlmg*/);
44 void operator()(Hydro::NodalProjector& /*nodal_proj*/);
45 void operator()(Hydro::MacProjector& /*mac_proj*/);
46
48 amrex::LPInfo& lpinfo() { return m_lpinfo; }
49
50 // Linear operator options
51 int max_order{2};
52
54 amrex::Real rel_tol{1.0e-11};
55
57 amrex::Real abs_tol{1.0e-14};
58
59private:
60 void parse_options(const std::string& /*prefix*/);
61
63 amrex::LPInfo m_lpinfo;
64
65 // MLMG options
66
68 std::string m_bottom_solver_type{"bicgstab"};
69
71 std::string m_hypre_namespace{"hypre"};
72
74 std::string m_hypre_interface{"ij"};
75
77 amrex::Real m_bottom_rel_tol{1.0e-4};
78
80 amrex::Real m_bottom_abs_tol{-1.0};
81
84 int m_verbose{0};
85 int m_max_iter{200};
91
100
103
107
110 bool m_do_nsolve{false};
111
113#ifdef AMREX_USE_GPU
114 int m_nsolve_grid_size{64};
115#else
117#endif
118};
119
120} // namespace amr_wind
121
122#endif /* MLMGOPTIONS_H */
Definition MLMGOptions.H:11
Definition BCInterface.cpp:7
Definition MLMGOptions.H:25
MLMGOptions(const std::string &prefix)
Definition MLMGOptions.cpp:8
int m_num_post_smooth
Definition MLMGOptions.H:88
bool m_do_fixed_iters
Definition MLMGOptions.H:106
int m_verbose
Definition MLMGOptions.H:84
void operator()(amrex::MLMG &)
Definition MLMGOptions.cpp:58
std::string m_hypre_interface
Options of hypre interface.
Definition MLMGOptions.H:74
int m_num_bottom_smooth
Definition MLMGOptions.H:90
amrex::Real m_bottom_rel_tol
Relative tolerance for convergence of MLMG solvers.
Definition MLMGOptions.H:77
amrex::LPInfo & lpinfo()
Linear operator options during construction.
Definition MLMGOptions.H:48
int max_order
Definition MLMGOptions.H:51
amrex::Real abs_tol
Absolute tolerance for convergence checks.
Definition MLMGOptions.H:57
amrex::Real m_bottom_abs_tol
Absolute tolerance for convergence checks.
Definition MLMGOptions.H:80
amrex::Real rel_tol
Relative tolerance for convergence of MLMG solvers.
Definition MLMGOptions.H:54
void parse_options(const std::string &)
Definition MLMGOptions.cpp:17
amrex::LPInfo m_lpinfo
Linear operator info object.
Definition MLMGOptions.H:63
int m_max_fmg_iters
Definition MLMGOptions.H:86
int m_bottom_verbose
Definition MLMGOptions.H:99
std::string m_hypre_namespace
Options namespace for hypre solvers.
Definition MLMGOptions.H:71
int m_num_final_smooth
Definition MLMGOptions.H:89
std::string m_bottom_solver_type
Bottom solver type bicgstab, cg, hypre, etc.
Definition MLMGOptions.H:68
int m_num_pre_smooth
Definition MLMGOptions.H:87
bool m_do_nsolve
Definition MLMGOptions.H:110
int m_bottom_max_iter
Maximum iterations for the bottom solver.
Definition MLMGOptions.H:102
int m_max_iter
Definition MLMGOptions.H:85
int m_nsolve_grid_size
set grid size for nsolve
Definition MLMGOptions.H:116