9.0
general documentation
Loading...
Searching...
No Matches
cs_convection_diffusion_priv.h File Reference
Include dependency graph for cs_convection_diffusion_priv.h:

Go to the source code of this file.

Functions

static void cs_sync_scalar_halo (const cs_mesh_t *m, cs_halo_type_t halo_type, cs_real_t pvar[])
static CS_F_HOST_DEVICE cs_real_t cs_nvd_scheme_scalar (const cs_nvd_type_t limiter, const cs_real_t nvf_p_c, const cs_real_t nvf_r_f, const cs_real_t nvf_r_c)
 Compute the normalized face scalar using the specified NVD scheme.
static CS_F_HOST_DEVICE cs_real_t cs_nvd_vof_scheme_scalar (cs_nvd_type_t limiter, const cs_nreal_t i_face_u_normal[3], cs_real_t nvf_p_c, cs_real_t nvf_r_f, cs_real_t nvf_r_c, const cs_real_t gradv_c[3], const cs_real_t c_courant)
 Compute the normalised face scalar using the specified NVD scheme for the case of a Volume-of-Fluid (VOF) transport equation.
static CS_F_HOST_DEVICE void cs_slope_test (const cs_real_t pi, const cs_real_t pj, const cs_real_t distf, const cs_nreal_t i_face_u_normal[3], const cs_real_t gradi[3], const cs_real_t gradj[3], const cs_real_t grdpai[3], const cs_real_t grdpaj[3], const cs_real_t i_massflux, cs_real_t *testij, cs_real_t *tesqck)
 Compute slope test criteria at internal face between cell i and j.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_slope_test_strided (const cs_real_t pi[stride], const cs_real_t pj[stride], const cs_real_t distf, const cs_nreal_t i_face_u_normal[3], const cs_real_t gradi[stride][3], const cs_real_t gradj[stride][3], const cs_real_t gradsti[stride][3], const cs_real_t gradstj[stride][3], const cs_real_t i_massflux, cs_real_t *testij, cs_real_t *tesqck)
 Compute slope test criteria at internal face between cell i and j.
static CS_F_HOST_DEVICE void cs_i_compute_quantities (const cs_real_t bldfrp, const cs_rreal_3_t diipf, const cs_rreal_3_t djjpf, const cs_real_3_t gradi, const cs_real_3_t gradj, const cs_real_t pi, const cs_real_t pj, cs_real_t *recoi, cs_real_t *recoj, cs_real_t *pip, cs_real_t *pjp)
 Reconstruct values in I' and J'.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_i_compute_quantities_strided (const cs_real_t bldfrp, const cs_rreal_t diipf[3], const cs_rreal_t djjpf[3], const cs_real_t gradi[stride][3], const cs_real_t gradj[stride][3], const cs_real_t pi[stride], const cs_real_t pj[stride], cs_real_t recoi[stride], cs_real_t recoj[stride], cs_real_t pip[stride], cs_real_t pjp[stride])
 Reconstruct values in I' and J'.
static CS_F_HOST_DEVICE void cs_i_relax_c_val (const double relaxp, const cs_real_t pia, const cs_real_t pja, const cs_real_t recoi, const cs_real_t recoj, const cs_real_t pi, const cs_real_t pj, cs_real_t *pir, cs_real_t *pjr, cs_real_t *pipr, cs_real_t *pjpr)
 Compute relaxed values at cell i and j.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_i_relax_c_val_strided (cs_real_t relaxp, const cs_real_t pia[stride], const cs_real_t pja[stride], const cs_real_t recoi[stride], const cs_real_t recoj[stride], const cs_real_t pi[stride], const cs_real_t pj[stride], cs_real_t pir[stride], cs_real_t pjr[stride], cs_real_t pipr[stride], cs_real_t pjpr[stride])
 Compute relaxed values at cell i and j.
static CS_F_HOST_DEVICE void cs_upwind_f_val (const cs_real_t p, cs_real_t *pf)
 Prepare value at face ij by using an upwind scheme.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_upwind_f_val_strided (const cs_real_t p[stride], cs_real_t pf[stride])
 Prepare value at face ij by using an upwind scheme.
static CS_F_HOST_DEVICE void cs_centered_f_val (double pnd, cs_real_t pip, cs_real_t pjp, cs_real_t *pf)
 Prepare value at face ij by using a centered scheme.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_centered_f_val_strided (double pnd, const cs_real_t pip[stride], const cs_real_t pjp[stride], cs_real_t pf[stride])
 Prepare value at face ij by using a centered scheme.
static CS_F_HOST_DEVICE void cs_solu_f_val (const cs_real_t cell_cen[3], const cs_real_t i_face_cog[3], const cs_real_t grad[3], const cs_real_t p, cs_real_t *pf)
 Prepare value at face ij by using a Second Order Linear Upwind scheme.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_solu_f_val_strided (const cs_real_t cell_cen[3], const cs_real_t i_face_cog[3], const cs_real_t grad[stride][3], const cs_real_t p[stride], cs_real_t pf[stride])
 Prepare value at face ij by using a Second Order Linear Upwind scheme.
static CS_F_HOST_DEVICE void cs_blend_f_val (const double blencp, const cs_real_t p, cs_real_t *pf)
 Blend face values for a centered or SOLU scheme with face values for an upwind scheme.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_blend_f_val_strided (const double blencp, const cs_real_t p[stride], cs_real_t pf[stride])
 Blend face values for a centered or SOLU scheme with face values for an upwind scheme.
static CS_F_HOST_DEVICE void cs_i_conv_flux (const int iconvp, const cs_real_t thetap, const int imasac, const cs_real_t pi, const cs_real_t pj, const cs_real_t pifri, const cs_real_t pifrj, const cs_real_t pjfri, const cs_real_t pjfrj, const cs_real_t i_massflux, const cs_real_t xcppi, const cs_real_t xcppj, cs_real_2_t fluxij)
 Add convective fluxes (substracting the mass accumulation from them) to fluxes at face ij.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_i_conv_flux_strided (int iconvp, cs_real_t thetap, int imasac, const cs_real_t pi[stride], const cs_real_t pj[stride], const cs_real_t pifri[stride], const cs_real_t pifrj[stride], const cs_real_t pjfri[stride], const cs_real_t pjfrj[stride], cs_real_t i_massflux, cs_real_t fluxi[stride], cs_real_t fluxj[stride])
 Add convective fluxes (substracting the mass accumulation from them) to fluxes at face ij.
static CS_F_HOST_DEVICE void cs_i_diff_flux (const int idiffp, const cs_real_t thetap, const cs_real_t pip, const cs_real_t pjp, const cs_real_t pipr, const cs_real_t pjpr, const cs_real_t i_visc, cs_real_t fluxij[2])
 Add diffusive fluxes to fluxes at face ij.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_i_diff_flux_strided (int idiffp, cs_real_t thetap, const cs_real_t pip[stride], const cs_real_t pjp[stride], const cs_real_t pipr[stride], const cs_real_t pjpr[stride], const cs_real_t i_visc, cs_real_t fluxi[stride], cs_real_t fluxj[stride])
 Add diffusive fluxes to fluxes at face ij.
static CS_F_HOST_DEVICE void cs_i_cd_steady_upwind (const cs_real_t bldfrp, const cs_real_t relaxp, const cs_rreal_t diipf[3], const cs_rreal_t djjpf[3], const cs_real_t gradi[3], const cs_real_t gradj[3], const cs_real_t pi, const cs_real_t pj, const cs_real_t pia, const cs_real_t pja, cs_real_t *pifri, cs_real_t *pifrj, cs_real_t *pjfri, cs_real_t *pjfrj, cs_real_t *pip, cs_real_t *pjp, cs_real_t *pipr, cs_real_t *pjpr)
 Handle preparation of internal face values for the fluxes computation in case of a steady algorithm and a pure upwind flux.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_i_cd_steady_upwind_strided (const cs_real_t bldfrp, const cs_real_t relaxp, const cs_rreal_t diipf[3], const cs_rreal_t djjpf[3], const cs_real_t gradi[stride][3], const cs_real_t gradj[stride][3], const cs_real_t pi[stride], const cs_real_t pj[stride], const cs_real_t pia[stride], const cs_real_t pja[stride], cs_real_t pifri[stride], cs_real_t pifrj[stride], cs_real_t pjfri[stride], cs_real_t pjfrj[stride], cs_real_t pip[stride], cs_real_t pjp[stride], cs_real_t pipr[stride], cs_real_t pjpr[stride])
 Handle preparation of internal face values for the fluxes computation in case of a steady algorithm and a pure upwind flux.
static CS_F_HOST_DEVICE void cs_i_cd_unsteady_upwind (const cs_real_t bldfrp, const cs_rreal_t diipf[3], const cs_rreal_t djjpf[3], const cs_real_t gradi[3], const cs_real_t gradj[3], const cs_real_t pi, const cs_real_t pj, cs_real_t *pif, cs_real_t *pjf, cs_real_t *pip, cs_real_t *pjp)
 Handle preparation of internal face values for the fluxes computation in case of an unsteady algorithm and a pure upwind flux.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_i_cd_unsteady_upwind_strided (const cs_real_t bldfrp, const cs_rreal_t diipf[3], const cs_rreal_t djjpf[3], const cs_real_t gradi[stride][3], const cs_real_t gradj[stride][3], const cs_real_t pi[stride], const cs_real_t pj[stride], cs_real_t pif[stride], cs_real_t pjf[stride], cs_real_t pip[stride], cs_real_t pjp[stride])
 Handle preparation of internal face values for the fluxes computation in case of an unsteady algorithm and a pure upwind flux.
