8.0
general documentation
cs_multigrid_smoother.c File Reference
#include "cs_defs.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include "cs_sles_it.h"
#include "cs_sles_it_priv.h"
#include "cs_multigrid_smoother.h"
+ Include dependency graph for cs_multigrid_smoother.c:

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_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 *residue, const cs_real_t *rhs, cs_real_t *vx, size_t aux_size, void *aux_vectors)
 Call iterative sparse linear equation solver. More...
 

Detailed Description

Iterative linear solvers used as multigrid smoothers only.

These smoothers are based on iterative solvers, but are simplified so as to avoid the cost of some residue computation and convergence testing operations.

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.

◆ 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 *  residue,
const cs_real_t rhs,
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_normresidue normalization
[out]n_iternumber of "equivalent" iterations
[out]residueresidue
[in]rhsright hand side
[in,out]vxsystem solution
[in]aux_sizenumber of elements in aux_vectors (in bytes)
aux_vectorsoptional working area (internal allocation if NULL)
Returns
convergence state