7.2
general documentation
cs_param_sles.h File Reference

Structure and routines handling the SLES settings stored inside a cs_param_sles_t structure. More...

#include "cs_param_types.h"
+ Include dependency graph for cs_param_sles.h:

Go to the source code of this file.

Data Structures

struct  cs_param_sles_t
 Structure storing all metadata related to the resolution of a linear system with an iterative solver. More...
 

Functions

cs_param_sles_tcs_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_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...
 

Detailed Description

Structure and routines handling the SLES settings stored inside a cs_param_sles_t structure.

Function Documentation

◆ cs_param_sles_check_amg()

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.

Parameters
[in,out]slesppointer to a cs_pparam_sles_t structure

◆ cs_param_sles_check_class()

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.

Parameters
[in]wanted_classrequested class of solvers
Returns
the available solver class related to the requested class

◆ cs_param_sles_copy_from()

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.

Parameters
[in]srcreference cs_param_sles_t structure to copy
[in,out]dstcopy of the reference at exit

◆ cs_param_sles_create()

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.

Parameters
[in]field_idid related to to the variable field or -1
[in]system_namename of the system to solve or NULL
Returns
a pointer to a cs_param_sles_t stucture

◆ cs_param_sles_free()

void cs_param_sles_free ( cs_param_sles_t **  p_slesp)

Free a cs_param_sles_t structure.

Parameters
[in,out]slesppointer to a structure to free

◆ cs_param_sles_get_class_from_amg()

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.

Parameters
[in]amg_typetype of AMG to consider
Returns
the related solver class or CS_PARAM_SLES_CLASS_CS

◆ cs_param_sles_log()

void cs_param_sles_log ( cs_param_sles_t slesp)

Log information related to the linear settings stored in the structure.

Parameters
[in]slesppointer to a cs_param_sles_log

◆ cs_param_sles_set()

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)

Parameters
[in]use_field_idif false use system name to define a SLES
[in,out]slesppointer to a cs_param_sles_t structure
Returns
an error code (-1 if a problem is encountered, 0 otherwise)

◆ cs_param_sles_update_cvg_settings()

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

Parameters
[in]use_field_idif false use a name to retrieve the cs_sles_t struc.
[in]slesppointer to a cs_param_sles_t structure