static CS_F_HOST_DEVICE void cs_i_cd_steady (const cs_real_t bldfrp, const int ischcp, const double relaxp, const double blencp, const cs_real_t weight, const cs_real_t cell_ceni[3], const cs_real_t cell_cenj[3], const cs_real_t i_face_cog[3], const cs_rreal_t diipf[3], const cs_rreal_t djjpf[3], const cs_real_t gradi[3], const cs_real_t gradj[3], const cs_real_t gradupi[3], const cs_real_t gradupj[3], const cs_real_t pi, const cs_real_t pj, const cs_real_t pia, const cs_real_t pja, cs_real_t *pifri, cs_real_t *pifrj, cs_real_t *pjfri, cs_real_t *pjfrj, cs_real_t *pip, cs_real_t *pjp, cs_real_t *pipr, cs_real_t *pjpr)
 Handle preparation of internal face values for the fluxes computation in case of a steady algorithm and without enabling slope tests.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_i_cd_steady_strided (cs_real_t bldfrp, int ischcp, double relaxp, double blencp, cs_real_t weight, const cs_real_t cell_ceni[3], const cs_real_t cell_cenj[3], const cs_real_t i_face_cog[3], const cs_rreal_t diipf[3], const cs_rreal_t djjpf[3], const cs_real_t gradi[stride][3], const cs_real_t gradj[stride][3], const cs_real_t pi[stride], const cs_real_t pj[stride], const cs_real_t pia[stride], const cs_real_t pja[stride], cs_real_t pifri[stride], cs_real_t pifrj[stride], cs_real_t pjfri[stride], cs_real_t pjfrj[stride], cs_real_t pip[stride], cs_real_t pjp[stride], cs_real_t pipr[stride], cs_real_t pjpr[stride])
 Handle preparation of internal face values for the fluxes computation in case of a steady algorithm and without enabling slope tests.
static CS_F_HOST_DEVICE void cs_i_cd_unsteady (const cs_real_t bldfrp, const int ischcp, const double blencp, const cs_real_t weight, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_real_3_t i_face_cog, const cs_real_t hybrid_blend_i, const cs_real_t hybrid_blend_j, const cs_rreal_3_t diipf, const cs_rreal_3_t djjpf, const cs_real_3_t gradi, const cs_real_3_t gradj, const cs_real_3_t gradupi, const cs_real_3_t gradupj, const cs_real_t pi, const cs_real_t pj, cs_real_t *pif, cs_real_t *pjf, cs_real_t *pip, cs_real_t *pjp)
 Handle preparation of internal face values for the fluxes computation in case of a unsteady algorithm and without enabling slope tests.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_i_cd_unsteady_strided (cs_real_t bldfrp, int ischcp, double blencp, cs_real_t weight, const cs_real_t cell_ceni[3], const cs_real_t cell_cenj[3], const cs_real_t i_face_cog[3], const cs_real_t hybrid_blend_i, const cs_real_t hybrid_blend_j, const cs_rreal_t diipf[3], const cs_rreal_t djjpf[3], const cs_real_t gradi[stride][3], const cs_real_t gradj[stride][3], const cs_real_t pi[stride], const cs_real_t pj[stride], cs_real_t pif[stride], cs_real_t pjf[stride], cs_real_t pip[stride], cs_real_t pjp[stride])
 Handle preparation of internal face values for the fluxes computation in case of an unsteady algorithm and without enabling slope tests.
static CS_F_HOST_DEVICE void cs_i_cd_steady_slope_test (bool *upwind_switch, const int iconvp, const cs_real_t bldfrp, const int ischcp, const double relaxp, const double blencp, const double blend_st, const cs_real_t weight, const cs_real_t i_dist, const cs_real_t cell_ceni[3], const cs_real_t cell_cenj[3], const cs_nreal_t i_face_u_normal[3], const cs_real_t i_face_cog[3], const cs_rreal_t diipf[3], const cs_rreal_t djjpf[3], const cs_real_t i_massflux, const cs_real_t gradi[3], const cs_real_t gradj[3], const cs_real_t gradupi[3], const cs_real_t gradupj[3], const cs_real_t gradsti[3], const cs_real_t gradstj[3], const cs_real_t pi, const cs_real_t pj, const cs_real_t pia, const cs_real_t pja, cs_real_t *pifri, cs_real_t *pifrj, cs_real_t *pjfri, cs_real_t *pjfrj, cs_real_t *pip, cs_real_t *pjp, cs_real_t *pipr, cs_real_t *pjpr)
 Handle preparation of internal face values for the fluxes computation in case of a steady algorithm and using slope tests.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_i_cd_steady_slope_test_strided (bool *upwind_switch, int iconvp, cs_real_t bldfrp, int ischcp, double relaxp, double blencp, double blend_st, cs_real_t weight, cs_real_t i_dist, const cs_real_t cell_ceni[3], const cs_real_t cell_cenj[3], const cs_nreal_t i_face_u_normal[3], const cs_real_t i_face_cog[3], const cs_rreal_t diipf[3], const cs_rreal_t djjpf[3], cs_real_t i_massflux, const cs_real_t gradi[stride][3], const cs_real_t gradj[stride][3], const cs_real_t grdpai[stride][3], const cs_real_t grdpaj[stride][3], const cs_real_t pi[stride], const cs_real_t pj[stride], const cs_real_t pia[stride], const cs_real_t pja[stride], cs_real_t pifri[stride], cs_real_t pifrj[stride], cs_real_t pjfri[stride], cs_real_t pjfrj[stride], cs_real_t pip[stride], cs_real_t pjp[stride], cs_real_t pipr[stride], cs_real_t pjpr[stride])
 Handle preparation of internal face values for the fluxes computation in case of a steady algorithm and using slope tests.
static CS_F_HOST_DEVICE void cs_i_cd_unsteady_slope_test (bool *upwind_switch, const int iconvp, const cs_real_t bldfrp, const int ischcp, const double blencp, const double blend_st, const cs_real_t weight, const cs_real_t i_dist, const cs_real_3_t cell_ceni, const cs_real_3_t cell_cenj, const cs_nreal_3_t i_face_u_normal, const cs_real_3_t i_face_cog, const cs_rreal_3_t diipf, const cs_rreal_3_t djjpf, const cs_real_t i_massflux, const cs_real_3_t gradi, const cs_real_3_t gradj, const cs_real_3_t gradupi, const cs_real_3_t gradupj, const cs_real_3_t gradsti, const cs_real_3_t gradstj, const cs_real_t pi, const cs_real_t pj, cs_real_t *pif, cs_real_t *pjf, cs_real_t *pip, cs_real_t *pjp)
 Handle preparation of internal face values for the fluxes computation in case of a steady algorithm and using slope tests.
static CS_F_HOST_DEVICE void cs_central_downwind_cells (const cs_lnum_t ii, const cs_lnum_t jj, const cs_real_t i_massflux, cs_lnum_t *ic, cs_lnum_t *id)
 Determine the upwind and downwind sides of an internal face and matching cell indices.
static CS_F_HOST_DEVICE void cs_i_cd_unsteady_nvd (const cs_nvd_type_t limiter, const double beta, const cs_real_3_t cell_cen_c, const cs_real_3_t cell_cen_d, const cs_nreal_3_t i_face_u_normal, const cs_real_3_t i_face_cog, const cs_real_3_t gradv_c, const cs_real_t p_c, const cs_real_t p_d, const cs_real_t local_max_c, const cs_real_t local_min_c, const cs_real_t courant_c, cs_real_t *pif, cs_real_t *pjf)
 Handle preparation of internal face values for the convection flux computation in case of an unsteady algorithm and using NVD schemes.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_i_cd_unsteady_slope_test_strided (bool *upwind_switch, int iconvp, cs_real_t bldfrp, int ischcp, double blencp, double blend_st, cs_real_t weight, cs_real_t i_dist, const cs_real_t cell_ceni[3], const cs_real_t cell_cenj[3], const cs_nreal_t i_face_u_normal[3], const cs_real_t i_face_cog[3], const cs_rreal_t diipf[3], const cs_rreal_t djjpf[3], cs_real_t i_massflux, const cs_real_t gradi[stride][3], const cs_real_t gradj[stride][3], const cs_real_t grdpai[stride][3], const cs_real_t grdpaj[stride][3], const cs_real_t pi[stride], const cs_real_t pj[stride], cs_real_t pif[stride], cs_real_t pjf[stride], cs_real_t pip[stride], cs_real_t pjp[stride])
 Handle preparation of internal face values for the fluxes computation in case of a unsteady algorithm and using slope tests.
static CS_F_HOST_DEVICE void cs_b_compute_quantities (const cs_rreal_t diipb[3], const cs_real_t gradi[3], const cs_real_t bldfrp, cs_real_t *recoi)
 Reconstruct values in I' at boundary cell i.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_b_compute_quantities_strided (const cs_rreal_t diipb[3], const cs_real_t gradi[stride][3], const cs_real_t bldfrp, cs_real_t recoi[stride])
 Reconstruct values in I' at boundary cell i.
