My Project
programmer's documentation
Functions | Variables
cs_matrix_building.h File Reference
#include "cs_base.h"
#include "cs_halo.h"
Include dependency graph for cs_matrix_building.h:

Go to the source code of this file.

Functions

void CS_PROCF (matrix, MATRIX)(const int *iconvp
 
void CS_PROCF (matrdt, MATRDT)(const cs_int_t *const iconvp
 
void cs_matrix_wrapper_scalar (int iconvp, int idiffp, int ndircp, int isym, double thetap, int imucpp, const cs_real_t coefbp[], const cs_real_t cofbfp[], const cs_real_t rovsdt[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], const cs_real_t xcpp[], cs_real_t da[], cs_real_t xa[])
 
void cs_matrix_wrapper_scalar_conv_diff (int iconvp, int idiffp, int ndircp, double thetap, int imucpp, const cs_real_t coefbp[], const cs_real_t cofbfp[], const cs_real_t rovsdt[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], const cs_real_t xcpp[], cs_real_t da[], cs_real_t xa[], cs_real_t da_conv[], cs_real_t xa_conv[], cs_real_t da_diff[], cs_real_t xa_diff[])
 
void cs_matrix_wrapper_vector (int iconvp, int idiffp, int tensorial_diffusion, int ndircp, int isym, int eb_size[4], double thetap, const cs_real_33_t coefbu[], const cs_real_33_t cofbfu[], const cs_real_33_t fimp[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_33_t da[], cs_real_t xa[])
 
void cs_matrix_wrapper_tensor (int iconvp, int idiffp, int tensorial_diffusion, int ndircp, int isym, double thetap, const cs_real_66_t coefbts[], const cs_real_66_t cofbfts[], const cs_real_66_t fimp[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_66_t da[], cs_real_t xa[])
 
void cs_sym_matrix_scalar (const cs_mesh_t *m, int idiffp, double thetap, const cs_real_t cofbfp[], const cs_real_t rovsdt[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_t *restrict da, cs_real_t *restrict xa)
 Build the diffusion matrix for a scalar field. (symmetric matrix). More...
 
void cs_sym_matrix_tensor (const cs_mesh_t *m, int idiffp, double thetap, const cs_real_66_t cofbfts[], const cs_real_66_t fimp[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_66_t *restrict da, cs_real_t *restrict xa)
 Build the diffusion matrix for a tensor field (symmetric matrix). More...
 
void cs_matrix_tensor (const cs_mesh_t *m, int iconvp, int idiffp, double thetap, const cs_real_66_t coefbts[], const cs_real_66_t cofbfts[], const cs_real_66_t fimp[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_66_t *restrict da, cs_real_2_t *restrict xa)
 Build the advection/diffusion matrix for a tensor field (non-symmetric matrix). More...
 
void cs_matrix_scalar (const cs_mesh_t *m, int iconvp, int idiffp, double thetap, int imucpp, const cs_real_t coefbp[], const cs_real_t cofbfp[], const cs_real_t rovsdt[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], const cs_real_t xcpp[], cs_real_t *restrict da, cs_real_2_t *restrict xa)
 Build the advection/diffusion matrix for a scalar field. More...
 
void cs_sym_matrix_vector (const cs_mesh_t *m, int idiffp, double thetap, const cs_real_33_t cofbfu[], const cs_real_33_t fimp[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_33_t *restrict da, cs_real_t *restrict xa)
 Build the diffusion matrix for a vector field (symmetric matrix). More...
 
void cs_matrix_vector (const cs_mesh_t *m, const cs_mesh_quantities_t *mq, int iconvp, int idiffp, int eb_size[4], double thetap, const cs_real_33_t coefbu[], const cs_real_33_t cofbfu[], const cs_real_33_t fimp[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_33_t *restrict da, cs_real_2_t *restrict xa)
 Build the advection/diffusion matrix for a vector field (non-symmetric matrix). More...
 
void cs_matrix_time_step (const cs_mesh_t *m, int iconvp, int idiffp, int isym, const cs_real_t coefbp[], const cs_real_t cofbfp[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_t *restrict da)
 Build the diagonal of the advection/diffusion matrix for determining the variable time step, flow, Fourier. More...
 
void cs_matrix_anisotropic_diffusion (const cs_mesh_t *m, const cs_mesh_quantities_t *mq, int iconvp, int idiffp, double thetap, const cs_real_33_t coefbu[], const cs_real_33_t cofbfu[], const cs_real_33_t fimp[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_33_t i_visc[], const cs_real_t b_visc[], cs_real_33_t *restrict da, cs_real_332_t *restrict xa)
 Build the advection/diffusion matrix for a vector field with a tensorial diffusivity. More...
 
void cs_matrix_anisotropic_diffusion_tensor (const cs_mesh_t *m, int iconvp, int idiffp, double thetap, const cs_real_66_t coefbu[], const cs_real_66_t cofbfu[], const cs_real_66_t fimp[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_66_t i_visc[], const cs_real_t b_visc[], cs_real_66_t *restrict da, cs_real_662_t *restrict xa)
 Build the advection/diffusion matrix for a tensor field with a tensorial diffusivity. More...
 
void cs_sym_matrix_anisotropic_diffusion (const cs_mesh_t *m, int idiffp, double thetap, const cs_real_33_t cofbfu[], const cs_real_33_t fimp[], const cs_real_33_t i_visc[], const cs_real_t b_visc[], cs_real_33_t *restrict da, cs_real_33_t *restrict xa)
 Build the diffusion matrix for a vector field with a tensorial diffusivity (symmetric matrix). More...
 
void cs_sym_matrix_anisotropic_diffusion_tensor (const cs_mesh_t *m, int idiffp, double thetap, const cs_real_66_t cofbfu[], const cs_real_66_t fimp[], const cs_real_66_t i_visc[], const cs_real_t b_visc[], cs_real_66_t *restrict da, cs_real_66_t *restrict xa)
 Build the diffusion matrix for a vector field with a tensorial diffusivity (symmetric matrix). More...
 

Variables

void const int * idiffp
 
void const int const int * ndircp
 
void const int const int const int * isym
 
void const int const int const int const cs_real_tthetap
 
void const int const int const int const cs_real_t const int * imucpp
 
void const int const int const int const cs_real_t const int const cs_real_t coefbp []
 
void const int const int const int const cs_real_t const int const cs_real_t const cs_real_t cofbfp []
 
void const int const int const int const cs_real_t const int const cs_real_t const cs_real_t const cs_real_t rovsdt []
 
void const int const int const int const cs_real_t const int const cs_real_t const cs_real_t const cs_real_t const cs_real_t i_massflux []
 
void const int const int const int const cs_real_t const int const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t b_massflux []
 
void const int const int const int const cs_real_t const int const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t i_visc []
 
void const int const int const int const cs_real_t const int const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t b_visc []
 
void const int const int const int const cs_real_t const int const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t xcpp []
 
void const int const int const int const cs_real_t const int const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t cs_real_t da []
 
void const int const int const int const cs_real_t const int const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t cs_real_t cs_real_t xa []
 

Function Documentation

◆ cs_matrix_anisotropic_diffusion()

void cs_matrix_anisotropic_diffusion ( const cs_mesh_t m,
const cs_mesh_quantities_t mq,
int  iconvp,
int  idiffp,
double  thetap,
const cs_real_33_t  coefbp[],
const cs_real_33_t  cofbfp[],
const cs_real_33_t  fimp[],
const cs_real_t  i_massflux[],
const cs_real_t  b_massflux[],
const cs_real_33_t  i_visc[],
const cs_real_t  b_visc[],
cs_real_33_t *restrict  da,
cs_real_332_t *restrict  xa 
)

Build the advection/diffusion matrix for a vector field with a tensorial diffusivity.

The advection is upwind, the diffusion is not reconstructed. The matrix is split into a diagonal block (3x3 times number of cells) and an extra diagonal part (of dimension 2 times 3x3 the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]mqpointer to mesh quantities structure
[in]iconvpindicator
  • 1 advection
  • 0 otherwise
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]coefbuboundary condition array for the variable (implicit part - 3x3 tensor array)
[in]cofbfuboundary condition array for the variable flux (implicit part - 3x3 tensor array)
[in]fimp
[in]i_massfluxmass flux at interior faces
[in]b_massfluxmass flux at border faces
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ \mu_\fib \dfrac{S_\fib}{\ipf \centf} $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

The advection is upwind, the diffusion is not reconstructed. The matrix is split into a diagonal block (3x3 times number of cells) and an extra diagonal part (of dimension 2 times 3x3 the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]mqpointer to mesh quantities structure
[in]iconvpindicator
  • 1 advection
  • 0 otherwise
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]coefbpboundary condition array for the variable (implicit part - 3x3 tensor array)
[in]cofbfpboundary condition array for the variable flux (implicit part - 3x3 tensor array)
[in]fimppart of the diagonal
[in]i_massfluxmass flux at interior faces
[in]b_massfluxmass flux at border faces
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ \mu_\fib \dfrac{S_\fib}{\ipf \centf} $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

◆ cs_matrix_anisotropic_diffusion_tensor()

void cs_matrix_anisotropic_diffusion_tensor ( const cs_mesh_t m,
int  iconvp,
int  idiffp,
double  thetap,
const cs_real_66_t  coefbp[],
const cs_real_66_t  cofbfp[],
const cs_real_66_t  fimp[],
const cs_real_t  i_massflux[],
const cs_real_t  b_massflux[],
const cs_real_66_t  i_visc[],
const cs_real_t  b_visc[],
cs_real_66_t *restrict  da,
cs_real_662_t *restrict  xa 
)

Build the advection/diffusion matrix for a tensor field with a tensorial diffusivity.

The advection is upwind, the diffusion is not reconstructed. The matrix is split into a diagonal block (3x3 times number of cells) and an extra diagonal part (of dimension 2 times 3x3 the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]iconvpindicator
  • 1 advection
  • 0 otherwise
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]coefbuboundary condition array for the variable (implicit part - 3x3 tensor array)
[in]cofbfuboundary condition array for the variable flux (implicit part - 3x3 tensor array)
[in]fimppart of the diagonal
[in]i_massfluxmass flux at interior faces
[in]b_massfluxmass flux at border faces
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ \mu_\fib \dfrac{S_\fib}{\ipf \centf} $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

The advection is upwind, the diffusion is not reconstructed. The matrix is split into a diagonal block (3x3 times number of cells) and an extra diagonal part (of dimension 2 times 3x3 the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]iconvpindicator
  • 1 advection
  • 0 otherwise
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]coefbpboundary condition array for the variable (implicit part - 3x3 tensor array)
[in]cofbfpboundary condition array for the variable flux (implicit part - 3x3 tensor array)
[in]fimppart of the diagonal
[in]i_massfluxmass flux at interior faces
[in]b_massfluxmass flux at border faces
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ \mu_\fib \dfrac{S_\fib}{\ipf \centf} $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

◆ cs_matrix_scalar()

void cs_matrix_scalar ( const cs_mesh_t m,
int  iconvp,
int  idiffp,
double  thetap,
int  imucpp,
const cs_real_t  coefbp[],
const cs_real_t  cofbfp[],
const cs_real_t  rovsdt[],
const cs_real_t  i_massflux[],
const cs_real_t  b_massflux[],
const cs_real_t  i_visc[],
const cs_real_t  b_visc[],
const cs_real_t  xcpp[],
cs_real_t *restrict  da,
cs_real_2_t *restrict  xa 
)

Build the advection/diffusion matrix for a scalar field.

The advection is upwind, the diffusion is not reconstructed. The matrix is split into a diagonal block (number of cells) and an extra diagonal part (of dimension 2 time the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]iconvpindicator
  • 1 advection
  • 0 otherwise
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]imucppindicator
  • 0 do not multiply the convective term by Cp
  • 1 do multiply the convective term by Cp
[in]coefbpboundary condition array for the variable (implicit part)
[in]cofbfpboundary condition array for the variable flux (implicit part)
[in]rovsdtworking array
[in]i_massfluxmass flux at interior faces
[in]b_massfluxmass flux at border faces
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ S_\fib $ at border faces for the matrix
[in]xcpparray of specific heat (Cp)
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

Build the advection/diffusion matrix for a scalar field.

The advection is upwind, the diffusion is not reconstructed. The matrix is split into a diagonal block (number of cells) and an extra diagonal part (of dimension 2 time the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]iconvpindicator
  • 1 advection
  • 0 otherwise
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]imucppindicator
  • 0 do not multiply the convective term by Cp
  • 1 do multiply the convective term by Cp
[in]coefbpboundary condition array for the variable (implicit part)
[in]cofbfpboundary condition array for the variable flux (implicit part)
[in]rovsdtworking array
[in]i_massfluxmass flux at interior faces
[in]b_massfluxmass flux at border faces
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ S_\fib $ at border faces for the matrix
[in]xcpparray of specific heat (Cp)
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

◆ cs_matrix_tensor()

void cs_matrix_tensor ( const cs_mesh_t m,
int  iconvp,
int  idiffp,
double  thetap,
const cs_real_66_t  coefbts[],
const cs_real_66_t  cofbfts[],
const cs_real_66_t  fimp[],
const cs_real_t  i_massflux[],
const cs_real_t  b_massflux[],
const cs_real_t  i_visc[],
const cs_real_t  b_visc[],
cs_real_66_t *restrict  da,
cs_real_2_t *restrict  xa 
)

Build the advection/diffusion matrix for a tensor field (non-symmetric matrix).

The advection is upwind, the diffusion is not reconstructed. The matrix is split into a diagonal block (6x6 times number of cells) and an extra diagonal part (of dimension 2 time the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]iconvpindicator
  • 1 advection
  • 0 otherwise
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]coefbtsboundary condition array for the variable (Implicit part - 6x6 tensor array)
[in]cofbftsboundary condition array for the variable flux (Implicit part - 6x6 tensor array)
[in]fimppart of the diagonal
[in]i_massfluxmass flux at interior faces
[in]b_massfluxmass flux at border faces
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ \mu_\fib \dfrac{S_\fib}{\ipf \centf} $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

◆ cs_matrix_time_step()

void cs_matrix_time_step ( const cs_mesh_t m,
int  iconvp,
int  idiffp,
int  isym,
const cs_real_t  coefbp[],
const cs_real_t  cofbfp[],
const cs_real_t  i_massflux[],
const cs_real_t  b_massflux[],
const cs_real_t  i_visc[],
const cs_real_t  b_visc[],
cs_real_t *restrict  da 
)

Build the diagonal of the advection/diffusion matrix for determining the variable time step, flow, Fourier.

Parameters
[in]mpointer to mesh structure
[in]iconvpindicator
  • 1 advection
  • 0 otherwise
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]isymindicator
  • 1 symmetric matrix
  • 2 non symmmetric matrix
[in]coefbpboundary condition array for the variable (implicit part)
[in]cofbfpboundary condition array for the variable flux (implicit part)
[in]i_massfluxmass flux at interior faces
[in]b_massfluxmass flux at border faces
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ S_\fib $ at border faces for the matrix
[out]dadiagonal part of the matrix

◆ cs_matrix_vector()

void cs_matrix_vector ( const cs_mesh_t m,
const cs_mesh_quantities_t mq,
int  iconvp,
int  idiffp,
int  eb_size[4],
double  thetap,
const cs_real_33_t  coefbp[],
const cs_real_33_t  cofbfp[],
const cs_real_33_t  fimp[],
const cs_real_t  i_massflux[],
const cs_real_t  b_massflux[],
const cs_real_t  i_visc[],
const cs_real_t  b_visc[],
cs_real_33_t *restrict  da,
cs_real_2_t *restrict  xa 
)

Build the advection/diffusion matrix for a vector field (non-symmetric matrix).

The advection is upwind, the diffusion is not reconstructed. The matrix is split into a diagonal block (3x3 times number of cells) and an extra diagonal part (of dimension 2 time the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]mqpointer to mesh quantities structure
[in]iconvpindicator
  • 1 advection
  • 0 otherwise
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]coefbuboundary condition array for the variable (implicit part - 3x3 tensor array)
[in]cofbfuboundary condition array for the variable flux (implicit part - 3x3 tensor array)
[in]fimppart of the diagonal
[in]i_massfluxmass flux at interior faces
[in]b_massfluxmass flux at border faces
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ \mu_\fib \dfrac{S_\fib}{\ipf \centf} $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

The advection is upwind, the diffusion is not reconstructed. The matrix is split into a diagonal block (3x3 times number of cells) and an extra diagonal part (of dimension 2 time the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]mqpointer to mesh quantities structure
[in]iconvpindicator
  • 1 advection
  • 0 otherwise
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]coefbpboundary condition array for the variable (implicit part - 3x3 tensor array)
[in]cofbfpboundary condition array for the variable flux (implicit part - 3x3 tensor array)
[in]fimppart of the diagonal
[in]i_massfluxmass flux at interior faces
[in]b_massfluxmass flux at border faces
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ \mu_\fib \dfrac{S_\fib}{\ipf \centf} $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

◆ cs_matrix_wrapper_scalar()

void cs_matrix_wrapper_scalar ( int  iconvp,
int  idiffp,
int  ndircp,
int  isym,
double  thetap,
int  imucpp,
const cs_real_t  coefbp[],
const cs_real_t  cofbfp[],
const cs_real_t  rovsdt[],
const cs_real_t  i_massflux[],
const cs_real_t  b_massflux[],
const cs_real_t  i_visc[],
const cs_real_t  b_visc[],
const cs_real_t  xcpp[],
cs_real_t  da[],
cs_real_t  xa[] 
)

◆ cs_matrix_wrapper_scalar_conv_diff()

void cs_matrix_wrapper_scalar_conv_diff ( int  iconvp,
int  idiffp,
int  ndircp,
double  thetap,
int  imucpp,
const cs_real_t  coefbp[],
const cs_real_t  cofbfp[],
const cs_real_t  rovsdt[],
const cs_real_t  i_massflux[],
const cs_real_t  b_massflux[],
const cs_real_t  i_visc[],
const cs_real_t  b_visc[],
const cs_real_t  xcpp[],
cs_real_t  da[],
cs_real_t  xa[],
cs_real_t  da_conv[],
cs_real_t  xa_conv[],
cs_real_t  da_diff[],
cs_real_t  xa_diff[] 
)

◆ cs_matrix_wrapper_tensor()

void cs_matrix_wrapper_tensor ( int  iconvp,
int  idiffp,
int  tensorial_diffusion,
int  ndircp,
int  isym,
double  thetap,
const cs_real_66_t  coefbts[],
const cs_real_66_t  cofbfts[],
const cs_real_66_t  fimp[],
const cs_real_t  i_massflux[],
const cs_real_t  b_massflux[],
const cs_real_t  i_visc[],
const cs_real_t  b_visc[],
cs_real_66_t  da[],
cs_real_t  xa[] 
)

◆ cs_matrix_wrapper_vector()

void cs_matrix_wrapper_vector ( int  iconvp,
int  idiffp,
int  tensorial_diffusion,
int  ndircp,
int  isym,
int  eb_size[4],
double  thetap,
const cs_real_33_t  coefbu[],
const cs_real_33_t  cofbfu[],
const cs_real_33_t  fimp[],
const cs_real_t  i_massflux[],
const cs_real_t  b_massflux[],
const cs_real_t  i_visc[],
const cs_real_t  b_visc[],
cs_real_33_t  da[],
cs_real_t  xa[] 
)

◆ CS_PROCF() [1/2]

void CS_PROCF ( matrdt  ,
MATRDT   
) const

◆ CS_PROCF() [2/2]

void CS_PROCF ( matrix  ,
MATRIX   
) const

◆ cs_sym_matrix_anisotropic_diffusion()

void cs_sym_matrix_anisotropic_diffusion ( const cs_mesh_t m,
int  idiffp,
double  thetap,
const cs_real_33_t  cofbfp[],
const cs_real_33_t  fimp[],
const cs_real_33_t  i_visc[],
const cs_real_t  b_visc[],
cs_real_33_t *restrict  da,
cs_real_33_t *restrict  xa 
)

Build the diffusion matrix for a vector field with a tensorial diffusivity (symmetric matrix).

The diffusion is not reconstructed. The matrix is split into a diagonal block (3x3 times number of cells) and an extra diagonal part (of dimension 3x3 the number of internal faces).

Parameters
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]cofbfuboundary condition array for the variable flux (implicit part - 3x3 tensor array)
[in]fimp
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ \mu_\fib \dfrac{S_\fib}{\ipf \centf} $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

The diffusion is not reconstructed. The matrix is split into a diagonal block (3x3 times number of cells) and an extra diagonal part (of dimension 3x3 the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]cofbfpboundary condition array for the variable flux (implicit part - 3x3 tensor array)
[in]fimp$ \tens{f_s}^{imp} $
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ \mu_\fib \dfrac{S_\fib}{\ipf \centf} $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

◆ cs_sym_matrix_anisotropic_diffusion_tensor()

void cs_sym_matrix_anisotropic_diffusion_tensor ( const cs_mesh_t m,
int  idiffp,
double  thetap,
const cs_real_66_t  cofbfp[],
const cs_real_66_t  fimp[],
const cs_real_66_t  i_visc[],
const cs_real_t  b_visc[],
cs_real_66_t *restrict  da,
cs_real_66_t *restrict  xa 
)

Build the diffusion matrix for a vector field with a tensorial diffusivity (symmetric matrix).

The diffusion is not reconstructed. The matrix is split into a diagonal block (3x3 times number of cells) and an extra diagonal part (of dimension 3x3 the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]cofbfuboundary condition array for the variable flux (implicit part - 3x3 tensor array)
[in]fimp$ \tens{f_s}^{imp} $
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ \mu_\fib \dfrac{S_\fib}{\ipf \centf} $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

Build the diffusion matrix for a vector field with a tensorial diffusivity (symmetric matrix).

The diffusion is not reconstructed. The matrix is split into a diagonal block (3x3 times number of cells) and an extra diagonal part (of dimension 3x3 the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]cofbfpboundary condition array for the variable flux (implicit part - 3x3 tensor array)
[in]fimp$ \tens{f_s}^{imp} $
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ \mu_\fib \dfrac{S_\fib}{\ipf \centf} $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

◆ cs_sym_matrix_scalar()

void cs_sym_matrix_scalar ( const cs_mesh_t m,
int  idiffp,
double  thetap,
const cs_real_t  cofbfp[],
const cs_real_t  rovsdt[],
const cs_real_t  i_visc[],
const cs_real_t  b_visc[],
cs_real_t *restrict  da,
cs_real_t *restrict  xa 
)

Build the diffusion matrix for a scalar field. (symmetric matrix).

The diffusion is not reconstructed. The matrix is split into a diagonal block (number of cells) and an extra diagonal part (of dimension the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]cofbfpboundary condition array for the variable flux (implicit part)
[in]rovsdtworking array
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ S_\fib $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra diagonal part of the matrix

◆ cs_sym_matrix_tensor()

void cs_sym_matrix_tensor ( const cs_mesh_t m,
int  idiffp,
double  thetap,
const cs_real_66_t  cofbfts[],
const cs_real_66_t  fimp[],
const cs_real_t  i_visc[],
const cs_real_t  b_visc[],
cs_real_66_t *restrict  da,
cs_real_t *restrict  xa 
)

Build the diffusion matrix for a tensor field (symmetric matrix).

The diffusion is not reconstructed. The matrix is split into a diagonal block (6x6 times number of cells) and an extra diagonal part (of dimension the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]cofbftsboundary condition array for the variable flux (Implicit part - 6x6 tensor array)
[in]fimppart of the diagonal
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ \mu_\fib \dfrac{S_\fib}{\ipf \centf} $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

◆ cs_sym_matrix_vector()

void cs_sym_matrix_vector ( const cs_mesh_t m,
int  idiffp,
double  thetap,
const cs_real_33_t  cofbfp[],
const cs_real_33_t  fimp[],
const cs_real_t  i_visc[],
const cs_real_t  b_visc[],
cs_real_33_t *restrict  da,
cs_real_t *restrict  xa 
)

Build the diffusion matrix for a vector field (symmetric matrix).

The diffusion is not reconstructed. The matrix is split into a diagonal block (3x3 times number of cells) and an extra diagonal part (of dimension the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]cofbfuboundary condition array for the variable flux (implicit part - 3x3 tensor array)
[in]fimppart of the diagonal
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ \mu_\fib \dfrac{S_\fib}{\ipf \centf} $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

The diffusion is not reconstructed. The matrix is split into a diagonal block (3x3 times number of cells) and an extra diagonal part (of dimension the number of internal faces).

Parameters
[in]mpointer to mesh structure
[in]idiffpindicator
  • 1 diffusion
  • 0 otherwise
[in]thetapweighting coefficient for the theta-scheme,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centered scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]cofbfpboundary condition array for the variable flux (implicit part - 3x3 tensor array)
[in]fimp$ \tens{f_s}^{imp} $
[in]i_visc$ \mu_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the matrix
[in]b_visc$ \mu_\fib \dfrac{S_\fib}{\ipf \centf} $ at border faces for the matrix
[out]dadiagonal part of the matrix
[out]xaextra interleaved diagonal part of the matrix

