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_t * | cs_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_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. 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... | |
void cs_iter_algo_aa_allocate_arrays | ( | cs_iter_algo_aa_t * | aa | ) |
Allocate arrays useful for the Anderson acceleration.
[in,out] | aa | pointer to the structure managing the Anderson algo. |
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.
[in] | aap | set of parameters for the Anderson acceleration |
[in] | n_elts | number of elements by direction |
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.
[in,out] | info |
void cs_iter_algo_aa_free_arrays | ( | cs_iter_algo_aa_t * | aa | ) |
Free arrays used during the Anderson acceleration.
[in,out] | aa | pointer to the structure managing the Anderson algo. |
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.
[in,out] | ia | pointer to a cs_iter_algo_t structure |
[in,out] | cur_iterate | current iterate |
[in] | pre_iterate | previous iterate |
[in] | dotprod | function to compute a dot product |
[in] | sqnorm | function to compute a square norm |
cs_iter_algo_t* cs_iter_algo_create | ( | cs_iter_algo_param_t | param | ) |
Create and initialize a new cs_iter_algo_t structure.
[in] | param | main set of parameters driving the iterative algorithm |
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.
[in,out] | ia | pointer to a cs_iter_algo_t structure |
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.
[in] | func_name | name of the calling function |
[in] | eq_name | name of the equation being solved |
[in] | algo_name | name of the iterative algo. used |
[in] | ia | pointer to the iterative algo. structure |
void cs_iter_algo_update_cvg | ( | cs_iter_algo_t * | ia | ) |
Update the convergence state and the number of iterations.
[in,out] | ia | pointer to a cs_iter_algo_t structure |