static CS_F_HOST_DEVICE void cs_b_relax_c_val (const double relaxp, const cs_real_t pi, const cs_real_t pia, const cs_real_t recoi, cs_real_t *pir, cs_real_t *pipr)
 Compute relaxed values at boundary cell i.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_b_relax_c_val_strided (const double relaxp, const cs_real_t pi[stride], const cs_real_t pia[stride], const cs_real_t recoi[stride], cs_real_t pir[stride], cs_real_t pipr[stride])
 Compute relaxed values at boundary cell i.
static CS_F_HOST_DEVICE void cs_b_imposed_conv_flux (int iconvp, cs_real_t thetap, int imasac, int inc, int bc_type, int icvfli, cs_real_t pi, cs_real_t pir, cs_real_t pipr, cs_real_t coefap, cs_real_t coefbp, cs_real_t coface, cs_real_t cofbce, cs_real_t b_massflux, cs_real_t xcpp, cs_real_t *flux)
 Add convective flux (substracting the mass accumulation from it) to flux at boundary face. The convective flux can be either an upwind flux or an imposed value.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_b_imposed_conv_flux_strided (int iconvp, cs_real_t thetap, int imasac, int inc, int bc_type, int icvfli, const cs_real_t pi[stride], const cs_real_t pir[stride], const cs_real_t pipr[stride], const cs_real_t coface[stride], const cs_real_t cofbce[stride][stride], cs_real_t b_massflux, cs_real_t pfac[stride], cs_real_t flux[stride])
 Add convective flux (substracting the mass accumulation from it) to flux at boundary face. The convective flux can be either an upwind flux or an imposed value.
static CS_F_HOST_DEVICE void cs_b_upwind_flux (const int iconvp, const cs_real_t thetap, const int imasac, const int inc, const int bc_type, const cs_real_t pi, const cs_real_t pir, const cs_real_t pipr, const cs_real_t coefap, const cs_real_t coefbp, const cs_real_t b_massflux, const cs_real_t xcpp, cs_real_t *flux)
 Add convective flux (substracting the mass accumulation from it) to flux at boundary face. The convective flux is a pure upwind flux.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_b_upwind_flux_strided (int iconvp, cs_real_t thetap, int imasac, int bc_type, const cs_real_t pi[stride], const cs_real_t pir[stride], const cs_real_t b_massflux, const cs_real_t pfac[stride], cs_real_t flux[stride])
 Add convective flux (substracting the mass accumulation from it) to flux at boundary face. The convective flux is a pure upwind flux.
static CS_F_HOST_DEVICE void cs_b_diff_flux (const int idiffp, const cs_real_t thetap, const int inc, const cs_real_t pipr, const cs_real_t cofafp, const cs_real_t cofbfp, const cs_real_t b_visc, cs_real_t *flux)
 Add diffusive flux to flux at boundary face.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_b_diff_flux_strided (int idiffp, cs_real_t thetap, cs_real_t b_visc, const cs_real_t pfacd[stride], cs_real_t flux[stride])
 Add diffusive flux to flux at boundary face.
static CS_F_HOST_DEVICE void cs_b_cd_steady (const cs_real_t bldfrp, const double relaxp, const cs_rreal_3_t diipb, const cs_real_3_t gradi, const cs_real_t pi, const cs_real_t pia, cs_real_t *pir, cs_real_t *pipr)
 Handle preparation of boundary face values for the flux computation in case of a steady algorithm.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_b_cd_steady_strided (cs_real_t bldfrp, double relaxp, const cs_rreal_t diipb[3], const cs_real_t gradi[stride][3], const cs_real_t pi[stride], const cs_real_t pia[stride], cs_real_t pir[stride], cs_real_t pipr[stride])
 Handle preparation of boundary face values for the flux computation in case of a steady algorithm.
static CS_F_HOST_DEVICE void cs_b_cd_unsteady (const cs_real_t bldfrp, const cs_rreal_t diipb[3], const cs_real_t gradi[3], const cs_real_t pi, cs_real_t *pip)
 Handle preparation of boundary face values for the flux computation in case of an unsteady algorithm.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_b_cd_unsteady_strided (cs_real_t bldfrp, const cs_rreal_t diipb[3], const cs_real_t gradi[stride][3], const cs_real_t pi[stride], cs_real_t pip[stride])
 Handle preparation of boundary face values for the flux computation in case of a steady algorithm.
static CS_F_HOST_DEVICE void cs_b_diff_flux_coupling (int idiffp, cs_real_t pi, cs_real_t pj, cs_real_t b_visc, cs_real_t *fluxi)
 Add diffusive flux to flux at an internal coupling face.
template<cs_lnum_t stride>
static CS_F_HOST_DEVICE void cs_b_diff_flux_coupling_strided (int idiffp, const cs_real_t pi[stride], const cs_real_t pj[stride], cs_real_t b_visc, cs_real_t fluxi[stride])
 Add diffusive flux to flux at an internal coupling face for a vector.

Function Documentation

◆ cs_b_cd_steady()

CS_F_HOST_DEVICE void cs_b_cd_steady ( const cs_real_t bldfrp,
const double relaxp,
const cs_rreal_3_t diipb,
const cs_real_3_t gradi,
const cs_real_t pi,
const cs_real_t pia,
cs_real_t * pir,
cs_real_t * pipr )
inlinestatic

Handle preparation of boundary face values for the flux computation in case of a steady algorithm.

Parameters
[in]bldfrpreconstruction blending factor
[in]relaxprelaxation coefficient
[in]diipbdistance I'I'
[in]gradigradient at cell i
[in]pivalue at cell i
[in]piaold value at cell i
[out]pirrelaxed value at cell i
[out]piprrelaxed reconstructed value at cell i

◆ cs_b_cd_steady_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_b_cd_steady_strided ( cs_real_t bldfrp,
double relaxp,
const cs_rreal_t diipb[3],
const cs_real_t gradi[stride][3],
const cs_real_t pi[stride],
const cs_real_t pia[stride],
cs_real_t pir[stride],
cs_real_t pipr[stride] )
inlinestatic

Handle preparation of boundary face values for the flux computation in case of a steady algorithm.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]bldfrpreconstruction blending factor
[in]relaxprelaxation coefficient
[in]diipbdistance I'I'
[in]gradigradient at cell i
[in]pivalue at cell i
[in]piaold value at cell i
[out]pirrelaxed value at cell i
[out]piprrelaxed reconstructed value at cell i

◆ cs_b_cd_unsteady()

CS_F_HOST_DEVICE void cs_b_cd_unsteady ( const cs_real_t bldfrp,
const cs_rreal_t diipb[3],
const cs_real_t gradi[3],
const cs_real_t pi,
cs_real_t * pip )
inlinestatic

Handle preparation of boundary face values for the flux computation in case of an unsteady algorithm.

Parameters
[in]bldfrpreconstruction blending factor
[in]diipbdistance I'I'
[in]gradigradient at cell i
[in]pivalue at cell i
[out]pipreconstructed value at cell i

◆ cs_b_cd_unsteady_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_b_cd_unsteady_strided ( cs_real_t bldfrp,
const cs_rreal_t diipb[3],
const cs_real_t gradi[stride][3],
const cs_real_t pi[stride],
cs_real_t pip[stride] )
inlinestatic

Handle preparation of boundary face values for the flux computation in case of a steady algorithm.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]bldfrpreconstruction blending factor
[in]diipbdistance I'I'
[in]gradigradient at cell i
[in]pivalue at cell i
[out]pipreconstructed value at cell i

◆ cs_b_compute_quantities()

CS_F_HOST_DEVICE void cs_b_compute_quantities ( const cs_rreal_t diipb[3],
const cs_real_t gradi[3],
const cs_real_t bldfrp,
cs_real_t * recoi )
inlinestatic

Reconstruct values in I' at boundary cell i.

Parameters
[in]diipbdistance I'I'
[in]gradigradient at cell i
[in]bldfrpreconstruction blending factor
[out]recoireconstruction at cell i

◆ cs_b_compute_quantities_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_b_compute_quantities_strided ( const cs_rreal_t diipb[3],
const cs_real_t gradi[stride][3],
const cs_real_t bldfrp,
cs_real_t recoi[stride] )
inlinestatic

Reconstruct values in I' at boundary cell i.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]diipbdistance I'I'
[in]gradigradient at cell i
[in]bldfrpreconstruction blending factor
[out]recoireconstruction at cell i

◆ cs_b_diff_flux()

CS_F_HOST_DEVICE void cs_b_diff_flux ( const int idiffp,
const cs_real_t thetap,
const int inc,
const cs_real_t pipr,
const cs_real_t cofafp,
const cs_real_t cofbfp,
const cs_real_t b_visc,
cs_real_t * flux )
inlinestatic

Add diffusive flux to flux at boundary face.

Parameters
[in]idiffpdiffusion flag
[in]thetapweighting coefficient for the theta-scheme,
[in]incNot an increment flag
[in]piprrelaxed reconstructed value at cell i
[in]cofafpexplicit boundary coefficient for diffusion operator
[in]cofbfpimplicit boundary coefficient for diffusion operator
[in]b_viscboundary face surface
[in,out]fluxflux at boundary face

