7.1
general documentation
cs_iter_algo.h File Reference
#include "cs_cdo_blas.h"
#include "cs_math.h"
#include "cs_param_types.h"
#include "cs_sles.h"
+ Include dependency graph for cs_iter_algo.h:

Go to the source code of this file.

Data Structures

struct  cs_iter_algo_param_t
 
struct  cs_iter_algo_t
 Set of common parameters to manage an iterative algorithm. More...
 
struct  cs_iter_algo_param_aa_t
 Structure storing all the parameters to drive the algorithm called Anderson acceleration. More...
 

Functions

cs_iter_algo_tcs_iter_algo_create (cs_iter_algo_param_t param)
 Create and initialize a new cs_iter_algo_t structure. More...
 
void cs_iter_algo_post_check (const char *func_name, const char *eq_name, const char *algo_name, cs_iter_algo_t *ia)
 Check if something wrong happens during the iterative process after one new iteration. More...
 
void cs_iter_algo_update_cvg (cs_iter_algo_t *ia)
 Update the convergence state and the number of iterations. More...
 
cs_iter_algo_aa_tcs_iter_algo_aa_create (cs_iter_algo_param_aa_t aap, cs_lnum_t n_elts)
 Create a new cs_iter_algo_aa_t structure. More...
 
cs_iter_algo_param_aa_t cs_iter_algo_get_anderson_param (cs_iter_algo_t *ia)
 Retrieve the set of parameters for an Anderson algorithm. More...
 
void cs_iter_algo_aa_allocate_arrays (cs_iter_algo_aa_t *aa)
 Allocate arrays useful for the Anderson acceleration. More...
 
void cs_iter_algo_aa_free_arrays (cs_iter_algo_aa_t *aa)
 Free arrays used during the Anderson acceleration. More...
 
void cs_iter_algo_aa_free (cs_iter_algo_t *info)
 Free a cs_iter_algo_aa_t structure used to manage the Anderson acceleration. More...
 
void cs_iter_algo_aa_update (cs_iter_algo_t *ia, cs_real_t *cur_iterate, const cs_real_t *pre_iterate, cs_cdo_blas_dotprod_t *dotprod, cs_cdo_blas_square_norm_t *sqnorm)
 Apply one more iteration of the Anderson acceleration. More...
 

Function Documentation

◆ cs_iter_algo_aa_allocate_arrays()

void cs_iter_algo_aa_allocate_arrays ( cs_iter_algo_aa_t aa)

Allocate arrays useful for the Anderson acceleration.

Parameters
[in,out]aapointer to the structure managing the Anderson algo.

◆ cs_iter_algo_aa_create()

cs_iter_algo_aa_t* cs_iter_algo_aa_create ( cs_iter_algo_param_aa_t  aap,
cs_lnum_t  n_elts 
)

Create a new cs_iter_algo_aa_t structure.

Parameters
[in]aapset of parameters for the Anderson acceleration
[in]n_eltsnumber of elements by direction
Returns
a pointer to the new allocated structure

◆ cs_iter_algo_aa_free()

void cs_iter_algo_aa_free ( cs_iter_algo_t info)

Free a cs_iter_algo_aa_t structure used to manage the Anderson acceleration.

Parameters
[in,out]info

◆ cs_iter_algo_aa_free_arrays()

void cs_iter_algo_aa_free_arrays ( cs_iter_algo_aa_t aa)

Free arrays used during the Anderson acceleration.

Parameters
[in,out]aapointer to the structure managing the Anderson algo.

◆ cs_iter_algo_aa_update()

void cs_iter_algo_aa_update ( cs_iter_algo_t ia,
cs_real_t cur_iterate,
const cs_real_t pre_iterate,
cs_cdo_blas_dotprod_t dotprod,
cs_cdo_blas_square_norm_t sqnorm 
)

Apply one more iteration of the Anderson acceleration.

Parameters
[in,out]iapointer to a cs_iter_algo_t structure
[in,out]cur_iteratecurrent iterate
[in]pre_iterateprevious iterate
[in]dotprodfunction to compute a dot product
[in]sqnormfunction to compute a square norm

◆ cs_iter_algo_create()

cs_iter_algo_t* cs_iter_algo_create ( cs_iter_algo_param_t  param)

Create and initialize a new cs_iter_algo_t structure.

Parameters
[in]parammain set of parameters driving the iterative algorithm
Returns
a pointer to the new allocated structure

◆ cs_iter_algo_get_anderson_param()

cs_iter_algo_param_aa_t cs_iter_algo_get_anderson_param ( cs_iter_algo_t ia)

Retrieve the set of parameters for an Anderson algorithm.

Parameters
[in,out]iapointer to a cs_iter_algo_t structure
Returns
a cs_iter_algo_param_aa_t structure

◆ cs_iter_algo_post_check()

void cs_iter_algo_post_check ( const char *  func_name,
const char *  eq_name,
const char *  algo_name,
cs_iter_algo_t ia 
)

Check if something wrong happens during the iterative process after one new iteration.

Parameters
[in]func_namename of the calling function
[in]eq_namename of the equation being solved
[in]algo_namename of the iterative algo. used
[in]iapointer to the iterative algo. structure

◆ cs_iter_algo_update_cvg()

void cs_iter_algo_update_cvg ( cs_iter_algo_t ia)

Update the convergence state and the number of iterations.

Parameters
[in,out]iapointer to a cs_iter_algo_t structure