Variable Documentation

◆ b_massflux

void const cs_int_t* const const cs_int_t* const const cs_real_t const cs_real_t const cs_real_t const cs_real_t b_massflux[]

◆ b_visc

void const cs_int_t* const const cs_int_t* const const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t b_visc[]

◆ coefbp

void const cs_int_t* const const cs_int_t* const const cs_real_t coefbp[]

◆ cofbfp

void const cs_int_t* const const cs_int_t* const const cs_real_t const cs_real_t cofbfp[]

◆ da

void const cs_int_t *const const cs_int_t *const const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t cs_real_t da

◆ i_massflux

void const cs_int_t* const const cs_int_t* const const cs_real_t const cs_real_t const cs_real_t i_massflux[]

◆ i_visc

void const cs_int_t* const const cs_int_t* const const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t i_visc[]

◆ idiffp

void const cs_int_t *const idiffp

◆ imucpp

void const int const int const int const cs_real_t const int* imucpp

◆ isym

void const cs_int_t *const const cs_int_t *const isym

◆ ndircp

void const int const int* ndircp

◆ rovsdt

void const int const int const int const cs_real_t const int const cs_real_t const cs_real_t const cs_real_t rovsdt[]

◆ thetap

void const int const int const int const cs_real_t* thetap

◆ xa

void const int const int const int const cs_real_t const int const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t cs_real_t cs_real_t xa[]

◆ xcpp

void const int const int const int const cs_real_t const int const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t xcpp[]