◆ cs_b_diff_flux_coupling()

CS_F_HOST_DEVICE void cs_b_diff_flux_coupling ( int idiffp,
cs_real_t pi,
cs_real_t pj,
cs_real_t b_visc,
cs_real_t * fluxi )
inlinestatic

Add diffusive flux to flux at an internal coupling face.

Parameters
[in]idiffpdiffusion flag
[in]pivalue at cell i
[in]pjvalue at cell j
[in]b_viscequivalent exchange coefficient at an internal coupling face
[in,out]fluxiflux at internal coupling face

◆ cs_b_diff_flux_coupling_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_b_diff_flux_coupling_strided ( int idiffp,
const cs_real_t pi[stride],
const cs_real_t pj[stride],
cs_real_t b_visc,
cs_real_t fluxi[stride] )
inlinestatic

Add diffusive flux to flux at an internal coupling face for a vector.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]idiffpdiffusion flag
[in]pivalue at cell i
[in]pjvalue at cell j
[in]b_viscequivalent exchange coefficient at an internal coupling face
[in,out]fluxiflux at internal coupling face

◆ cs_b_diff_flux_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_b_diff_flux_strided ( int idiffp,
cs_real_t thetap,
cs_real_t b_visc,
const cs_real_t pfacd[stride],
cs_real_t flux[stride] )
inlinestatic

Add diffusive flux to flux at boundary face.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]idiffpdiffusion flag
[in]thetapweighting coefficient for the theta-scheme,
[in]b_viscboundary face surface
[in]pfacdvalue at boundary face
[in,out]fluxflux at boundary face

◆ cs_b_imposed_conv_flux()

CS_F_HOST_DEVICE void cs_b_imposed_conv_flux ( int iconvp,
cs_real_t thetap,
int imasac,
int inc,
int bc_type,
int icvfli,
cs_real_t pi,
cs_real_t pir,
cs_real_t pipr,
cs_real_t coefap,
cs_real_t coefbp,
cs_real_t coface,
cs_real_t cofbce,
cs_real_t b_massflux,
cs_real_t xcpp,
cs_real_t * flux )
inlinestatic

Add convective flux (substracting the mass accumulation from it) to flux at boundary face. The convective flux can be either an upwind flux or an imposed value.

Parameters
[in]iconvpconvection flag
[in]thetapweighting coefficient for the theta-scheme,
[in]imasactake mass accumulation into account?
[in]incNot an increment flag
[in]bc_typetype of boundary face
[in]icvfliimposed convective flux flag
[in]pivalue at cell i
[in]pirrelaxed value at cell i
[in]piprrelaxed reconstructed value at cell i
[in]coefapexplicit boundary coefficient for convection operator
[in]coefbpimplicit boundary coefficient for convection operator
[in]cofaceexplicit imposed convective flux value (0 otherwise).
[in]cofbceimplicit part of imp. conv. flux value
[in]b_massfluxmass flux at boundary face
[in]xcppspecific heat value if the scalar is the temperature, 1 otherwise
[in,out]fluxflux at boundary face

◆ cs_b_imposed_conv_flux_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_b_imposed_conv_flux_strided ( int iconvp,
cs_real_t thetap,
int imasac,
int inc,
int bc_type,
int icvfli,
const cs_real_t pi[stride],
const cs_real_t pir[stride],
const cs_real_t pipr[stride],
const cs_real_t coface[stride],
const cs_real_t cofbce[stride][stride],
cs_real_t b_massflux,
cs_real_t pfac[stride],
cs_real_t flux[stride] )
inlinestatic

Add convective flux (substracting the mass accumulation from it) to flux at boundary face. The convective flux can be either an upwind flux or an imposed value.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]iconvpconvection flag
[in]thetapweighting coefficient for the theta-scheme,
[in]imasactake mass accumulation into account?
[in]incNot an increment flag
[in]bc_typetype of boundary face
[in]icvfliimposed convective flux flag
[in]pivalue at cell i
[in]pirrelaxed value at cell i
[in]piprrelaxed reconstructed value at cell i
[in]cofaceexplicit imposed convective flux value (0 otherwise).
[in]cofbceimplicit part of imp. conv. flux value
[in]b_massfluxmass flux at boundary face
[in]pfacvalue at boundary face
[in,out]fluxflux at boundary face

◆ cs_b_relax_c_val()

CS_F_HOST_DEVICE void cs_b_relax_c_val ( const double relaxp,
const cs_real_t pi,
const cs_real_t pia,
const cs_real_t recoi,
cs_real_t * pir,
cs_real_t * pipr )
inlinestatic

Compute relaxed values at boundary cell i.

Parameters
[in]relaxprelaxation coefficient
[in]pivalue at cell i
[in]piaold value at cell i
[in]recoireconstruction at cell i
[out]pirrelaxed value at cell i
[out]piprrelaxed reconstructed value at cell i

◆ cs_b_relax_c_val_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_b_relax_c_val_strided ( const double relaxp,
const cs_real_t pi[stride],
const cs_real_t pia[stride],
const cs_real_t recoi[stride],
cs_real_t pir[stride],
cs_real_t pipr[stride] )
inlinestatic

Compute relaxed values at boundary cell i.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]relaxprelaxation coefficient
[in]pivalue at cell i
[in]piaold value at cell i
[in]recoireconstruction at cell i
[out]pirrelaxed value at cell i
[out]piprrelaxed reconstructed value at cell i

◆ cs_b_upwind_flux()

CS_F_HOST_DEVICE void cs_b_upwind_flux ( const int iconvp,
const cs_real_t thetap,
const int imasac,
const int inc,
const int bc_type,
const cs_real_t pi,
const cs_real_t pir,
const cs_real_t pipr,
const cs_real_t coefap,
const cs_real_t coefbp,
const cs_real_t b_massflux,
const cs_real_t xcpp,
cs_real_t * flux )
inlinestatic

Add convective flux (substracting the mass accumulation from it) to flux at boundary face. The convective flux is a pure upwind flux.

Parameters
[in]iconvpconvection flag
[in]thetapweighting coefficient for the theta-scheme,
[in]imasactake mass accumulation into account?
[in]incNot an increment flag
[in]bc_typetype of boundary face
[in]pivalue at cell i
[in]pirrelaxed value at cell i
[in]piprrelaxed reconstructed value at cell i
[in]coefapexplicit boundary coefficient for convection operator
[in]coefbpimplicit boundary coefficient for convection operator
[in]b_massfluxmass flux at boundary face
[in]xcppspecific heat value if the scalar is the temperature, 1 otherwise
[in,out]fluxflux at boundary face

◆ cs_b_upwind_flux_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_b_upwind_flux_strided ( int iconvp,
cs_real_t thetap,
int imasac,
int bc_type,
const cs_real_t pi[stride],
const cs_real_t pir[stride],
const cs_real_t b_massflux,
const cs_real_t pfac[stride],
cs_real_t flux[stride] )
inlinestatic

Add convective flux (substracting the mass accumulation from it) to flux at boundary face. The convective flux is a pure upwind flux.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]iconvpconvection flag
[in]thetapweighting coefficient for the theta-scheme,
[in]imasactake mass accumulation into account?
[in]bc_typetype of boundary face
[in]pivalue at cell i
[in]pirrelaxed value at cell i
[in]b_massfluxmass flux at boundary face
[out]pfaccontribution from BCs
[in,out]fluxflux at boundary face

◆ cs_blend_f_val()

CS_F_HOST_DEVICE void cs_blend_f_val ( const double blencp,
const cs_real_t p,
cs_real_t * pf )
inlinestatic

Blend face values for a centered or SOLU scheme with face values for an upwind scheme.

Parameters
[in]blencpproportion of second order scheme, (1-blencp) is the proportion of upwind.
[in]p(relaxed) value at cell
[out]pfface value

◆ cs_blend_f_val_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_blend_f_val_strided ( const double blencp,
const cs_real_t p[stride],
cs_real_t pf[stride] )
inlinestatic

Blend face values for a centered or SOLU scheme with face values for an upwind scheme.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]blencpproportion of second order scheme, (1-blencp) is the proportion of upwind.
[in]p(relaxed) value at cell
[out]pfface value

◆ cs_centered_f_val()

CS_F_HOST_DEVICE void cs_centered_f_val ( double pnd,
cs_real_t pip,
cs_real_t pjp,
cs_real_t * pf )
inlinestatic

Prepare value at face ij by using a centered scheme.

Parameters
[in]pndweight
[in]pip(relaxed) reconstructed value at cell i
[in]pjp(relaxed) reconstructed value at cell j
[out]pfface value

◆ cs_centered_f_val_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_centered_f_val_strided ( double pnd,
const cs_real_t pip[stride],
const cs_real_t pjp[stride],
cs_real_t pf[stride] )
inlinestatic

Prepare value at face ij by using a centered scheme.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]pndweight
[in]pip(relaxed) reconstructed value at cell i
[in]pjp(relaxed) reconstructed value at cell j
[out]pfface value

◆ cs_central_downwind_cells()

