8.3
general documentation
cs_multigrid_smoother.h File Reference
#include "cs_base.h"
#include "cs_halo_perio.h"
#include "cs_matrix.h"
#include "cs_sles.h"
#include "cs_sles_it.h"
+ Include dependency graph for cs_multigrid_smoother.h:

Go to the source code of this file.

Typedefs

typedef struct _cs_multigrid_smoother_t cs_multigrid_smoother_t
 

Functions

cs_sles_it_tcs_multigrid_smoother_create (cs_sles_it_type_t smoother_type, int poly_degree, int n_iter)
 Create iterative sparse linear system solver info and context used as a smoother in a multigrid solver. More...
 
void cs_multigrid_smoother_destroy (void **context)
 Destroy iterative sparse linear system solver info and context used as a smoother in a multigrid solver. More...
 
void cs_multigrid_smoother_setup (void *context, const char *name, const cs_matrix_t *a, int verbosity)
 Setup iterative sparse linear equation solver in case of used as a multigrid smoother. More...
 
cs_sles_convergence_state_t cs_multigrid_smoother_solve (void *context, const char *name, const cs_matrix_t *a, int verbosity, double precision, double r_norm, int *n_iter, double *residual, const cs_real_t *rhs, cs_real_t *vx_ini, cs_real_t *vx, size_t aux_size, void *aux_vectors)
 Call iterative sparse linear equation solver. More...
 
void cs_multigrid_smoother_free (void *context)
 
void cs_multigrid_smoother_log (const void *context, cs_log_t log_type)
 
cs_sles_it_type_t cs_multigrid_smoother_get_type (const cs_multigrid_smoother_t *context)
 

Typedef Documentation

◆ cs_multigrid_smoother_t

typedef struct _cs_multigrid_smoother_t cs_multigrid_smoother_t

Function Documentation

◆ cs_multigrid_smoother_create()

cs_sles_it_t * cs_multigrid_smoother_create ( cs_sles_it_type_t  smoother_type,
int  poly_degree,
int  n_iter 
)

Create iterative sparse linear system solver info and context used as a smoother in a multigrid solver.

parameters:

Parameters
[in]smoother_typetype of smoother (CG, Jacobi, ...)
[in]poly_degreepreconditioning polynomial degree (0: diagonal; -1: non-preconditioned; see Iterative linear solvers. for details)
[in]n_iternumber of iterations to perform
Returns
a pointer to newly created smoother info object, or NULL if not available for this solver type.

parameters:

Parameters
[in]smoother_typetype of smoother (CG, Jacobi, ...)
[in]poly_degreepreconditioning polynomial degree (0: diagonal; -1: non-preconditioned; see Iterative linear solvers. for details)
[in]n_iternumber of iterations to perform
Returns
a pointer to newly created smoother info object, or nullptr if not available for this solver type.

◆ cs_multigrid_smoother_destroy()

void cs_multigrid_smoother_destroy ( void **  context)

Destroy iterative sparse linear system solver info and context used as a smoother in a multigrid solver.

Parameters
[in,out]contextpointer to iterative sparse linear solver info (actual type: cs_sles_it_t **)

◆ cs_multigrid_smoother_free()

void cs_multigrid_smoother_free ( void *  context)

◆ cs_multigrid_smoother_get_type()

cs_sles_it_type_t cs_multigrid_smoother_get_type ( const cs_multigrid_smoother_t context)

◆ cs_multigrid_smoother_log()

void cs_multigrid_smoother_log ( const void *  context,
cs_log_t  log_type 
)

◆ cs_multigrid_smoother_setup()

void cs_multigrid_smoother_setup ( void *  context,
const char *  name,
const cs_matrix_t a,
int  verbosity 
)

Setup iterative sparse linear equation solver in case of used as a multigrid smoother.

Parameters
[in,out]contextpointer to iterative solver info and context (actual type: cs_sles_it_t *)
[in]namepointer to system name
[in]aassociated matrix
[in]verbosityassociated verbosity

◆ cs_multigrid_smoother_solve()

cs_sles_convergence_state_t cs_multigrid_smoother_solve ( void *  context,
const char *  name,
const cs_matrix_t a,
int  verbosity,
double  precision,
double  r_norm,
int *  n_iter,
double *  residual,
const cs_real_t rhs,
cs_real_t vx_ini,
cs_real_t vx,
size_t  aux_size,
void *  aux_vectors 
)

Call iterative sparse linear equation solver.

Parameters
[in,out]contextpointer to iterative solver info and context (actual type: cs_sles_it_t *)
[in]namepointer to system name
[in]amatrix
[in]verbosityassociated verbosity
[in]precisionsolver precision
[in]r_normresidual normalization
[out]n_iternumber of "equivalent" iterations
[out]residualresidual
[in]rhsright hand side
[in]vx_iniinitial system solution (vx if nonzero, nullptr if zero)
[in,out]vxsystem solution
[in]aux_sizenumber of elements in aux_vectors (in bytes)
aux_vectorsoptional working area (internal allocation if nullptr)
Returns
convergence state