9.1
general documentation
cs_gradient_boundary.h File Reference
#include "base/cs_base.h"
#include "base/cs_dispatch.h"
#include "base/cs_field.h"
#include "base/cs_halo.h"
#include "mesh/cs_mesh.h"
#include "mesh/cs_mesh_quantities.h"
+ Include dependency graph for cs_gradient_boundary.h:

Go to the source code of this file.

Functions

void cs_gradient_boundary_iprime_lsq_s (cs_dispatch_context &ctx, 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, int hyd_p_flag, cs_real_t f_ext[][3], cs_real_t *df_limiter, const cs_field_bc_coeffs_t *bc_coeffs, const cs_real_t c_weight[], const cs_real_t var[], cs_real_t *var_iprime, cs_real_t var_iprime_lim[])
 
void cs_gradient_boundary_iprime_lsq_s_ani (cs_dispatch_context &ctx, 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, int hyd_p_flag, cs_real_t f_ext[][3], cs_real_t *df_limiter, const cs_field_bc_coeffs_t *bc_coeffs, cs_real_t viscel[][6], const cs_real_t weighb[], const cs_real_t c_weight[][6], const cs_real_t var[], cs_real_t *var_iprime, cs_real_t var_iprime_lim[])
 
template<cs_lnum_t stride>
void cs_gradient_boundary_iprime_lsq_strided (cs_dispatch_context &ctx, 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 b_clip_coeff, cs_real_t *df_limiter, const cs_field_bc_coeffs_t *bc_coeffs, const cs_real_t c_weight[], const cs_real_t var[][stride], cs_real_t var_iprime[][stride], cs_real_t var_iprime_lim[][stride])
 Compute the values of a vector at boundary face I' positions using least-squares interpolation. More...
 

Function Documentation

◆ cs_gradient_boundary_iprime_lsq_s()

void cs_gradient_boundary_iprime_lsq_s ( cs_dispatch_context ctx,
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,
int  hyd_p_flag,
cs_real_t  f_ext[][3],
cs_real_t df_limiter,
const cs_field_bc_coeffs_t bc_coeffs,
const cs_real_t  c_weight[],
const cs_real_t  var[],
cs_real_t var_iprime,
cs_real_t  var_iprime_lim[] 
)

◆ cs_gradient_boundary_iprime_lsq_s_ani()

void cs_gradient_boundary_iprime_lsq_s_ani ( cs_dispatch_context ctx,
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,
int  hyd_p_flag,
cs_real_t  f_ext[][3],
cs_real_t df_limiter,
const cs_field_bc_coeffs_t bc_coeffs,
cs_real_t  viscel[][6],
const cs_real_t  weighb[],
const cs_real_t  c_weight[][6],
const cs_real_t  var[],
cs_real_t var_iprime,
cs_real_t  var_iprime_lim[] 
)

◆ cs_gradient_boundary_iprime_lsq_strided()

void cs_gradient_boundary_iprime_lsq_strided ( cs_dispatch_context ctx,
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  b_clip_coeff,
cs_real_t df_limiter,
const cs_field_bc_coeffs_t bc_coeffs,
const cs_real_t  c_weight[],
const cs_real_t  var[][stride],
cs_real_t  var_iprime[][stride],
cs_real_t  var_iprime_lim[][stride] 
)

Compute the values of a vector at boundary face I' positions using least-squares interpolation.

This assumes ghost cell values which might be used are already synchronized.

A simple limiter is applied to ensure the maximum principle is preserved (using non-reconstructed values in case of non-homogeneous Neumann conditions).

This function uses a local iterative approach to compute the cell gradient, as handling of the boundary condition terms b in higher dimensions would otherwise require solving higher-dimensional systems, often at a higher cost.

Remarks

To compute the values at I', we only need the gradient along II', so in most cases, we could simply assume a Neuman BC.

The same logic is applied as for cs_gradient_boundary_iprime_lsq_s.

Parameters
[in]ctxReference to dispatch context
[in]mpointer to associated mesh structure
[in]fvqpointer to associated finite volume quantities
[in]n_facesnumber of faces at which to compute values
[in]face_idsids of boundary faces at which to compute values, or NULL for all
[in]halo_typehalo (cell neighborhood) type
[in]b_clip_coeffboundary clipping (limiter) coefficient (no limiter if < 0)
[in]df_limiterdiffusion clipping (limiter) field (no limiter if nullptr)
[in]bc_coeffsboundary condition structure, or NULL
[in]c_weightcell variable weight, or NULL
[in]varvariable values at cell centers
[out]var_iprimevariable values at face iprime locations
[out]var_iprime_limlimited variable values at face iprime locations