CS_F_HOST_DEVICE void cs_central_downwind_cells ( const cs_lnum_t ii,
const cs_lnum_t jj,
const cs_real_t i_massflux,
cs_lnum_t * ic,
cs_lnum_t * id )
inlinestatic

Determine the upwind and downwind sides of an internal face and matching cell indices.

Parameters
[in]iiindex of cell (0)
[in]jjindex of cell (1)
[in]i_massfluxmass flux at face ij
[out]icindex of central cell (upwind w.r.t. the face)
[out]idindex of downwind cell

◆ cs_i_cd_steady()

CS_F_HOST_DEVICE void cs_i_cd_steady ( const cs_real_t bldfrp,
const int ischcp,
const double relaxp,
const double blencp,
const cs_real_t weight,
const cs_real_t cell_ceni[3],
const cs_real_t cell_cenj[3],
const cs_real_t i_face_cog[3],
const cs_rreal_t diipf[3],
const cs_rreal_t djjpf[3],
const cs_real_t gradi[3],
const cs_real_t gradj[3],
const cs_real_t gradupi[3],
const cs_real_t gradupj[3],
const cs_real_t pi,
const cs_real_t pj,
const cs_real_t pia,
const cs_real_t pja,
cs_real_t * pifri,
cs_real_t * pifrj,
cs_real_t * pjfri,
cs_real_t * pjfrj,
cs_real_t * pip,
cs_real_t * pjp,
cs_real_t * pipr,
cs_real_t * pjpr )
inlinestatic

Handle preparation of internal face values for the fluxes computation in case of a steady algorithm and without enabling slope tests.

Parameters
[in]bldfrpreconstruction blending factor
[in]ischcpsecond order convection scheme flag
[in]relaxprelaxation coefficient
[in]blencpproportion of second order scheme, (1-blencp) is the proportion of upwind.
[in]weightgeometrical weight
[in]cell_cenicenter of gravity coordinates of cell i
[in]cell_cenjcenter of gravity coordinates of cell i
[in]i_face_cogcenter of gravity coordinates of face ij
[in]diipfdistance II'
[in]djjpfdistance JJ'
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]gradupigradient upwind at cell i
[in]gradupjgradient upwind at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[in]piaold value at cell i
[in]pjaold value at cell j
[out]pifricontribution of i to flux from i to j
[out]pifrjcontribution of i to flux from j to i
[out]pjfricontribution of j to flux from i to j
[out]pjfrjcontribution of j to flux from j to i
[out]pipreconstructed value at cell i
[out]pjpreconstructed value at cell j
[out]piprrelaxed reconstructed value at cell i
[out]pjprrelaxed reconstructed value at cell j

◆ cs_i_cd_steady_slope_test()

CS_F_HOST_DEVICE void cs_i_cd_steady_slope_test ( bool * upwind_switch,
const int iconvp,
const cs_real_t bldfrp,
const int ischcp,
const double relaxp,
const double blencp,
const double blend_st,
const cs_real_t weight,
const cs_real_t i_dist,
const cs_real_t cell_ceni[3],
const cs_real_t cell_cenj[3],
const cs_nreal_t i_face_u_normal[3],
const cs_real_t i_face_cog[3],
const cs_rreal_t diipf[3],
const cs_rreal_t djjpf[3],
const cs_real_t i_massflux,
const cs_real_t gradi[3],
const cs_real_t gradj[3],
const cs_real_t gradupi[3],
const cs_real_t gradupj[3],
const cs_real_t gradsti[3],
const cs_real_t gradstj[3],
const cs_real_t pi,
const cs_real_t pj,
const cs_real_t pia,
const cs_real_t pja,
cs_real_t * pifri,
cs_real_t * pifrj,
cs_real_t * pjfri,
cs_real_t * pjfrj,
cs_real_t * pip,
cs_real_t * pjp,
cs_real_t * pipr,
cs_real_t * pjpr )
inlinestatic

Handle preparation of internal face values for the fluxes computation in case of a steady algorithm and using slope tests.

Parameters
[out]upwind_switchslope test result
[in]iconvpconvection flag
[in]bldfrpreconstruction blending factor
[in]ischcpsecond order convection scheme flag
[in]relaxprelaxation coefficient
[in]blencpproportion of second order scheme, (1-blencp) is the proportion of upwind.
[in]blend_stproportion of centered or SOLU scheme, when the slope test is activated (1-blend_st) is the proportion of upwind.
[in]weightgeometrical weight
[in]i_distdistance IJ.Nij
[in]cell_cenicenter of gravity coordinates of cell i
[in]cell_cenjcenter of gravity coordinates of cell j
[in]i_face_u_normalface unit normal
[in]i_face_cogcenter of gravity coordinates of face ij
[in]diipfdistance II'
[in]djjpfdistance JJ'
[in]i_massfluxmass flux at face ij
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]gradupiupwind gradient at cell i
[in]gradupjupwind gradient at cell j
[in]gradstislope test gradient at cell i
[in]gradstjslope test gradient at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[in]piaold value at cell i
[in]pjaold value at cell j
[out]pifricontribution of i to flux from i to j
[out]pifrjcontribution of i to flux from j to i
[out]pjfricontribution of j to flux from i to j
[out]pjfrjcontribution of j to flux from j to i
[out]pipreconstructed value at cell i
[out]pjpreconstructed value at cell j
[out]piprrelaxed reconstructed value at cell i
[out]pjprrelaxed reconstructed value at cell j

◆ cs_i_cd_steady_slope_test_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_i_cd_steady_slope_test_strided ( bool * upwind_switch,
int iconvp,
cs_real_t bldfrp,
int ischcp,
double relaxp,
double blencp,
double blend_st,
cs_real_t weight,
cs_real_t i_dist,
const cs_real_t cell_ceni[3],
const cs_real_t cell_cenj[3],
const cs_nreal_t i_face_u_normal[3],
const cs_real_t i_face_cog[3],
const cs_rreal_t diipf[3],
const cs_rreal_t djjpf[3],
cs_real_t i_massflux,
const cs_real_t gradi[stride][3],
const cs_real_t gradj[stride][3],
const cs_real_t grdpai[stride][3],
const cs_real_t grdpaj[stride][3],
const cs_real_t pi[stride],
const cs_real_t pj[stride],
const cs_real_t pia[stride],
const cs_real_t pja[stride],
cs_real_t pifri[stride],
cs_real_t pifrj[stride],
cs_real_t pjfri[stride],
cs_real_t pjfrj[stride],
cs_real_t pip[stride],
cs_real_t pjp[stride],
cs_real_t pipr[stride],
cs_real_t pjpr[stride] )
inlinestatic

Handle preparation of internal face values for the fluxes computation in case of a steady algorithm and using slope tests.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[out]upwind_switchslope test result
[in]iconvpconvection flag
[in]bldfrpreconstruction blending factor
[in]ischcpsecond order convection scheme flag
[in]relaxprelaxation coefficient
[in]blencpproportion of second order scheme, (1-blencp) is the proportion of upwind.
[in]blend_stproportion of centered or SOLU scheme, when the slope test is activated (1-blend_st) is the proportion of upwind.
[in]weightgeometrical weight
[in]i_distdistance IJ.Nij
[in]cell_cenicenter of gravity coordinates of cell i
[in]cell_cenjcenter of gravity coordinates of cell i
[in]i_face_u_normalface unit normal
[in]i_face_cogcenter of gravity coordinates of face ij
[in]diipfdistance II'
[in]djjpfdistance JJ'
[in]i_massfluxmass flux at face ij
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]grdpaiupwind gradient at cell i
[in]grdpajupwind gradient at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[in]piaold value at cell i
[in]pjaold value at cell j
[out]pifricontribution of i to flux from i to j
[out]pifrjcontribution of i to flux from j to i
[out]pjfricontribution of j to flux from i to j
[out]pjfrjcontribution of j to flux from j to i
[out]pipreconstructed value at cell i
[out]pjpreconstructed value at cell j
[out]piprrelaxed reconstructed value at cell i
[out]pjprrelaxed reconstructed value at cell j

◆ cs_i_cd_steady_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_i_cd_steady_strided ( cs_real_t bldfrp,
int ischcp,
double relaxp,
double blencp,
cs_real_t weight,
const cs_real_t cell_ceni[3],
const cs_real_t cell_cenj[3],
const cs_real_t i_face_cog[3],
const cs_rreal_t diipf[3],
const cs_rreal_t djjpf[3],
const cs_real_t gradi[stride][3],
const cs_real_t gradj[stride][3],
const cs_real_t pi[stride],
const cs_real_t pj[stride],
const cs_real_t pia[stride],
const cs_real_t pja[stride],
cs_real_t pifri[stride],
cs_real_t pifrj[stride],
cs_real_t pjfri[stride],
cs_real_t pjfrj[stride],
cs_real_t pip[stride],
cs_real_t pjp[stride],
cs_real_t pipr[stride],
cs_real_t pjpr[stride] )
inlinestatic

