Structure and routines handling the SLES settings stored inside a cs_param_sles_t structure. More...
#include "cs_param_types.h"
Go to the source code of this file.
Data Structures | |
struct | cs_param_sles_cvg_t |
Set of parameters to check the convergence (or the divergence) of an iterative process (tolerances or max. number of iterations) More... | |
struct | cs_param_sles_mumps_t |
Set of parameters to specify additional options to MUMPS For more advanced settings, one has to use the cs_user_sles_mumps_hook function. Please also refer to the MUMPS user guide for more details. More... | |
struct | cs_param_sles_t |
Structure storing all metadata related to the resolution of a linear system with an iterative solver. More... | |
struct | cs_param_sles_saddle_t |
Structure storing all metadata related to the resolution of a saddle-point linear system. More... | |
Enumerations | |
enum | cs_param_sles_facto_type_t { CS_PARAM_SLES_FACTO_LU , CS_PARAM_SLES_FACTO_LDLT_SYM , CS_PARAM_SLES_FACTO_LDLT_SPD , CS_PARAM_SLES_N_FACTO_TYPES } |
type of factorization to consider when using the MUMPS solver to solve a linear system More... | |
enum | cs_param_sles_analysis_algo_t { CS_PARAM_SLES_ANALYSIS_AMD , CS_PARAM_SLES_ANALYSIS_QAMD , CS_PARAM_SLES_ANALYSIS_PORD , CS_PARAM_SLES_ANALYSIS_SCOTCH , CS_PARAM_SLES_ANALYSIS_PTSCOTCH , CS_PARAM_SLES_ANALYSIS_METIS , CS_PARAM_SLES_ANALYSIS_PARMETIS , CS_PARAM_SLES_ANALYSIS_AUTO , CS_PARAM_SLES_N_ANALYSIS_ALGOS } |
Type of algorithm to consider when using the MUMPS solver to perform the analysis step (renumbering and graph manipulation). Please refer to the MUMPS user guide for more details about the following algorithms. AMD, QAMD and PORD are available with MUMPS without any prerequesite. More... | |
Functions | |
static bool | cs_param_sles_is_mumps_set (cs_param_itsol_type_t solver) |
Find if a MUMPS-related solver is set or not. More... | |
cs_param_sles_saddle_t * | cs_param_sles_saddle_create (void) |
Create a cs_param_sles_saddle_t structure and assign a minimalist default settings. More... | |
void | cs_param_sles_saddle_init_schur (const char *basename, cs_param_sles_saddle_t *saddlep) |
Initialize a cs_param_sles_t structure for the Schur approximation nested inside a ref cs_param_sles_saddle_t structure. By default, this member is not allocated. Do nothing if the related structure is already allocated. More... | |
void | cs_param_sles_saddle_copy (const cs_param_sles_saddle_t *ref, cs_param_sles_saddle_t *dest) |
Copy a cs_param_sles_saddle_t structure from ref to dest. More... | |
void | cs_param_sles_saddle_free (cs_param_sles_saddle_t **p_saddlep) |
Free the structure storing the parameter settings for a saddle-point system. More... | |
cs_param_sles_t * | cs_param_sles_create (int field_id, const char *system_name) |
Create a cs_param_sles_t structure and assign a default settings. More... | |
void | cs_param_sles_free (cs_param_sles_t **p_slesp) |
Free a cs_param_sles_t structure. More... | |
void | cs_param_sles_log (cs_param_sles_t *slesp) |
Log information related to the linear settings stored in the structure. More... | |
void | cs_param_sles_mumps (cs_param_sles_t *slesp, bool is_single, cs_param_sles_facto_type_t facto_type) |
Set the main memebers of a cs_param_sles_mumps_t structure. This structure is allocated if needed. Other members are kept to their values. More... | |
void | cs_param_sles_mumps_advanced (cs_param_sles_t *slesp, cs_param_sles_analysis_algo_t analysis_algo, int block_analysis, double mem_coef, double blr_threshold, int ir_steps, bool advanced_optim) |
Set the main memebers of a cs_param_sles_mumps_t structure. This structure is allocated if needed. Other members are kept to their values. Please refer to the MUMPS user guide for more details about the following advanced options. More... | |
void | cs_param_sles_copy_from (cs_param_sles_t *src, cs_param_sles_t *dst) |
Copy a cs_param_sles_t structure from src to dst. More... | |
int | cs_param_sles_set (bool use_field_id, cs_param_sles_t *slesp) |
Define cs_sles_t structure in accordance with the settings of a cs_param_sles_t structure (SLES = Sparse Linear Equation Solver) More... | |
void | cs_param_sles_update_cvg_settings (bool use_field_id, const cs_param_sles_t *slesp) |
Update the settings associated to a cs_sles_t structure and apply those defined in the given cs_param_sles_t structure. This function is used only when a first setup has been performed. More... | |
cs_param_sles_class_t | cs_param_sles_get_class_from_amg (cs_param_amg_type_t amg_type) |
Retrieve the related solver class from the amg type. More... | |
cs_param_sles_class_t | cs_param_sles_check_class (cs_param_sles_class_t wanted_class) |
Check the availability of a solver library and return the requested one if this is possible or an alternative or CS_PARAM_SLES_N_CLASSES if no alternative is available. More... | |
void | cs_param_sles_check_amg (cs_param_sles_t *slesp) |
Check if the setting related to the AMG is consistent with the solver class. More... | |
Structure and routines handling the SLES settings stored inside a cs_param_sles_t structure.
Type of algorithm to consider when using the MUMPS solver to perform the analysis step (renumbering and graph manipulation). Please refer to the MUMPS user guide for more details about the following algorithms. AMD, QAMD and PORD are available with MUMPS without any prerequesite.
type of factorization to consider when using the MUMPS solver to solve a linear system
Enumerator | |
---|---|
CS_PARAM_SLES_FACTO_LU | LU factorization is the most generic factorization available with MUMPS. It can handle general matrices (block and/or unsymmetric matrices) |
CS_PARAM_SLES_FACTO_LDLT_SYM | This factorization is a Cholesky factorization (L.D.Lt) for general symmetric matrices. |
CS_PARAM_SLES_FACTO_LDLT_SPD | This factorization is devoted to SPD matrices and corresponds to a Cholesky factorization. This is more specific and thus more efficient than CS_PARAM_SLES_FACTO_LDLT_SYM. |
CS_PARAM_SLES_N_FACTO_TYPES |
void cs_param_sles_check_amg | ( | cs_param_sles_t * | slesp | ) |
Check if the setting related to the AMG is consistent with the solver class.
[in,out] | slesp | pointer to a cs_pparam_sles_t structure |
cs_param_sles_class_t cs_param_sles_check_class | ( | cs_param_sles_class_t | wanted_class | ) |
Check the availability of a solver library and return the requested one if this is possible or an alternative or CS_PARAM_SLES_N_CLASSES if no alternative is available.
[in] | wanted_class | requested class of solvers |
void cs_param_sles_copy_from | ( | cs_param_sles_t * | src, |
cs_param_sles_t * | dst | ||
) |
Copy a cs_param_sles_t structure from src to dst.
[in] | src | reference cs_param_sles_t structure to copy |
[in,out] | dst | copy of the reference at exit |
cs_param_sles_t* cs_param_sles_create | ( | int | field_id, |
const char * | system_name | ||
) |
Create a cs_param_sles_t structure and assign a default settings.
[in] | field_id | id related to to the variable field or -1 |
[in] | system_name | name of the system to solve or NULL |
void cs_param_sles_free | ( | cs_param_sles_t ** | p_slesp | ) |
Free a cs_param_sles_t structure.
[in,out] | slesp | pointer to a \cs_param_sles_t structure to free |
cs_param_sles_class_t cs_param_sles_get_class_from_amg | ( | cs_param_amg_type_t | amg_type | ) |
Retrieve the related solver class from the amg type.
[in] | amg_type | type of AMG to consider |
|
inlinestatic |
Find if a MUMPS-related solver is set or not.
[in] | solver | type of solver |
void cs_param_sles_log | ( | cs_param_sles_t * | slesp | ) |
Log information related to the linear settings stored in the structure.
[in] | slesp | pointer to a cs_param_sles_log |
void cs_param_sles_mumps | ( | cs_param_sles_t * | slesp, |
bool | is_single, | ||
cs_param_sles_facto_type_t | facto_type | ||
) |
Set the main memebers of a cs_param_sles_mumps_t structure. This structure is allocated if needed. Other members are kept to their values.
[in,out] | slesp | pointer to a cs_param_sles_t structure |
[in] | is_single | single-precision or double-precision |
[in] | facto_type | type of factorization to consider |
void cs_param_sles_mumps_advanced | ( | cs_param_sles_t * | slesp, |
cs_param_sles_analysis_algo_t | analysis_algo, | ||
int | block_analysis, | ||
double | mem_coef, | ||
double | blr_threshold, | ||
int | ir_steps, | ||
bool | advanced_optim | ||
) |
Set the main memebers of a cs_param_sles_mumps_t structure. This structure is allocated if needed. Other members are kept to their values. Please refer to the MUMPS user guide for more details about the following advanced options.
[in,out] | slesp | pointer to a cs_param_sles_t structure |
[in] | analysis_algo | algorithm used for the analysis step |
[in] | block_analysis | < 0: fixed block size; 0: nothing |
[in] | mem_coef | percentage increase in the memory workspace |
[in] | blr_threshold | Accuracy in BLR compression (< 0: not used) |
[in] | ir_steps | 0: No, otherwise number of iterations |
[in] | advanced_optim | activate advanced optimization (MPI/openMP) |
void cs_param_sles_saddle_copy | ( | const cs_param_sles_saddle_t * | ref, |
cs_param_sles_saddle_t * | dest | ||
) |
Copy a cs_param_sles_saddle_t structure from ref to dest.
[in] | ref | reference structure to be copied |
[in,out] | dest | destination structure |
cs_param_sles_saddle_t* cs_param_sles_saddle_create | ( | void | ) |
Create a cs_param_sles_saddle_t structure and assign a minimalist default settings.
void cs_param_sles_saddle_free | ( | cs_param_sles_saddle_t ** | p_saddlep | ) |
Free the structure storing the parameter settings for a saddle-point system.
[in,out] | p_saddlep | double pointer to the structure to free |
void cs_param_sles_saddle_init_schur | ( | const char * | basename, |
cs_param_sles_saddle_t * | saddlep | ||
) |
Initialize a cs_param_sles_t structure for the Schur approximation nested inside a ref cs_param_sles_saddle_t structure. By default, this member is not allocated. Do nothing if the related structure is already allocated.
[in] | basename | prefix for the naming of the Schur system |
[in,out] | saddlep | pointer to the structure to update |
int cs_param_sles_set | ( | bool | use_field_id, |
cs_param_sles_t * | slesp | ||
) |
Define cs_sles_t structure in accordance with the settings of a cs_param_sles_t structure (SLES = Sparse Linear Equation Solver)
[in] | use_field_id | if false use system name to define a SLES |
[in,out] | slesp | pointer to a cs_param_sles_t structure |
void cs_param_sles_update_cvg_settings | ( | bool | use_field_id, |
const cs_param_sles_t * | slesp | ||
) |
Update the settings associated to a cs_sles_t structure and apply those defined in the given cs_param_sles_t structure. This function is used only when a first setup has been performed.
One modifies only some specific options like the max. number of iterations or the relative tolerance
[in] | use_field_id | if false use a name to retrieve the cs_sles_t struc. |
[in] | slesp | pointer to a cs_param_sles_t structure |