#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"
Functions | |
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. 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... | |
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.
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:
[in] | smoother_type | type of smoother (CG, Jacobi, ...) |
[in] | poly_degree | preconditioning polynomial degree (0: diagonal; -1: non-preconditioned; see Iterative linear solvers. for details) |
[in] | n_iter | number of iterations to perform |
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.
[in,out] | context | pointer to iterative solver info and context (actual type: cs_sles_it_t *) |
[in] | name | pointer to system name |
[in] | a | associated matrix |
[in] | verbosity | associated verbosity |
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.
[in,out] | context | pointer to iterative solver info and context (actual type: cs_sles_it_t *) |
[in] | name | pointer to system name |
[in] | a | matrix |
[in] | verbosity | associated verbosity |
[in] | precision | solver precision |
[in] | r_norm | residue normalization |
[out] | n_iter | number of "equivalent" iterations |
[out] | residue | residue |
[in] | rhs | right hand side |
[in,out] | vx | system solution |
[in] | aux_size | number of elements in aux_vectors (in bytes) |
aux_vectors | optional working area (internal allocation if NULL) |