Handle preparation of internal face values for the fluxes computation in case of a steady algorithm and without enabling slope tests.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]bldfrpreconstruction blending factor
[in]ischcpsecond order convection scheme flag
[in]relaxprelaxation coefficient
[in]blencpproportion of second order scheme, (1-blencp) is the proportion of upwind.
[in]weightgeometrical weight
[in]cell_cenicenter of gravity coordinates of cell i
[in]cell_cenjcenter of gravity coordinates of cell i
[in]i_face_cogcenter of gravity coordinates of face ij
[in]diipfdistance II'
[in]djjpfdistance JJ'
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[in]piaold value at cell i
[in]pjaold value at cell j
[out]pifricontribution of i to flux from i to j
[out]pifrjcontribution of i to flux from j to i
[out]pjfricontribution of j to flux from i to j
[out]pjfrjcontribution of j to flux from j to i
[out]pipreconstructed value at cell i
[out]pjpreconstructed value at cell j
[out]piprrelaxed reconstructed value at cell i
[out]pjprrelaxed reconstructed value at cell j

◆ cs_i_cd_steady_upwind()

CS_F_HOST_DEVICE void cs_i_cd_steady_upwind ( const cs_real_t bldfrp,
const cs_real_t relaxp,
const cs_rreal_t diipf[3],
const cs_rreal_t djjpf[3],
const cs_real_t gradi[3],
const cs_real_t gradj[3],
const cs_real_t pi,
const cs_real_t pj,
const cs_real_t pia,
const cs_real_t pja,
cs_real_t * pifri,
cs_real_t * pifrj,
cs_real_t * pjfri,
cs_real_t * pjfrj,
cs_real_t * pip,
cs_real_t * pjp,
cs_real_t * pipr,
cs_real_t * pjpr )
inlinestatic

Handle preparation of internal face values for the fluxes computation in case of a steady algorithm and a pure upwind flux.

Parameters
[in]bldfrpreconstruction blending factor
[in]relaxprelaxation coefficient
[in]diipfdistance II'
[in]djjpfdistance JJ'
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[in]piaold value at cell i
[in]pjaold value at cell j
[out]pifricontribution of i to flux from i to j
[out]pifrjcontribution of i to flux from j to i
[out]pjfricontribution of j to flux from i to j
[out]pjfrjcontribution of j to flux from j to i
[out]pipreconstructed value at cell i
[out]pjpreconstructed value at cell j
[out]piprrelaxed reconstructed value at cell i
[out]pjprrelaxed reconstructed value at cell j

◆ cs_i_cd_steady_upwind_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_i_cd_steady_upwind_strided ( const cs_real_t bldfrp,
const cs_real_t relaxp,
const cs_rreal_t diipf[3],
const cs_rreal_t djjpf[3],
const cs_real_t gradi[stride][3],
const cs_real_t gradj[stride][3],
const cs_real_t pi[stride],
const cs_real_t pj[stride],
const cs_real_t pia[stride],
const cs_real_t pja[stride],
cs_real_t pifri[stride],
cs_real_t pifrj[stride],
cs_real_t pjfri[stride],
cs_real_t pjfrj[stride],
cs_real_t pip[stride],
cs_real_t pjp[stride],
cs_real_t pipr[stride],
cs_real_t pjpr[stride] )
inlinestatic

Handle preparation of internal face values for the fluxes computation in case of a steady algorithm and a pure upwind flux.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]bldfrpreconstruction blending factor
[in]relaxprelaxation coefficient
[in]diipfdistance II'
[in]djjpfdistance JJ'
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[in]piaold value at cell i
[in]pjaold value at cell j
[out]pifricontribution of i to flux from i to j
[out]pifrjcontribution of i to flux from j to i
[out]pjfricontribution of j to flux from i to j
[out]pjfrjcontribution of j to flux from j to i
[out]pipreconstructed value at cell i
[out]pjpreconstructed value at cell j
[out]piprrelaxed reconstructed value at cell i
[out]pjprrelaxed reconstructed value at cell j

◆ cs_i_cd_unsteady()

CS_F_HOST_DEVICE void cs_i_cd_unsteady ( const cs_real_t bldfrp,
const int ischcp,
const double blencp,
const cs_real_t weight,
const cs_real_3_t cell_ceni,
const cs_real_3_t cell_cenj,
const cs_real_3_t i_face_cog,
const cs_real_t hybrid_blend_i,
const cs_real_t hybrid_blend_j,
const cs_rreal_3_t diipf,
const cs_rreal_3_t djjpf,
const cs_real_3_t gradi,
const cs_real_3_t gradj,
const cs_real_3_t gradupi,
const cs_real_3_t gradupj,
const cs_real_t pi,
const cs_real_t pj,
cs_real_t * pif,
cs_real_t * pjf,
cs_real_t * pip,
cs_real_t * pjp )
inlinestatic

Handle preparation of internal face values for the fluxes computation in case of a unsteady algorithm and without enabling slope tests.

Parameters
[in]bldfrpreconstruction blending factor
[in]ischcpsecond order convection scheme flag
[in]blencpproportion of second order scheme, (1-blencp) is the proportion of upwind.
[in]weightgeometrical weight
[in]cell_cenicenter of gravity coordinates of cell i
[in]cell_cenjcenter of gravity coordinates of cell i
[in]i_face_cogcenter of gravity coordinates of face ij
[in]hybrid_blend_iblending factor between SOLU and centered
[in]hybrid_blend_jblending factor between SOLU and centered
[in]diipfdistance II'
[in]djjpfdistance JJ'
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]gradupiupwind gradient at cell i
[in]gradupjupwind gradient at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[out]pifcontribution of i to flux from i to j
[out]pjfcontribution of j to flux from i to j
[out]pipreconstructed value at cell i
[out]pjpreconstructed value at cell j

◆ cs_i_cd_unsteady_nvd()

CS_F_HOST_DEVICE void cs_i_cd_unsteady_nvd ( const cs_nvd_type_t limiter,
const double beta,
const cs_real_3_t cell_cen_c,
const cs_real_3_t cell_cen_d,
const cs_nreal_3_t i_face_u_normal,
const cs_real_3_t i_face_cog,
const cs_real_3_t gradv_c,
const cs_real_t p_c,
const cs_real_t p_d,
const cs_real_t local_max_c,
const cs_real_t local_min_c,
const cs_real_t courant_c,
cs_real_t * pif,
cs_real_t * pjf )
inlinestatic

Handle preparation of internal face values for the convection flux computation in case of an unsteady algorithm and using NVD schemes.

Parameters
[in]limiterchoice of the NVD scheme
[in]betaproportion of second order scheme, (1-blencp) is the proportion of upwind.
[in]cell_cen_ccenter of gravity coordinates of central cell
[in]cell_cen_dcenter of gravity coordinates of downwind cell
[in]i_face_u_normalunit normal of face ij
[in]i_face_cogcenter of gravity coordinates of face ij
[in]gradv_cgradient at central cell
[in]p_cvalue at central cell
[in]p_dvalue at downwind cell
[in]local_max_clocal maximum of variable
[in]local_min_clocal minimum of variable
[in]courant_ccentral cell Courant number
[out]pifcontribution of i to flux from i to j
[out]pjfcontribution of j to flux from i to j

◆ cs_i_cd_unsteady_slope_test()

CS_F_HOST_DEVICE void cs_i_cd_unsteady_slope_test ( bool * upwind_switch,
const int iconvp,
const cs_real_t bldfrp,
const int ischcp,
const double blencp,
const double blend_st,
const cs_real_t weight,
const cs_real_t i_dist,
const cs_real_3_t cell_ceni,
const cs_real_3_t cell_cenj,
const cs_nreal_3_t i_face_u_normal,
const cs_real_3_t i_face_cog,
const cs_rreal_3_t diipf,
const cs_rreal_3_t djjpf,
const cs_real_t i_massflux,
const cs_real_3_t gradi,
const cs_real_3_t gradj,
const cs_real_3_t gradupi,
const cs_real_3_t gradupj,
const cs_real_3_t gradsti,
const cs_real_3_t gradstj,
const cs_real_t pi,
const cs_real_t pj,
cs_real_t * pif,
cs_real_t * pjf,
cs_real_t * pip,
cs_real_t * pjp )
inlinestatic

Handle preparation of internal face values for the fluxes computation in case of a steady algorithm and using slope tests.

Parameters
[out]upwind_switchslope test result
[in]iconvpconvection flag
[in]bldfrpreconstruction blending factor
[in]ischcpsecond order convection scheme flag
[in]blencpproportion of second order scheme, (1-blencp) is the proportion of upwind.
[in]blend_stproportion of centered or SOLU scheme, when the slope test is activated (1-blend_st) is the proportion of upwind.
[in]weightgeometrical weight
[in]i_distdistance IJ.Nij
[in]cell_cenicenter of gravity coordinates of cell i
[in]cell_cenjcenter of gravity coordinates of cell i
[in]i_face_u_normalface unit normal
[in]i_face_cogcenter of gravity coordinates of face ij
[in]diipfdistance II'
[in]djjpfdistance JJ'
[in]i_massfluxmass flux at face ij
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]gradupiupwind gradient at cell i
[in]gradupjupwind gradient at cell j
[in]gradstislope test gradient at cell i
[in]gradstjslope test gradient at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[out]pifcontribution of i to flux from i to j
[out]pjfcontribution of j to flux from i to j
[out]pipreconstructed value at cell i
[out]pjpreconstructed value at cell j

