8.1
general documentation
cs_cdo_solve.h File Reference
#include "cs_matrix.h"
#include "cs_param_sles.h"
#include "cs_range_set.h"
#include "cs_sles.h"
+ Include dependency graph for cs_cdo_solve.h:

Go to the source code of this file.

Functions

void cs_cdo_solve_sync_rhs_norm (cs_param_resnorm_type_t type, double vol_tot, cs_lnum_t rhs_size, const cs_real_t rhs[], double *normalization)
 Compute the value of the rhs norm used as a renormalization coefficient for the residual norm when solving the linear system. A pre-computation performed during the cellwise building of the algebraic has been done before this call according to the requested type of renormalization. More...
 
void cs_cdo_solve_prepare_system (int stride, bool interlace, cs_lnum_t x_size, const cs_range_set_t *rset, bool rhs_redux, cs_real_t *x, cs_real_t *b)
 Prepare a linear system and synchronize buffers in case of parallel or periodic computations. Transfer a mesh-based description of arrays x0 and rhs into an algebraic description for the linear system in x and b (scatter/gather views). More...
 
int cs_cdo_solve_scalar_cell_system (cs_lnum_t n_dofs, const cs_param_sles_t *slesp, const cs_matrix_t *matrix, cs_real_t normalization, cs_sles_t *sles, cs_real_t *x, cs_real_t *b)
 Solve a linear system arising with scalar-valued cell-based DoFs No rotation is taken into account when synchronizing halo. More...
 
int cs_cdo_solve_scalar_system (cs_lnum_t n_scatter_dofs, const cs_param_sles_t *slesp, const cs_matrix_t *matrix, const cs_range_set_t *rset, cs_real_t normalization, bool rhs_redux, cs_sles_t *sles, cs_real_t *x, cs_real_t *b)
 Solve a linear system arising from CDO schemes with scalar-valued degrees of freedom. More...
 
int cs_cdo_solve_vector_system (cs_lnum_t n_scatter_elts, bool interlace, const cs_param_sles_t *slesp, const cs_matrix_t *matrix, const cs_range_set_t *rset, cs_real_t normalization, bool rhs_redux, cs_sles_t *sles, cs_real_t *x, cs_real_t *b)
 Solve a linear system arising from CDO schemes with vector-valued degrees of freedom (DoFs). Number of DoFs is equal to 3*n_scatter_elts. More...
 

Function Documentation

◆ cs_cdo_solve_prepare_system()

void cs_cdo_solve_prepare_system ( int  stride,
bool  interlace,
cs_lnum_t  x_size,
const cs_range_set_t rset,
bool  rhs_redux,
cs_real_t x,
cs_real_t b 
)

Prepare a linear system and synchronize buffers in case of parallel or periodic computations. Transfer a mesh-based description of arrays x0 and rhs into an algebraic description for the linear system in x and b (scatter/gather views).

Parameters
[in]stridestride to apply to the range set operations
[in]interlaceis data interlaced or not
[in]x_sizesize of the vector unknowns (scatter view)
[in]rsetpointer to a range set structure
[in]rhs_reduxdo or not a parallel sum reduction on the RHS
[in,out]xarray of unknowns (in: initial guess)
[in,out]bright-hand side

◆ cs_cdo_solve_scalar_cell_system()

int cs_cdo_solve_scalar_cell_system ( cs_lnum_t  n_dofs,
const cs_param_sles_t slesp,
const cs_matrix_t matrix,
cs_real_t  normalization,
cs_sles_t sles,
cs_real_t x,
cs_real_t b 
)

Solve a linear system arising with scalar-valued cell-based DoFs No rotation is taken into account when synchronizing halo.

Parameters
[in]n_dofslocal number of DoFs
[in]slesppointer to a cs_param_sles_t structure
[in]matrixpointer to a cs_matrix_t structure
[in]normalizationvalue used for the residual normalization
[in,out]slespointer to a cs_sles_t structure
[in,out]xsolution of the linear system (in: initial guess)
[in,out]bright-hand side (scatter/gather if needed)
Returns
the number of iterations of the linear solver

Solve a linear system arising with scalar-valued cell-based DoFs No rotation is taken into account when synchronizing halo.

Parameters
[in]n_dofslocal number of DoFs
[in]slesppointer to a cs_param_sles_t structure
[in]matrixpointer to a cs_matrix_t structure
[in]normalizationvalue used for the residual normalization
[in,out]slespointer to a cs_sles_t structure
[in,out]xsolution of the linear system (in: initial guess)
[in,out]bright-hand side (scatter/gather if needed)
Returns
the number of iterations of the linear solver

◆ cs_cdo_solve_scalar_system()

int cs_cdo_solve_scalar_system ( cs_lnum_t  n_scatter_dofs,
const cs_param_sles_t slesp,
const cs_matrix_t matrix,
const cs_range_set_t rset,
cs_real_t  normalization,
bool  rhs_redux,
cs_sles_t sles,
cs_real_t x,
cs_real_t b 
)

Solve a linear system arising from CDO schemes with scalar-valued degrees of freedom.

Parameters
[in]n_scatter_dofslocal number of DoFs (may be != n_gather_elts)
[in]slesppointer to a cs_param_sles_t structure
[in]matrixpointer to a cs_matrix_t structure
[in]rsetpointer to a cs_range_set_t structure
[in]normalizationvalue used for the residual normalization
[in]rhs_reduxdo or not a parallel sum reduction on the RHS
[in,out]slespointer to a cs_sles_t structure
[in,out]xsolution of the linear system (in: initial guess)
[in,out]bright-hand side (scatter/gather if needed)
Returns
the number of iterations of the linear solver

◆ cs_cdo_solve_sync_rhs_norm()

void cs_cdo_solve_sync_rhs_norm ( cs_param_resnorm_type_t  type,
double  vol_tot,
cs_lnum_t  rhs_size,
const cs_real_t  rhs[],
double *  normalization 
)

Compute the value of the rhs norm used as a renormalization coefficient for the residual norm when solving the linear system. A pre-computation performed during the cellwise building of the algebraic has been done before this call according to the requested type of renormalization.

Parameters
[in]typetype of renormalization
[in]vol_tottotal volume of the computational domain
[in]rhs_sizesize of the rhs array
[in]rhsarray related to the right-hand side
[in,out]normalizationvalue of the residual normalization

◆ cs_cdo_solve_vector_system()

int cs_cdo_solve_vector_system ( cs_lnum_t  n_scatter_elts,
bool  interlace,
const cs_param_sles_t slesp,
const cs_matrix_t matrix,
const cs_range_set_t rset,
cs_real_t  normalization,
bool  rhs_redux,
cs_sles_t sles,
cs_real_t x,
cs_real_t b 
)

Solve a linear system arising from CDO schemes with vector-valued degrees of freedom (DoFs). Number of DoFs is equal to 3*n_scatter_elts.

Parameters
[in]n_scatter_eltslocal number of elements (may be != n_gather_elts)
[in]interlaceway to arrange data (true/false)
[in]slesppointer to a cs_param_sles_t structure
[in]matrixpointer to a cs_matrix_t structure
[in]rsetpointer to a cs_range_set_t structure
[in]normalizationvalue used for the residual normalization
[in]rhs_reduxdo or not a parallel sum reduction on the RHS
[in,out]slespointer to a cs_sles_t structure
[in,out]xsolution of the linear system (in: initial guess)
[in,out]bright-hand side (scatter/gather if needed)
Returns
the number of iterations of the linear solver