programmer's documentation
Typedefs | Functions
cs_cdovb_advection.h File Reference
#include "cs_time_step.h"
#include "cs_cdo.h"
#include "cs_param.h"
#include "cs_cdo_toolbox.h"
#include "cs_cdo_connect.h"
#include "cs_cdo_quantities.h"
#include "cs_property.h"
#include "cs_advection_field.h"
Include dependency graph for cs_cdovb_advection.h:

Go to the source code of this file.

Typedefs

typedef struct _cs_cdovb_adv_t cs_cdovb_adv_t
 

Functions

cs_cdovb_adv_tcs_cdovb_advection_builder_init (const cs_cdo_connect_t *connect, const cs_adv_field_t *adv, const cs_param_advection_t a_info, bool do_diffusion)
 Initialize a builder structure for the convection operator. More...
 
cs_cdovb_adv_tcs_cdovb_advection_builder_free (cs_cdovb_adv_t *b)
 Destroy a builder structure for the convection operator. More...
 
cs_locmat_tcs_cdovb_advection_build_local (cs_lnum_t c_id, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_lnum_t *loc_ids, const cs_real_33_t diffmat, cs_cdovb_adv_t *builder)
 Compute the convection operator for pure convection. More...
 
void cs_cdovb_advection_add_bc (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_real_t *dir_vals, cs_cdovb_adv_t *builder, cs_real_t rhs_contrib[], cs_real_t diag_contrib[])
 Compute the convection operator for pure convection. More...
 
void cs_cdovb_advection_get_peclet_cell (const cs_cdo_quantities_t *cdoq, const cs_adv_field_t *adv, const cs_property_t *diff_property, const cs_real_3_t dir_vect, cs_real_t *p_peclet[])
 Compute the Peclet number in each cell in a given direction. More...
 
void cs_cdovb_advection_get_upwind_coef_cell (const cs_cdo_quantities_t *cdoq, const cs_param_advection_t a_info, cs_real_t coefval[])
 Compute the value in each cell of the upwinding coefficient given a related Peclet number. More...
 

Typedef Documentation

typedef struct _cs_cdovb_adv_t cs_cdovb_adv_t

Function Documentation

void cs_cdovb_advection_add_bc ( const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_real_t dir_vals,
cs_cdovb_adv_t builder,
cs_real_t  rhs_contrib[],
cs_real_t  diag_contrib[] 
)

Compute the convection operator for pure convection.

Parameters
[in]connectpointer to the connectivity structure
[in]quantpointer to the cdo quantities structure
[in]dir_valsvalues of the Dirichlet boundary condition
[in,out]builderpointer to a convection builder structure
[in,out]rhs_contribarray storing the rhs contribution
[in,out]diag_contribarray storing the diagonal contribution
cs_locmat_t* cs_cdovb_advection_build_local ( cs_lnum_t  c_id,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_lnum_t loc_ids,
const cs_real_33_t  diffmat,
cs_cdovb_adv_t builder 
)

Compute the convection operator for pure convection.

Parameters
[in]c_idcell id
[in]connectpointer to the connectivity structure
[in]quantpointer to the cdo quantities structure
[in]loc_idsstore the local entity ids for this cell
[in]diffmattensor related to the diffusion property
[in,out]builderpointer to a convection builder structure
Returns
a pointer to a local dense matrix structure
cs_cdovb_adv_t* cs_cdovb_advection_builder_free ( cs_cdovb_adv_t b)

Destroy a builder structure for the convection operator.

Parameters
[in,out]bpointer to a cs_cdovb_adv_t struct. to free
Returns
a NULL pointer
cs_cdovb_adv_t* cs_cdovb_advection_builder_init ( const cs_cdo_connect_t connect,
const cs_adv_field_t *  adv,
const cs_param_advection_t  a_info,
bool  do_diffusion 
)

Initialize a builder structure for the convection operator.

Parameters
[in]connectpointer to the connectivity structure
[in]adv_fieldpointer to a cs_adv_field_t structure
[in]a_infoset of options for the advection term
[in]do_diffusiontrue is diffusion is activated
Returns
a pointer to a new allocated builder structure
void cs_cdovb_advection_get_peclet_cell ( const cs_cdo_quantities_t cdoq,
const cs_adv_field_t *  adv,
const cs_property_t *  diff_property,
const cs_real_3_t  dir_vect,
cs_real_t p_peclet[] 
)

Compute the Peclet number in each cell in a given direction.

Parameters
[in]cdoqpointer to the cdo quantities structure
[in]advpointer to the advection field struct.
[in]diff_propertypointer to the diffusion property struct.
[in]dir_vectdirection for estimating the Peclet number
[in,out]pecletpointer to the pointer of real numbers to fill
void cs_cdovb_advection_get_upwind_coef_cell ( const cs_cdo_quantities_t cdoq,
const cs_param_advection_t  a_info,
cs_real_t  coefval[] 
)

Compute the value in each cell of the upwinding coefficient given a related Peclet number.

Parameters
[in]cdoqpointer to the cdo quantities structure
[in,out]coefvalpointer to the pointer of real numbers to fill in: Peclet number in each cell out: value of the upwind coefficient
[in]cdoqpointer to the cdo quantities structure
[in]a_infoset of options for the advection term
[in,out]coefvalpointer to the pointer of real numbers to fill in: Peclet number in each cell out: value of the upwind coefficient