Gradient reconstruction at boundaries and associated functions. More...
#include "base/cs_defs.h"#include <assert.h>#include <errno.h>#include <stdio.h>#include <stdarg.h>#include <string.h>#include <math.h>#include <float.h>#include "bft/bft_error.h"#include "bft/bft_mem.h"#include "bft/bft_printf.h"#include "base/cs_ext_neighborhood.h"#include "base/cs_field.h"#include "base/cs_halo.h"#include "alge/cs_gradient_priv.h"#include "base/cs_math.h"#include "mesh/cs_mesh.h"#include "mesh/cs_mesh_adjacencies.h"#include "mesh/cs_mesh_quantities.h"#include "base/cs_parall.h"#include "alge/cs_gradient_boundary.h"
Include dependency graph for cs_gradient_boundary.cpp:Functions | |
| void | cs_gradient_boundary_iprime_lsq_s (const cs_mesh_t *m, const cs_mesh_quantities_t *fvq, cs_lnum_t n_faces, const cs_lnum_t *face_ids, cs_halo_type_t halo_type, double clip_coeff, const cs_field_bc_coeffs_t *bc_coeffs, const cs_real_t c_weight[], const cs_real_t var[], cs_real_t *restrict var_iprime) |
| Compute the values of a scalar at boundary face I' positions using least-squares interpolation. More... | |
| void | cs_gradient_boundary_iprime_lsq_s_ani (const cs_mesh_t *m, const cs_mesh_quantities_t *fvq, cs_lnum_t n_faces, const cs_lnum_t *face_ids, double clip_coeff, const cs_field_bc_coeffs_t *bc_coeffs, const cs_real_t c_weight[][6], const cs_real_t var[], cs_real_t *restrict var_iprime) |
| Compute the values of a scalar at boundary face I' positions using least-squares interpolation with anisotropic weighting. More... | |
Gradient reconstruction at boundaries and associated functions.
| void cs_gradient_boundary_iprime_lsq_s | ( | const cs_mesh_t * | m, |
| const cs_mesh_quantities_t * | fvq, | ||
| cs_lnum_t | n_faces, | ||
| const cs_lnum_t * | face_ids, | ||
| cs_halo_type_t | halo_type, | ||
| double | clip_coeff, | ||
| const cs_field_bc_coeffs_t * | bc_coeffs, | ||
| const cs_real_t | c_weight[], | ||
| const cs_real_t | var[], | ||
| cs_real_t *restrict | var_iprime | ||
| ) |
Compute the values of a scalar at boundary face I' positions using least-squares interpolation.
This assumes ghost cell values for the variable (var) are up-to-date.
A simple limiter is applied to ensure the maximum principle is preserved (using non-reconstructed values in case of non-homogeneous Neumann conditions).
To compute the values at I', we only need the gradient along II', so in most cases, we could simply assume a Neumann BC for a given face.
We still use the provided BC's when possible, for the following cases:
| [in] | m | pointer to associated mesh structure |
| [in] | fvq | pointer to associated finite volume quantities |
| [in] | n_faces | number of faces at which to compute values |
| [in] | face_ids | ids of boundary faces at which to compute values, or nullptr for all |
| [in] | halo_type | halo (cell neighborhood) type |
| [in] | clip_coeff | clipping (limiter) coefficient (no limiter if < 0) |
| [in] | bc_coeffs | boundary condition structure, or nullptr |
| [in] | c_weight | cell variable weight, or nullptr |
| [in] | var | variable values et cell centers |
| [out] | var_iprime | variable values et face iprime locations |
| void cs_gradient_boundary_iprime_lsq_s_ani | ( | const cs_mesh_t * | m, |
| const cs_mesh_quantities_t * | fvq, | ||
| cs_lnum_t | n_faces, | ||
| const cs_lnum_t * | face_ids, | ||
| double | clip_coeff, | ||
| const cs_field_bc_coeffs_t * | bc_coeffs, | ||
| const cs_real_t | c_weight[][6], | ||
| const cs_real_t | var[], | ||
| cs_real_t *restrict | var_iprime | ||
| ) |
Compute the values of a scalar at boundary face I' positions using least-squares interpolation with anisotropic weighting.
This assumes ghost cell values for the variable (var) are up-to-date.
A simple limiter is applied to ensure the maximum principle is preserved (using non-reconstructed values in case of non-homogeneous Neumann conditions).
| [in] | m | pointer to associated mesh structure |
| [in] | fvq | pointer to associated finite volume quantities |
| [in] | n_faces | number of faces at which to compute values |
| [in] | face_ids | ids of boundary faces at which to compute values, or nullptr for all |
| [in] | clip_coeff | clipping (limiter) coefficient (no limiter if < 0) |
| [in] | bc_coeffs | boundary condition structure |
| [in] | c_weight | cell variable weight, or nullptr |
| [in] | var | variable values et cell centers |
| [out] | var_iprime | variable values et face iprime locations |