Routines to handle the set of parameters for algebraic multigrids (AMG) like boomerAMG of the HYPRE library, GAMG of the PETSc library or the Notay's K-cycle (in-house implementation) for instance. More...
#include "cs_param_types.h"
Go to the source code of this file.
Data Structures | |
struct | cs_param_amg_boomer_t |
Set of the main parameters to setup the algebraic multigrid BoomerAMG belonging to the HYPRE library. These parameters are used to define this AMG directly in HYPRE or through the PETSc library according to the settings and the installed dependencies. Please refer to the HYPRE documentation for more details. More... | |
struct | cs_param_amg_inhouse_t |
Set of the main parameters used to setup the algebraic multigrid available natively in code_saturne (in-house implementations). These parameters are the most impacting ones. For a more advanced usage, this is still possible to consider the function cs_user_linear_solvers. More... | |
Functions | |
static bool | cs_param_amg_boomer_is_needed (cs_param_solver_type_t solver, cs_param_precond_type_t precond, cs_param_amg_type_t amg) |
Return true if the settings rely on boomeramg, otherwise false. More... | |
static bool | cs_param_amg_inhouse_is_needed (cs_param_solver_type_t solver, cs_param_precond_type_t precond, cs_param_amg_type_t amg) |
Return true if the settings rely on the in-house implementation, otherwise false. More... | |
const char * | cs_param_amg_get_type_name (cs_param_amg_type_t type) |
Get the name of the type of algebraic multigrid (AMG) More... | |
cs_param_solver_class_t | cs_param_amg_get_class (cs_param_amg_type_t amg_type) |
Retrieve the related solver class from the amg type. More... | |
cs_param_amg_boomer_t * | cs_param_amg_boomer_create (void) |
Create a new structure storing a set of parameters used when calling boomerAMG. Set default values for all parameters. More... | |
cs_param_amg_boomer_t * | cs_param_amg_boomer_copy (const cs_param_amg_boomer_t *bamgp) |
Copy the given set of parameters used when calling boomerAMG into a new structure. More... | |
const char * | cs_param_amg_get_boomer_smoother_name (cs_param_amg_boomer_smoother_t smoother) |
Get the name of the smoother used with BoomerAMG (HYPRE library) More... | |
void | cs_param_amg_boomer_log (const char *name, const cs_param_amg_boomer_t *bamgp) |
Log the set of parameters used for setting BoomerAMG. More... | |
cs_param_amg_inhouse_t * | cs_param_amg_inhouse_create (bool used_as_solver, bool used_as_k_cycle) |
Create a new structure storing a set of parameters used when calling the in-house AMG algo. Set default values for all parameters. More... | |
cs_param_amg_inhouse_t * | cs_param_amg_inhouse_copy (const cs_param_amg_inhouse_t *amgp) |
Copy the given set of parameters used when calling in-house AMG algo. into a new structure. More... | |
const char * | cs_param_amg_get_inhouse_solver_name (cs_param_amg_inhouse_solver_t solver) |
Get the name of the solver used with in-house AMG algo. More... | |
void | cs_param_amg_inhouse_log (const char *name, const cs_param_amg_inhouse_t *amgp) |
Log the set of parameters used for setting in-house AMG algorithms. More... | |
Routines to handle the set of parameters for algebraic multigrids (AMG) like boomerAMG of the HYPRE library, GAMG of the PETSc library or the Notay's K-cycle (in-house implementation) for instance.
Type of algorithm used in boomerAMG to coarsen a level. Only a selection of algorithms is available here. Values are those given in HYPRE.
Type of algorithm used in boomerAMG to coarsen a level. Only a selection of algorithms is available here. Values are those given in HYPRE.
Type of algorithm used in boomerAMG to smooth a level. Only a selection of algorithms is available here. Values are those used in HYPRE.
Type of algorithm used in the in-house algorithm to coarsen each level. This enum avoids using the associated cs_grid_coarsening_t type which includes higher level headers.
Type of algorithm used in the in-house algorithm for smoothing each level or solving the coarse level. Only the most relevant algorithms are available here.
This enum avoids using cs_sles_it_type_t which includes higher level headers leading to loop cycle issues.
enum cs_param_amg_type_t |
Type of AMG (Algebraic MultiGrid) algorithm to use (either as a preconditioner with or a solver). There are different choices of implementation and of type of cycle
cs_param_amg_boomer_t* cs_param_amg_boomer_copy | ( | const cs_param_amg_boomer_t * | bamgp | ) |
Copy the given set of parameters used when calling boomerAMG into a new structure.
[in] | bamgp | reference set of boomerAMG parameters |
cs_param_amg_boomer_t* cs_param_amg_boomer_create | ( | void | ) |
Create a new structure storing a set of parameters used when calling boomerAMG. Set default values for all parameters.
|
inlinestatic |
Return true if the settings rely on boomeramg, otherwise false.
[in] | solver | type of SLES solver |
[in] | precond | type of preconditioner |
[in] | amg | type of AMG |
void cs_param_amg_boomer_log | ( | const char * | name, |
const cs_param_amg_boomer_t * | bamgp | ||
) |
Log the set of parameters used for setting BoomerAMG.
[in] | name | name related to the current SLES |
[in] | bamgp | set of boomerAMG parameters |
const char* cs_param_amg_get_boomer_smoother_name | ( | cs_param_amg_boomer_smoother_t | smoother | ) |
Get the name of the smoother used with BoomerAMG (HYPRE library)
[in] | smoother | smoother type |
cs_param_solver_class_t cs_param_amg_get_class | ( | cs_param_amg_type_t | amg_type | ) |
Retrieve the related solver class from the amg type.
[in] | amg_type | type of AMG to consider |
const char* cs_param_amg_get_inhouse_solver_name | ( | cs_param_amg_inhouse_solver_t | solver | ) |
Get the name of the solver used with in-house AMG algo.
[in] | solver | solver type |
const char* cs_param_amg_get_type_name | ( | cs_param_amg_type_t | type | ) |
Get the name of the type of algebraic multigrid (AMG)
[in] | type | type of AMG |
cs_param_amg_inhouse_t* cs_param_amg_inhouse_copy | ( | const cs_param_amg_inhouse_t * | amgp | ) |
Copy the given set of parameters used when calling in-house AMG algo. into a new structure.
[in] | amgp | reference set of in-house AMG parameters |
cs_param_amg_inhouse_t* cs_param_amg_inhouse_create | ( | bool | used_as_solver, |
bool | used_as_k_cycle | ||
) |
Create a new structure storing a set of parameters used when calling the in-house AMG algo. Set default values for all parameters.
[in] | used_as_solver | true or false |
[in] | used_as_k_cycle | true or false |
|
inlinestatic |
Return true if the settings rely on the in-house implementation, otherwise false.
[in] | solver | type of SLES solver |
[in] | precond | type of preconditioner |
[in] | amg | type of AMG |
void cs_param_amg_inhouse_log | ( | const char * | name, |
const cs_param_amg_inhouse_t * | amgp | ||
) |
Log the set of parameters used for setting in-house AMG algorithms.
[in] | name | name related to the current SLES |
[in] | amgp | set of in-house AMG parameters |