◆ cs_i_cd_unsteady_slope_test_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_i_cd_unsteady_slope_test_strided ( bool * upwind_switch,
int iconvp,
cs_real_t bldfrp,
int ischcp,
double blencp,
double blend_st,
cs_real_t weight,
cs_real_t i_dist,
const cs_real_t cell_ceni[3],
const cs_real_t cell_cenj[3],
const cs_nreal_t i_face_u_normal[3],
const cs_real_t i_face_cog[3],
const cs_rreal_t diipf[3],
const cs_rreal_t djjpf[3],
cs_real_t i_massflux,
const cs_real_t gradi[stride][3],
const cs_real_t gradj[stride][3],
const cs_real_t grdpai[stride][3],
const cs_real_t grdpaj[stride][3],
const cs_real_t pi[stride],
const cs_real_t pj[stride],
cs_real_t pif[stride],
cs_real_t pjf[stride],
cs_real_t pip[stride],
cs_real_t pjp[stride] )
inlinestatic

Handle preparation of internal face values for the fluxes computation in case of a unsteady algorithm and using slope tests.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[out]upwind_switchslope test result
[in]iconvpconvection flag
[in]bldfrpreconstruction blending factor
[in]ischcpsecond order convection scheme flag
[in]blencpproportion of second order scheme, (1-blencp) is the proportion of upwind.
[in]blend_stproportion of centered or SOLU scheme, when the slope test is activated (1-blend_st) is the proportion of upwind.
[in]weightgeometrical weight
[in]i_distdistance IJ.Nij
[in]cell_cenicenter of gravity coordinates of cell i
[in]cell_cenjcenter of gravity coordinates of cell i
[in]i_face_u_normalface normal
[in]i_face_cogcenter of gravity coordinates of face ij
[in]diipfdistance II'
[in]djjpfdistance JJ'
[in]i_massfluxmass flux at face ij
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]grdpaiupwind gradient at cell i
[in]grdpajupwind gradient at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[out]pifcontribution of i to flux from i to j
[out]pjfcontribution of j to flux from i to j
[out]pipreconstructed value at cell i
[out]pjpreconstructed value at cell j

◆ cs_i_cd_unsteady_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_i_cd_unsteady_strided ( cs_real_t bldfrp,
int ischcp,
double blencp,
cs_real_t weight,
const cs_real_t cell_ceni[3],
const cs_real_t cell_cenj[3],
const cs_real_t i_face_cog[3],
const cs_real_t hybrid_blend_i,
const cs_real_t hybrid_blend_j,
const cs_rreal_t diipf[3],
const cs_rreal_t djjpf[3],
const cs_real_t gradi[stride][3],
const cs_real_t gradj[stride][3],
const cs_real_t pi[stride],
const cs_real_t pj[stride],
cs_real_t pif[stride],
cs_real_t pjf[stride],
cs_real_t pip[stride],
cs_real_t pjp[stride] )
inlinestatic

Handle preparation of internal face values for the fluxes computation in case of an unsteady algorithm and without enabling slope tests.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]bldfrpreconstruction blending factor
[in]ischcpsecond order convection scheme flag
[in]blencpproportion of second order scheme, (1-blencp) is the proportion of upwind.
[in]weightgeometrical weight
[in]cell_cenicenter of gravity coordinates of cell i
[in]cell_cenjcenter of gravity coordinates of cell i
[in]i_face_cogcenter of gravity coordinates of face ij
[in]hybrid_blend_iblending factor between SOLU and centered
[in]hybrid_blend_jblending factor between SOLU and centered
[in]diipfdistance II'
[in]djjpfdistance JJ'
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[out]pifcontribution of i to flux from i to j
[out]pjfcontribution of j to flux from i to j
[out]pipreconstructed value at cell i
[out]pjpreconstructed value at cell j

◆ cs_i_cd_unsteady_upwind()

CS_F_HOST_DEVICE void cs_i_cd_unsteady_upwind ( const cs_real_t bldfrp,
const cs_rreal_t diipf[3],
const cs_rreal_t djjpf[3],
const cs_real_t gradi[3],
const cs_real_t gradj[3],
const cs_real_t pi,
const cs_real_t pj,
cs_real_t * pif,
cs_real_t * pjf,
cs_real_t * pip,
cs_real_t * pjp )
inlinestatic

Handle preparation of internal face values for the fluxes computation in case of an unsteady algorithm and a pure upwind flux.

Parameters
[in]bldfrpreconstruction blending factor
[in]diipfdistance II'
[in]djjpfdistance JJ'
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[out]pifcontribution of i to flux from i to j
[out]pjfcontribution of j to flux from i to j
[out]pipreconstructed value at cell i
[out]pjpreconstructed value at cell j

◆ cs_i_cd_unsteady_upwind_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_i_cd_unsteady_upwind_strided ( const cs_real_t bldfrp,
const cs_rreal_t diipf[3],
const cs_rreal_t djjpf[3],
const cs_real_t gradi[stride][3],
const cs_real_t gradj[stride][3],
const cs_real_t pi[stride],
const cs_real_t pj[stride],
cs_real_t pif[stride],
cs_real_t pjf[stride],
cs_real_t pip[stride],
cs_real_t pjp[stride] )
inlinestatic

Handle preparation of internal face values for the fluxes computation in case of an unsteady algorithm and a pure upwind flux.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]bldfrpreconstruction blending factor
[in]diipfdistance II'
[in]djjpfdistance JJ'
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[out]pifcontribution of i to flux from i to j
[out]pjfcontribution of j to flux from i to j
[out]pipreconstructed value at cell i
[out]pjpreconstructed value at cell j

◆ cs_i_compute_quantities()

CS_F_HOST_DEVICE void cs_i_compute_quantities ( const cs_real_t bldfrp,
const cs_rreal_3_t diipf,
const cs_rreal_3_t djjpf,
const cs_real_3_t gradi,
const cs_real_3_t gradj,
const cs_real_t pi,
const cs_real_t pj,
cs_real_t * recoi,
cs_real_t * recoj,
cs_real_t * pip,
cs_real_t * pjp )
inlinestatic

Reconstruct values in I' and J'.

Parameters
[in]bldfrpreconstruction blending factor
[in]diipfdistance II'
[in]djjpfdistance JJ'
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[out]recoireconstruction at cell i
[out]recojreconstruction at cell j
[out]pipreconstructed value at cell i
[out]pjpreconstructed value at cell j

◆ cs_i_compute_quantities_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_i_compute_quantities_strided ( const cs_real_t bldfrp,
const cs_rreal_t diipf[3],
const cs_rreal_t djjpf[3],
const cs_real_t gradi[stride][3],
const cs_real_t gradj[stride][3],
const cs_real_t pi[stride],
const cs_real_t pj[stride],
cs_real_t recoi[stride],
cs_real_t recoj[stride],
cs_real_t pip[stride],
cs_real_t pjp[stride] )
inlinestatic

Reconstruct values in I' and J'.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]bldfrpreconstruction blending factor
[in]diipfdistance II'
[in]djjpfdistance JJ'
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[out]recoireconstruction at cell i
[out]recojreconstruction at cell j
[out]pipreconstructed value at cell i
[out]pjpreconstructed value at cell j

◆ cs_i_conv_flux()

CS_F_HOST_DEVICE void cs_i_conv_flux ( const int iconvp,
const cs_real_t thetap,
const int imasac,
const cs_real_t pi,
const cs_real_t pj,
const cs_real_t pifri,
const cs_real_t pifrj,
const cs_real_t pjfri,
const cs_real_t pjfrj,
const cs_real_t i_massflux,
const cs_real_t xcppi,
const cs_real_t xcppj,
cs_real_2_t fluxij )
inlinestatic

Add convective fluxes (substracting the mass accumulation from them) to fluxes at face ij.

Parameters
[in]iconvpconvection flag
[in]thetapweighting coefficient for the theta-scheme,
[in]imasactake mass accumulation into account?
[in]pivalue at cell i
[in]pjvalue at cell j
[in]pifricontribution of i to flux from i to j
[in]pifrjcontribution of i to flux from j to i
[in]pjfricontribution of j to flux from i to j
[in]pjfrjcontribution of j to flux from j to i
[in]i_massfluxmass flux at face ij
[in]xcppispecific heat value if the scalar is the temperature, 1 otherwise at cell i
[in]xcppjspecific heat value if the scalar is the temperature, 1 otherwise at cell j
[in,out]fluxijfluxes at face ij

◆ cs_i_conv_flux_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_i_conv_flux_strided ( int iconvp,
cs_real_t thetap,
int imasac,
const cs_real_t pi[stride],
const cs_real_t pj[stride],
const cs_real_t pifri[stride],
const cs_real_t pifrj[stride],
const cs_real_t pjfri[stride],
const cs_real_t pjfrj[stride],
cs_real_t i_massflux,
cs_real_t fluxi[stride],
cs_real_t fluxj[stride] )
inlinestatic

Add convective fluxes (substracting the mass accumulation from them) to fluxes at face ij.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]iconvpconvection flag
[in]thetapweighting coefficient for the theta-scheme,
[in]imasactake mass accumulation into account?
[in]pivalue at cell i
[in]pjvalue at cell j
[out]pifricontribution of i to flux from i to j
[out]pifrjcontribution of i to flux from j to i
[out]pjfricontribution of j to flux from i to j
[out]pjfrjcontribution of j to flux from j to i
[in]i_massfluxmass flux at face ij
[in,out]fluxifluxes at face i
[in,out]fluxjfluxes at face j

