8.0
general documentation
cs_saddle_itsol.h File Reference
#include "cs_defs.h"
#include "cs_iter_algo.h"
#include "cs_matrix.h"
#include "cs_mesh_adjacencies.h"
#include "cs_param_sles.h"
#include "cs_range_set.h"
#include "cs_sles.h"
+ Include dependency graph for cs_saddle_itsol.h:

Go to the source code of this file.

Data Structures

struct  cs_saddle_system_t
 
struct  cs_saddle_block_precond_t
 

Functions

cs_saddle_block_precond_tcs_saddle_block_precond_create (cs_param_precond_block_t block_type, cs_param_schur_approx_t schur_type, cs_param_sles_t *m11_slesp, cs_sles_t *m11_sles)
 Create and initialize a cs_saddle_block_precond_t structure. More...
 
void cs_saddle_block_precond_free (cs_saddle_block_precond_t **p_sbp)
 Free a cs_saddle_block_precond_t structure. More...
 
void cs_saddle_minres (cs_saddle_system_t *ssys, cs_saddle_block_precond_t *sbp, cs_real_t *x1, cs_real_t *x2, cs_iter_algo_t *algo)
 Apply the MINRES algorithm to a saddle point problem (the system is stored in a hybrid way). Please refer to cs_saddle_system_t structure definition. The stride is equal to 1 for the matrix (db_size[3] = 1) and the vector. More...
 
void cs_saddle_gcr (int restart, cs_saddle_system_t *ssys, cs_saddle_block_precond_t *sbp, cs_real_t *x1, cs_real_t *x2, cs_iter_algo_t *algo)
 Apply the GCR algorithm to a saddle point problem (the system is stored in a hybrid way). Please refer to cs_saddle_system_t structure definition. The stride is equal to 1 for the matrix (db_size[3] = 1) and the vector. This algorithm is taken from 2010 Notay's paper: "An aggregation-based algebraic multigrid method" ETNA (vol. 37) More...
 
void cs_matrix_vector_multiply_gs_allocated (const cs_range_set_t *rset, const cs_matrix_t *mat, cs_real_t *vec, cs_real_t *matvec)
 Perform a matrix-vector multiplication in case of scatter-view array as input parameter. Thus, one performs a scatter --> gather (before the multiplication) and a gather --> scatter operation after the multiplication. One assumes that matvec is allocated to the right size. No check is done. More...
 
void cs_matrix_vector_multiply_gs (const cs_range_set_t *rset, const cs_matrix_t *mat, cs_lnum_t vec_len, cs_real_t *vec, cs_real_t **p_matvec)
 Perform a matrix-vector multiplication in case of scatter-view array as input parameter. Thus, one performs a scatter --> gather (before the multiplication) and a gather --> scatter operation after the multiplication. The output parameter matvec is not allocated. A check on the size is done for the input array. More...
 

Function Documentation

◆ cs_matrix_vector_multiply_gs()

void cs_matrix_vector_multiply_gs ( const cs_range_set_t rset,
const cs_matrix_t mat,
cs_lnum_t  vec_len,
cs_real_t vec,
cs_real_t **  p_matvec 
)

Perform a matrix-vector multiplication in case of scatter-view array as input parameter. Thus, one performs a scatter --> gather (before the multiplication) and a gather --> scatter operation after the multiplication. The output parameter matvec is not allocated. A check on the size is done for the input array.

The stride is equal to 1 for the matrix (db_size[3] = 1) and the vector

Parameters
[in]rsetpointer to a cs_range_set_t structure
[in]matmatrix
[in]vec_lensize of vec
[in,out]vecvector of real numbers
[out]p_matvecresulting vector for the matrix-vector product

◆ cs_matrix_vector_multiply_gs_allocated()

void cs_matrix_vector_multiply_gs_allocated ( const cs_range_set_t rset,
const cs_matrix_t mat,
cs_real_t vec,
cs_real_t matvec 
)

Perform a matrix-vector multiplication in case of scatter-view array as input parameter. Thus, one performs a scatter --> gather (before the multiplication) and a gather --> scatter operation after the multiplication. One assumes that matvec is allocated to the right size. No check is done.

The stride is equal to 1 for the matrix (db_size[3] = 1) and the vector

Parameters
[in]rsetpointer to a cs_range_set_t structure
[in]matmatrix
[in,out]vecvector
[in,out]matvecresulting vector for the matrix-vector product

◆ cs_saddle_block_precond_create()

cs_saddle_block_precond_t* cs_saddle_block_precond_create ( cs_param_precond_block_t  block_type,
cs_param_schur_approx_t  schur_type,
cs_param_sles_t m11_slesp,
cs_sles_t m11_sles 
)

Create and initialize a cs_saddle_block_precond_t structure.

Parameters
[in]block_typetype of block preconditioner
[in]schur_typetype of Schur approximation
[in]m11_slesppointer to the settings for the M11 block
[in]m11_slespointer to the cs_sles_t struct. for the M11 block
Returns
a pointer to the new allocated strcuture

◆ cs_saddle_block_precond_free()

void cs_saddle_block_precond_free ( cs_saddle_block_precond_t **  p_sbp)

Free a cs_saddle_block_precond_t structure.

Parameters
[in,out]p_sbpdouble pointer to the structure to free

◆ cs_saddle_gcr()

void cs_saddle_gcr ( int  restart,
cs_saddle_system_t ssys,
cs_saddle_block_precond_t sbp,
cs_real_t x1,
cs_real_t x2,
cs_iter_algo_t algo 
)

Apply the GCR algorithm to a saddle point problem (the system is stored in a hybrid way). Please refer to cs_saddle_system_t structure definition. The stride is equal to 1 for the matrix (db_size[3] = 1) and the vector. This algorithm is taken from 2010 Notay's paper: "An aggregation-based algebraic multigrid method" ETNA (vol. 37)

Parameters
[in]restartnumber of iterations before restarting
[in]ssyspointer to a cs_saddle_system_t structure
[in]sbpblock-preconditioner for the Saddle-point problem
[in,out]x1array for the first part
[in,out]x2array for the second part
[in,out]algopointer to a cs_iter_algo_t structure

◆ cs_saddle_minres()

void cs_saddle_minres ( cs_saddle_system_t ssys,
cs_saddle_block_precond_t sbp,
cs_real_t x1,
cs_real_t x2,
cs_iter_algo_t algo 
)

Apply the MINRES algorithm to a saddle point problem (the system is stored in a hybrid way). Please refer to cs_saddle_system_t structure definition. The stride is equal to 1 for the matrix (db_size[3] = 1) and the vector.

Parameters
[in]ssyspointer to a cs_saddle_system_t structure
[in]sbpBlock-preconditioner for the Saddle-point problem
[in,out]x1array for the first part
[in,out]x2array for the second part
[in,out]algopointer to a cs_iter_algo_t structure