#include "cs_advection_field.h"
#include "cs_cdo_connect.h"
#include "cs_cdo_local.h"
#include "cs_cdo_quantities.h"
#include "cs_equation_param.h"
#include "cs_macfb_builder.h"
#include "cs_property.h"
Go to the source code of this file.
Typedefs | |
typedef void() | cs_macfb_adv_open_hook_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, const cs_cell_sys_t *csys, void *input, cs_cell_builder_t *cb) |
Perform preprocessing such as the computation of the advection flux at the expected location in order to be able to build the advection. More... | |
typedef void() | cs_macfb_adv_scheme_t(const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, cs_cell_builder_t *cb, cs_sdm_t *adv, cs_real_t *rhs) |
Define the local convection operator in MAC-Fb schemes. Case of an operator that should be assemble into a matrix. Boundary conditions are also handled in this function. More... | |
typedef void() | cs_macfb_adv_build_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, cs_macfb_adv_scheme_t *scheme_func, cs_cell_sys_t *csys, cs_cell_builder_t *cb) |
Build the cellwise advection operator for MAC-Fb schemes The local matrix related to this operator is stored in cb->loc. More... | |
typedef void() | cs_macfb_adv_close_hook_t(const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, const cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Operation done after the matrix related to the advection term has been defined. More... | |
Functions | |
void | cs_macfb_advection_open_default (const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, const cs_cell_sys_t *csys, void *input, cs_cell_builder_t *cb) |
Perform preprocessing such as the computation of the advection flux at the expected location in order to be able to build the advection matrix. Follow the prototype given by cs_macfb_adv_open_hook_t Default case. More... | |
void | cs_macfb_advection_close_default_vect (const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, const cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Operation done after the matrix related to the advection term has been defined. Follow the prototype given by cs_macfb_adv_close_hook_t Default vector-valued case. More... | |
void | cs_macfb_advection_close_exp_none_vect (const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, const cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Operation done after the matrix related to the advection term has been defined. Follow the prototype given by cs_macfb_adv_close_hook_t Explicit treatment without extrapolation for vector-valued DoFs. More... | |
void | cs_macfb_advection_no_diffusion (const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, cs_macfb_adv_scheme_t *scheme_func, cs_cell_sys_t *csys, cs_cell_builder_t *cb) |
Main function to build the cellwise advection operator for MAC-Fb schemes The local matrix related to this operator is stored in cb->loc. More... | |
void | cs_macfb_advection (const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, cs_macfb_adv_scheme_t *scheme_func, cs_cell_sys_t *csys, cs_cell_builder_t *cb) |
Main function to build the cellwise advection operator for MAC face-based schemes. The local matrix related to this operator is stored in cb->loc. More... | |
void | cs_macfb_advection_upwnoc (const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, cs_cell_builder_t *cb, cs_sdm_t *adv, cs_real_t *rhs) |
Compute the convection operator attached to a cell with a MAC face-based scheme. More... | |
void | cs_macfb_advection_upwcsv (const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, cs_cell_builder_t *cb, cs_sdm_t *adv, cs_real_t *rhs) |
Compute the convection operator attached to a cell with a MAC face-based scheme. More... | |
void | cs_macfb_advection_cennoc (const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, cs_cell_builder_t *cb, cs_sdm_t *adv, cs_real_t *rhs) |
Compute the convection operator attached to a cell with a MAC face-based scheme. More... | |
void | cs_macfb_advection_cencsv (const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, cs_cell_builder_t *cb, cs_sdm_t *adv, cs_real_t *rhs) |
Compute the convection operator attached to a cell with a MAC face-based scheme. More... | |
typedef void() cs_macfb_adv_build_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, cs_macfb_adv_scheme_t *scheme_func, cs_cell_sys_t *csys, cs_cell_builder_t *cb) |
Build the cellwise advection operator for MAC-Fb schemes The local matrix related to this operator is stored in cb->loc.
This pointer of function manages how is build the advection term in a cell and it relies on the lower-level function cs_macfb_adv_scheme_t
[in] | eqp | pointer to a cs_equation_param_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | scheme_func | function pointer to the scheme definition |
[in,out] | csys | pointer to a cellwise view of the system |
[in,out] | cb | pointer to a cellwise builder |
typedef void() cs_macfb_adv_close_hook_t(const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, const cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Operation done after the matrix related to the advection term has been defined.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | csys | pointer to a cs_cell_sys_t structure |
typedef void() cs_macfb_adv_open_hook_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, const cs_cell_sys_t *csys, void *input, cs_cell_builder_t *cb) |
Perform preprocessing such as the computation of the advection flux at the expected location in order to be able to build the advection.
[in] | eqp | pointer to a cs_equation_param_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | csys | pointer to a cs_cell_sys_t structure |
[in,out] | input | null or pointer to a structure cast on-the-fly |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
typedef void() cs_macfb_adv_scheme_t(const cs_cell_mesh_t *cm, const cs_macfb_builder_t *macb, cs_cell_builder_t *cb, cs_sdm_t *adv, cs_real_t *rhs) |
Define the local convection operator in MAC-Fb schemes. Case of an operator that should be assemble into a matrix. Boundary conditions are also handled in this function.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | adv | pointer to a local matrix to build |
[in,out] | rhs | pointer to a cs_real_t array. It is filled inside the function. Have to preallocated. |
void cs_macfb_advection | ( | const cs_equation_param_t * | eqp, |
const cs_cell_mesh_t * | cm, | ||
const cs_macfb_builder_t * | macb, | ||
cs_macfb_adv_scheme_t * | scheme_func, | ||
cs_cell_sys_t * | csys, | ||
cs_cell_builder_t * | cb | ||
) |
Main function to build the cellwise advection operator for MAC face-based schemes. The local matrix related to this operator is stored in cb->loc.
One assumes that a diffusion term is present so that there is no need to perform additional checkings on the well-posedness of the operator.
[in] | eqp | pointer to a cs_equation_param_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | scheme_func | pointer to the function building the system |
[in,out] | csys | pointer to a cellwise view of the system |
[in,out] | cb | pointer to a cellwise builder |
void cs_macfb_advection_cencsv | ( | const cs_cell_mesh_t * | cm, |
const cs_macfb_builder_t * | macb, | ||
cs_cell_builder_t * | cb, | ||
cs_sdm_t * | adv, | ||
cs_real_t * | rhs | ||
) |
Compute the convection operator attached to a cell with a MAC face-based scheme.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | adv | pointer to a local matrix to build |
[in,out] | rhs | pointer to a cs_real_t array. It is filled inside the function. Have to preallocated. |
void cs_macfb_advection_cennoc | ( | const cs_cell_mesh_t * | cm, |
const cs_macfb_builder_t * | macb, | ||
cs_cell_builder_t * | cb, | ||
cs_sdm_t * | adv, | ||
cs_real_t * | rhs | ||
) |
Compute the convection operator attached to a cell with a MAC face-based scheme.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | adv | pointer to a local matrix to build |
[in,out] | rhs | pointer to a cs_real_t array. It is filled inside the function. Have to preallocated. |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | adv | pointer to a local matrix to build |
[in,out] | rhs | pointer to a cs_real_t array. It is filled inside the function. Have to preallocated. |
void cs_macfb_advection_close_default_vect | ( | const cs_cell_mesh_t * | cm, |
const cs_macfb_builder_t * | macb, | ||
const cs_cell_builder_t * | cb, | ||
cs_cell_sys_t * | csys | ||
) |
Operation done after the matrix related to the advection term has been defined. Follow the prototype given by cs_macfb_adv_close_hook_t Default vector-valued case.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | csys | pointer to a cs_cell_sys_t structure |
void cs_macfb_advection_close_exp_none_vect | ( | const cs_cell_mesh_t * | cm, |
const cs_macfb_builder_t * | macb, | ||
const cs_cell_builder_t * | cb, | ||
cs_cell_sys_t * | csys | ||
) |
Operation done after the matrix related to the advection term has been defined. Follow the prototype given by cs_macfb_adv_close_hook_t Explicit treatment without extrapolation for vector-valued DoFs.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | csys | pointer to a cs_cell_sys_t structure |
void cs_macfb_advection_no_diffusion | ( | const cs_equation_param_t * | eqp, |
const cs_cell_mesh_t * | cm, | ||
const cs_macfb_builder_t * | macb, | ||
cs_macfb_adv_scheme_t * | scheme_func, | ||
cs_cell_sys_t * | csys, | ||
cs_cell_builder_t * | cb | ||
) |
Main function to build the cellwise advection operator for MAC-Fb schemes The local matrix related to this operator is stored in cb->loc.
Case of an advection term without a diffusion operator. In this situation, a numerical issue may arise if an internal or a border face is such that there is no advective flux. A special treatment is performed to tackle this issue.
[in] | eqp | pointer to a cs_equation_param_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | scheme_func | pointer to the function building the system |
[in,out] | csys | pointer to a cellwise view of the system |
[in,out] | cb | pointer to a cellwise builder |
Main function to build the cellwise advection operator for MAC-Fb schemes The local matrix related to this operator is stored in cb->loc.
Case of an advection term without a diffusion operator. In this situation, a numerical issue may arise if an internal or a border face is such that there is no advective flux. A special treatment is performed to tackle this issue.
[in] | eqp | pointer to a cs_equation_param_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | scheme_func | pointer to the function building the system |
[in,out] | csys | pointer to a cellwise view of the system |
[in,out] | cb | pointer to a cellwise builder |
void cs_macfb_advection_open_default | ( | const cs_equation_param_t * | eqp, |
const cs_cell_mesh_t * | cm, | ||
const cs_macfb_builder_t * | macb, | ||
const cs_cell_sys_t * | csys, | ||
void * | input, | ||
cs_cell_builder_t * | cb | ||
) |
Perform preprocessing such as the computation of the advection flux at the expected location in order to be able to build the advection matrix. Follow the prototype given by cs_macfb_adv_open_hook_t Default case.
[in] | eqp | pointer to a cs_equation_param_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | csys | pointer to a cs_cell_sys_t structure |
[in,out] | input | null or pointer to a structure cast on-the-fly |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
[in] | eqp | pointer to a cs_equation_param_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | csys | pointer to a cs_cell_sys_t structure |
[in,out] | input | nullptr or pointer to a structure cast on-the-fly |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
void cs_macfb_advection_upwcsv | ( | const cs_cell_mesh_t * | cm, |
const cs_macfb_builder_t * | macb, | ||
cs_cell_builder_t * | cb, | ||
cs_sdm_t * | adv, | ||
cs_real_t * | rhs | ||
) |
Compute the convection operator attached to a cell with a MAC face-based scheme.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | adv | pointer to a local matrix to build |
[in,out] | rhs | pointer to a cs_real_t array. It is filled inside the function. Have to preallocated. |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | adv | pointer to a local matrix to build |
[in,out] | rhs | pointer to a cs_real_t array. It is filled inside the function. Have to preallocated. |
void cs_macfb_advection_upwnoc | ( | const cs_cell_mesh_t * | cm, |
const cs_macfb_builder_t * | macb, | ||
cs_cell_builder_t * | cb, | ||
cs_sdm_t * | adv, | ||
cs_real_t * | rhs | ||
) |
Compute the convection operator attached to a cell with a MAC face-based scheme.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | macb | pointer to a cs_macfb_builder_t structure |
[in] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | adv | pointer to a local matrix to build |
[in,out] | rhs | pointer to a cs_real_t array. It is filled inside the function. Have to preallocated. |