◆ cs_i_diff_flux()

CS_F_HOST_DEVICE void cs_i_diff_flux ( const int idiffp,
const cs_real_t thetap,
const cs_real_t pip,
const cs_real_t pjp,
const cs_real_t pipr,
const cs_real_t pjpr,
const cs_real_t i_visc,
cs_real_t fluxij[2] )
inlinestatic

Add diffusive fluxes to fluxes at face ij.

Parameters
[in]idiffpdiffusion flag
[in]thetapweighting coefficient for the theta-scheme,
[in]pipreconstructed value at cell i
[in]pjpreconstructed value at cell j
[in]piprrelaxed reconstructed value at cell i
[in]pjprrelaxed reconstructed value at cell j
[in]i_viscdiffusion coefficient (divided by IJ) at face ij
[in,out]fluxijfluxes at face ij

◆ cs_i_diff_flux_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_i_diff_flux_strided ( int idiffp,
cs_real_t thetap,
const cs_real_t pip[stride],
const cs_real_t pjp[stride],
const cs_real_t pipr[stride],
const cs_real_t pjpr[stride],
const cs_real_t i_visc,
cs_real_t fluxi[stride],
cs_real_t fluxj[stride] )
inlinestatic

Add diffusive fluxes to fluxes at face ij.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]idiffpdiffusion flag
[in]thetapweighting coefficient for the theta-scheme,
[in]pipreconstructed value at cell i
[in]pjpreconstructed value at cell j
[in]piprrelaxed reconstructed value at cell i
[in]pjprrelaxed reconstructed value at cell j
[in]i_viscdiffusion coefficient (divided by IJ) at face ij
[in,out]fluxifluxes at face i
[in,out]fluxjfluxes at face j

◆ cs_i_relax_c_val()

CS_F_HOST_DEVICE void cs_i_relax_c_val ( const double relaxp,
const cs_real_t pia,
const cs_real_t pja,
const cs_real_t recoi,
const cs_real_t recoj,
const cs_real_t pi,
const cs_real_t pj,
cs_real_t * pir,
cs_real_t * pjr,
cs_real_t * pipr,
cs_real_t * pjpr )
inlinestatic

Compute relaxed values at cell i and j.

Parameters
[in]relaxprelaxation coefficient
[in]piaold value at cell i
[in]pjaold value at cell j
[in]recoireconstruction at cell i
[in]recojreconstruction at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[out]pirrelaxed value at cell i
[out]pjrrelaxed value at cell j
[out]piprrelaxed reconstructed value at cell i
[out]pjprrelaxed reconstructed value at cell j

◆ cs_i_relax_c_val_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_i_relax_c_val_strided ( cs_real_t relaxp,
const cs_real_t pia[stride],
const cs_real_t pja[stride],
const cs_real_t recoi[stride],
const cs_real_t recoj[stride],
const cs_real_t pi[stride],
const cs_real_t pj[stride],
cs_real_t pir[stride],
cs_real_t pjr[stride],
cs_real_t pipr[stride],
cs_real_t pjpr[stride] )
inlinestatic

Compute relaxed values at cell i and j.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]relaxprelaxation coefficient
[in]piaold value at cell i
[in]pjaold value at cell j
[in]recoireconstruction at cell i
[in]recojreconstruction at cell j
[in]pivalue at cell i
[in]pjvalue at cell j
[out]pirrelaxed value at cell i
[out]pjrrelaxed value at cell j
[out]piprrelaxed reconstructed value at cell i
[out]pjprrelaxed reconstructed value at cell j

◆ cs_nvd_scheme_scalar()

CS_F_HOST_DEVICE cs_real_t cs_nvd_scheme_scalar ( const cs_nvd_type_t limiter,
const cs_real_t nvf_p_c,
const cs_real_t nvf_r_f,
const cs_real_t nvf_r_c )
inlinestatic

Compute the normalized face scalar using the specified NVD scheme.

Parameters
[in]limiterchoice of the NVD scheme
[in]nvf_p_cnormalised property of the current cell
[in]nvf_r_fnormalised distance from the face
[in]nvf_r_cnormalised distance from the current cell
Returns
normalised face scalar value

◆ cs_nvd_vof_scheme_scalar()

CS_F_HOST_DEVICE cs_real_t cs_nvd_vof_scheme_scalar ( cs_nvd_type_t limiter,
const cs_nreal_t i_face_u_normal[3],
cs_real_t nvf_p_c,
cs_real_t nvf_r_f,
cs_real_t nvf_r_c,
const cs_real_t gradv_c[3],
const cs_real_t c_courant )
inlinestatic

Compute the normalised face scalar using the specified NVD scheme for the case of a Volume-of-Fluid (VOF) transport equation.

Parameters
[in]limiterchoice of the NVD scheme
[in]i_face_u_normalunit normal of face ij
[in]nvf_p_cnormalised property of the current cell
[in]nvf_r_fnormalised distance from the face
[in]nvf_r_cnormalised distance from the current cell
[in]gradv_cgradient at central cell
[in]c_courantcourant at central cell
Returns
normalised face scalar

◆ cs_slope_test()

CS_F_HOST_DEVICE void cs_slope_test ( const cs_real_t pi,
const cs_real_t pj,
const cs_real_t distf,
const cs_nreal_t i_face_u_normal[3],
const cs_real_t gradi[3],
const cs_real_t gradj[3],
const cs_real_t grdpai[3],
const cs_real_t grdpaj[3],
const cs_real_t i_massflux,
cs_real_t * testij,
cs_real_t * tesqck )
inlinestatic

Compute slope test criteria at internal face between cell i and j.

Parameters
[in]pivalue at cell i
[in]pjvalue at cell j
[in]distfdistance IJ.Nij
[in]i_face_u_normalface unit normal
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]grdpaiupwind gradient at cell i
[in]grdpajupwind gradient at cell j
[in]i_massfluxmass flux at face (from i to j)
[out]testijvalue of slope test first criterion
[out]tesqckvalue of slope test second criterion

◆ cs_slope_test_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_slope_test_strided ( const cs_real_t pi[stride],
const cs_real_t pj[stride],
const cs_real_t distf,
const cs_nreal_t i_face_u_normal[3],
const cs_real_t gradi[stride][3],
const cs_real_t gradj[stride][3],
const cs_real_t gradsti[stride][3],
const cs_real_t gradstj[stride][3],
const cs_real_t i_massflux,
cs_real_t * testij,
cs_real_t * tesqck )
inlinestatic

Compute slope test criteria at internal face between cell i and j.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]pivalue at cell i
[in]pjvalue at cell j
[in]distfdistance IJ.Nij
[in]i_face_u_normalface unit normal
[in]gradigradient at cell i
[in]gradjgradient at cell j
[in]gradstiupwind gradient at cell i
[in]gradstjupwind gradient at cell j
[in]i_massfluxmass flux at face (from i to j)
[out]testijvalue of slope test first criterion
[out]tesqckvalue of slope test second criterion

◆ cs_solu_f_val()

CS_F_HOST_DEVICE void cs_solu_f_val ( const cs_real_t cell_cen[3],
const cs_real_t i_face_cog[3],
const cs_real_t grad[3],
const cs_real_t p,
cs_real_t * pf )
inlinestatic

Prepare value at face ij by using a Second Order Linear Upwind scheme.

Parameters
[in]cell_cencenter of gravity coordinates of cell
[in]i_face_cogcenter of gravity coordinates of face
[in]gradgradient at cell
[in]p(relaced) value at cell
[out]pfface value

◆ cs_solu_f_val_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_solu_f_val_strided ( const cs_real_t cell_cen[3],
const cs_real_t i_face_cog[3],
const cs_real_t grad[stride][3],
const cs_real_t p[stride],
cs_real_t pf[stride] )
inlinestatic

Prepare value at face ij by using a Second Order Linear Upwind scheme.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]cell_cencenter of gravity coordinates of cell
[in]i_face_cogcenter of gravity coordinates of face
[in]gradgradient at cell
[in]p(relaced) value at cell
[out]pfface value

◆ cs_sync_scalar_halo()

void cs_sync_scalar_halo ( const cs_mesh_t * m,
cs_halo_type_t halo_type,
cs_real_t pvar[] )
inlinestatic

◆ cs_upwind_f_val()

CS_F_HOST_DEVICE void cs_upwind_f_val ( const cs_real_t p,
cs_real_t * pf )
inlinestatic

Prepare value at face ij by using an upwind scheme.

Parameters
[in]pvalue at cell
[out]pfvalue at face

◆ cs_upwind_f_val_strided()

template<cs_lnum_t stride>
CS_F_HOST_DEVICE void cs_upwind_f_val_strided ( const cs_real_t p[stride],
cs_real_t pf[stride] )
inlinestatic

Prepare value at face ij by using an upwind scheme.

template parameters: stride 1 for scalars, 3 for vectors, 6 for symmetric tensors

Parameters
[in]pvalue at cell
[out]pfvalue at face