#include "base/cs_defs.h"#include <chrono>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <assert.h>#include <math.h>#include <mpi.h>#include "bft/bft_error.h"#include "bft/bft_printf.h"#include "base/cs_base.h"#include "base/cs_algorithm.h"#include "base/cs_dispatch.h"#include "base/cs_halo.h"#include "base/cs_halo_perio.h"#include "base/cs_log.h"#include "base/cs_math.h"#include "base/cs_mem.h"#include "base/cs_reducers.h"#include "alge/cs_matrix.h"#include "alge/cs_matrix_default.h"#include "alge/cs_matrix_tuning.h"#include "alge/cs_matrix_util.h"#include "base/cs_order.h"#include "base/cs_parall.h"#include "base/cs_profiling.h"#include "alge/cs_sles.h"#include "base/cs_sort.h"#include "fvm/fvm_defs.h"#include "alge/cs_grid.h"#include "alge/cs_grid_priv.h"
Include dependency graph for cs_grid.cpp:Functions | |
| void | cs_grid_set_diag_dom_clip_factor (double factor) |
| Set factor to ensure diagonal dominance. More... | |
| void | cs_grid_set_matrix_tuning (cs_matrix_fill_type_t fill_type, int max_level) |
| Set matrix tuning behavior for multigrid coarse meshes. More... | |
| void | cs_grid_restrict_row_var (cs_dispatch_context &ctx, const cs_grid_t *f, const cs_grid_t *c, const cs_real_t *f_var, cs_real_t *c_var) |
| void | cs_grid_prolong_row_var (cs_dispatch_context &ctx, const cs_grid_t *c, const cs_grid_t *f, bool increment, cs_real_t *c_var, cs_real_t *f_var) |
Coarse grid construction for multigrid solver.
The multigrid solver is based on an aggregation approach, with optional relaxation parameter.
The idea behind the relaxation is that for an unstructured finite volume approach on arbitrary shaped cells, it is possible to improve the scaled Galerkin approach based on piecewise constant interpolation for the R0 restriction and P0 prolongation operators. The off-diagonal entries of the P0 Galerkin coarse mesh matrix are rescaled by a parameter, which takes into account the mesh spacing ratio between the fine and coarse mesh in the vicinity of the coarse mesh cell boundaries. THis is detailed in [13] .
| void cs_grid_prolong_row_var | ( | cs_dispatch_context & | ctx, |
| const cs_grid_t * | c, | ||
| const cs_grid_t * | f, | ||
| bool | increment, | ||
| cs_real_t * | c_var, | ||
| cs_real_t * | f_var | ||
| ) |
| void cs_grid_restrict_row_var | ( | cs_dispatch_context & | ctx, |
| const cs_grid_t * | f, | ||
| const cs_grid_t * | c, | ||
| const cs_real_t * | f_var, | ||
| cs_real_t * | c_var | ||
| ) |
| void cs_grid_set_diag_dom_clip_factor | ( | double | factor | ) |
Set factor to ensure diagonal dominance.
| [in] | factor | clip margin factor (ignored if < 0). |
| void cs_grid_set_matrix_tuning | ( | cs_matrix_fill_type_t | fill_type, |
| int | max_level | ||
| ) |
Set matrix tuning behavior for multigrid coarse meshes.
The finest mesh (level 0) is handled by the default tuning options, so only coarser meshes are considered here.
| [in] | fill_type | associated matrix fill type |
| [in] | max_level | maximum level for which tuning is active |