MLMGOptions Struct Reference

AMR-Wind API: amr_wind::MLMGOptions Struct Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches

#include <MLMGOptions.H>

Collaboration diagram for amr_wind::MLMGOptions:
[legend]

Public Member Functions

 MLMGOptions (const std::string &prefix)
 
 MLMGOptions (const std::string &default_prefix, const std::string &custom_prefix)
 
void operator() (amrex::MLMG &)
 
void operator() (Hydro::NodalProjector &)
 
void operator() (Hydro::MacProjector &)
 
amrex::LPInfo & lpinfo ()
 Linear operator options during construction.
 

Public Attributes

int max_order {2}
 
amrex::Real rel_tol {1.0e-11}
 Relative tolerance for convergence of MLMG solvers.
 
amrex::Real abs_tol {1.0e-14}
 Absolute tolerance for convergence checks.
 

Private Member Functions

void parse_options (const std::string &)
 

Private Attributes

amrex::LPInfo m_lpinfo
 Linear operator info object.
 
std::string m_bottom_solver_type {"bicgstab"}
 Bottom solver type bicgstab, cg, hypre, etc.
 
std::string m_hypre_namespace {"hypre"}
 Options namespace for hypre solvers.
 
std::string m_hypre_interface {"ij"}
 Options of hypre interface.
 
amrex::Real m_bottom_rel_tol {1.0e-4}
 Relative tolerance for convergence of MLMG solvers.
 
amrex::Real m_bottom_abs_tol {-1.0}
 Absolute tolerance for convergence checks.
 
int m_verbose {0}
 
int m_max_iter {200}
 
int m_max_fmg_iters {0}
 
int m_num_pre_smooth {2}
 
int m_num_post_smooth {2}
 
int m_num_final_smooth {8}
 
int m_num_bottom_smooth {0}
 
int m_bottom_verbose {0}
 
int m_bottom_max_iter {200}
 Maximum iterations for the bottom solver.
 
bool m_do_fixed_iters {true}
 
bool m_do_nsolve {false}
 
int m_nsolve_grid_size {16}
 set grid size for nsolve
 

Detailed Description

Interface to control the behavior of AMReX LinearSolvers

MLMGOptions provides a unified interface to set options to the linear operator object, MLMG solver, external solvers (e.g., hypre), as well as MacProjector and NodalProjector objects.

Constructor & Destructor Documentation

◆ MLMGOptions() [1/2]

amr_wind::MLMGOptions::MLMGOptions ( const std::string & prefix)
explicit

Parse user options with a given prefix

Parameters
prefixPrefix used to parse user inputs, e.g., mac_proj

◆ MLMGOptions() [2/2]

amr_wind::MLMGOptions::MLMGOptions ( const std::string & default_prefix,
const std::string & custom_prefix )

Parse options in two stages

This constructor parses the default options from default_prefix and then overrides certain options based on a custom prefix.

Parameters
default_prefixNamespace for default options
custom_prefixNamespace for override options

Member Function Documentation

◆ lpinfo()

amrex::LPInfo & amr_wind::MLMGOptions::lpinfo ( )
inline

Linear operator options during construction.

◆ operator()() [1/3]

void amr_wind::MLMGOptions::operator() ( amrex::MLMG & mlmg)

◆ operator()() [2/3]

void amr_wind::MLMGOptions::operator() ( Hydro::MacProjector & mac_proj)

◆ operator()() [3/3]

void amr_wind::MLMGOptions::operator() ( Hydro::NodalProjector & nodal_proj)

◆ parse_options()

void amr_wind::MLMGOptions::parse_options ( const std::string & prefix)
private

Member Data Documentation

◆ abs_tol

amrex::Real amr_wind::MLMGOptions::abs_tol {1.0e-14}

Absolute tolerance for convergence checks.

◆ m_bottom_abs_tol

amrex::Real amr_wind::MLMGOptions::m_bottom_abs_tol {-1.0}
private

Absolute tolerance for convergence checks.

◆ m_bottom_max_iter

int amr_wind::MLMGOptions::m_bottom_max_iter {200}
private

Maximum iterations for the bottom solver.

◆ m_bottom_rel_tol

amrex::Real amr_wind::MLMGOptions::m_bottom_rel_tol {1.0e-4}
private

Relative tolerance for convergence of MLMG solvers.

◆ m_bottom_solver_type

std::string amr_wind::MLMGOptions::m_bottom_solver_type {"bicgstab"}
private

Bottom solver type bicgstab, cg, hypre, etc.

◆ m_bottom_verbose

int amr_wind::MLMGOptions::m_bottom_verbose {0}
private

Set verbosity for AMReX bottom solvers

When using hypre as the bottom solver, this option is not passed to hypre. Instead user must set hypre.verbose to control the hypre solver verbosity and hypre.bamg_verbose to control BoomerAMG verbosity (when used as a preconditioner).

◆ m_do_fixed_iters

bool amr_wind::MLMGOptions::m_do_fixed_iters {true}
private

If set to true, AMReX won't abort if linear solver doesn't converge within max iterations

◆ m_do_nsolve

bool amr_wind::MLMGOptions::m_do_nsolve {false}
private

option to use the nsolve bottom solver added to help with overset masking

◆ m_hypre_interface

std::string amr_wind::MLMGOptions::m_hypre_interface {"ij"}
private

Options of hypre interface.

◆ m_hypre_namespace

std::string amr_wind::MLMGOptions::m_hypre_namespace {"hypre"}
private

Options namespace for hypre solvers.

◆ m_lpinfo

amrex::LPInfo amr_wind::MLMGOptions::m_lpinfo
private

Linear operator info object.

◆ m_max_fmg_iters

int amr_wind::MLMGOptions::m_max_fmg_iters {0}
private

◆ m_max_iter

int amr_wind::MLMGOptions::m_max_iter {200}
private

◆ m_nsolve_grid_size

int amr_wind::MLMGOptions::m_nsolve_grid_size {16}
private

set grid size for nsolve

◆ m_num_bottom_smooth

int amr_wind::MLMGOptions::m_num_bottom_smooth {0}
private

◆ m_num_final_smooth

int amr_wind::MLMGOptions::m_num_final_smooth {8}
private

◆ m_num_post_smooth

int amr_wind::MLMGOptions::m_num_post_smooth {2}
private

◆ m_num_pre_smooth

int amr_wind::MLMGOptions::m_num_pre_smooth {2}
private

◆ m_verbose

int amr_wind::MLMGOptions::m_verbose {0}
private

Verbosity of the MLMG and Projector interfaces

◆ max_order

int amr_wind::MLMGOptions::max_order {2}

◆ rel_tol

amrex::Real amr_wind::MLMGOptions::rel_tol {1.0e-11}

Relative tolerance for convergence of MLMG solvers.


The documentation for this struct was generated from the following files: