My Project
programmer's documentation
|
#include "assert.h"
#include "cs_cdo_connect.h"
#include "cs_cdo_local.h"
#include "cs_cdo_quantities.h"
#include "cs_flag.h"
Go to the source code of this file.
Functions | |
static cs_real_t | cs_reco_fw_scalar_pv_at_face_center (const cs_face_mesh_t *fm, const cs_real_t *p_v) |
Reconstruct the value at the face center from an array of values defined on primal vertices. More... | |
static cs_real_t | cs_reco_cw_scalar_pv_at_face_center (const short int f, const cs_cell_mesh_t *cm, const cs_real_t *p_v) |
Reconstruct the value at the face center from an array of values defined on primal vertices. More... | |
static cs_real_t | cs_reco_cw_scalar_pv_at_cell_center (const cs_cell_mesh_t *cm, const cs_real_t *p_v) |
Reconstruct the value of a scalar potential at the cell center from an array of values defined on primal vertices. Algorithm based on the cs_cell_mesh_t structure. More... | |
void | cs_reco_conf_vtx_dofs (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const double *dof, double *p_crec[], double *p_frec[]) |
Reconstruct at cell centers and face centers a vertex-based field Linear interpolation. If p_crec and/or p_frec are not allocated, this done in this subroutine. More... | |
void | cs_reco_pv_at_cell_centers (const cs_adjacency_t *c2v, const cs_cdo_quantities_t *quant, const double *array, cs_real_t *val_xc) |
Reconstruct the value at all cell centers from an array of values defined on primal vertices. More... | |
void | cs_reco_vect_pv_at_cell_centers (const cs_adjacency_t *c2v, const cs_cdo_quantities_t *quant, const double *array, cs_real_t *val_xc) |
Reconstruct the value at all cell centers from an array of values defined on primal vertices. Case of vector-valued fields. More... | |
void | cs_reco_cell_vect_from_face_dofs (const cs_adjacency_t *c2f, const cs_cdo_quantities_t *cdoq, const cs_real_t i_face_vals[], const cs_real_t b_face_vals[], cs_real_t *cell_reco) |
Reconstruct the vector-valued quantity inside each cell from the face DoFs (interior and boundary). Scalar-valued face DoFs are related to the normal flux across faces. More... | |
void | cs_reco_pv_at_cell_center (cs_lnum_t c_id, const cs_adjacency_t *c2v, const cs_cdo_quantities_t *quant, const double *array, cs_real_t *val_xc) |
Reconstruct the value at the cell center from an array of values defined on primal vertices. More... | |
void | cs_reco_vect_pv_from_pc (const cs_adjacency_t *c2v, const cs_cdo_quantities_t *quant, const double *val, cs_real_t *reco_val) |
Reconstruct a vector-valued array at vertices from a vector-valued array at cells. More... | |
void | cs_reco_pf_from_pv (cs_lnum_t f_id, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const double *pdi, cs_real_t *pdi_f) |
Reconstruct the value at the face center from an array of values defined on primal vertices. More... | |
void | cs_reco_dfbyc_at_cell_center (cs_lnum_t c_id, const cs_adjacency_t *c2e, const cs_cdo_quantities_t *quant, const double *array, cs_real_3_t val_xc) |
Reconstruct a constant vector at the cell center from an array of values defined on dual faces lying inside each cell. This array is scanned thanks to the c2e connectivity. More... | |
void | cs_reco_dfbyc_in_cell (const cs_cell_mesh_t *cm, const cs_real_t *array, cs_real_3_t val_c) |
Reconstruct a constant vector inside the cell c. array is scanned thanks to the c2e connectivity. Pointer is already located at the beginning of the cell sequence. Reconstruction used is based on DGA (stabilization = 1/d where d is the space dimension) More... | |
void | cs_reco_dfbyc_in_pec (const cs_cell_mesh_t *cm, short int e, const cs_real_t *array, cs_real_3_t val_pec) |
Reconstruct a constant vector inside pec which is a volume surrounding the edge e inside the cell c. array is scanned thanks to the c2e connectivity. Pointer is already located at the beginning of the cell sequence. Reconstruction used is based on DGA (stabilization = 1/d where d is the space dimension) More... | |
void | cs_reco_ccen_edge_dof (cs_lnum_t cid, const cs_adjacency_t *c2e, const cs_cdo_quantities_t *quant, const double *dof, double reco[]) |
Reconstruct at the cell center a field of edge-based DoFs. More... | |
void | cs_reco_ccen_edge_dofs (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const double *dof, double *p_ccrec[]) |
Reconstruct at each cell center a field of edge-based DoFs. More... | |
void | cs_reco_grad_cell_from_pv (cs_lnum_t c_id, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_real_t *pdi, cs_real_t val_xc[]) |
Reconstruct the value at the cell center of the gradient of a field defined on primal vertices. More... | |
void | cs_reco_cw_cell_vect_from_face_dofs (const cs_cell_mesh_t *cm, const cs_real_t i_face_vals[], const cs_real_t b_face_vals[], cs_real_t *cell_reco) |
Reconstruct the vector-valued quantity inside each cell from the face DoFs (interior and boundary). Scalar-valued face DoFs are related to the normal flux across faces. More... | |
void | cs_reco_cw_cell_grad_from_scalar_pv (const cs_cell_mesh_t *cm, const cs_real_t pdi[], cs_real_t *cell_gradient) |
Reconstruct the value of a scalar potential at a point inside a cell The scalar potential has DoFs located at primal vertices. More... | |
cs_real_t | cs_reco_cw_scalar_pv_inside_cell (const cs_cell_mesh_t *cm, const cs_real_t pdi[], const cs_real_t length_xcxp, const cs_real_t unitv_xcxp[], cs_real_t wbuf[]) |
Reconstruct the value of a scalar potential at a point inside a cell The scalar potential has DoFs located at primal vertices. More... | |
void | cs_reco_cw_vgrd_wbs_from_pvc (const cs_cell_mesh_t *cm, const cs_real_t *pot, cs_cell_builder_t *cb, cs_real_t *vgrd) |
Compute the weighted (by volume) gradient inside a given primal cell for the related vertices. Use the WBS algo. for approximating the gradient. The computation takes into account a subdivision into tetrahedra of the current cell based on p_{ef,c}. More... | |
void | cs_reco_cw_cgrd_wbs_from_pvc (const cs_cell_mesh_t *cm, const cs_real_t *pot, cs_cell_builder_t *cb, cs_real_t *cgrd) |
Compute the mean value of a gradient inside a given primal cell. Use the WBS algo. for approximating the gradient. The computation takes into account a subdivision into tetrahedra of the current cell based on p_{ef,c}. More... | |
void cs_reco_ccen_edge_dof | ( | cs_lnum_t | cid, |
const cs_adjacency_t * | c2e, | ||
const cs_cdo_quantities_t * | quant, | ||
const double * | dof, | ||
double | reco[] | ||
) |
Reconstruct at the cell center a field of edge-based DoFs.
[in] | cid | cell id |
[in] | c2e | cell -> edges connectivity |
[in] | quant | pointer to the additional quantities struct. |
[in] | dof | pointer to the field of edge-based DoFs |
[in,out] | reco | value of the reconstructed field at cell center |
void cs_reco_ccen_edge_dofs | ( | const cs_cdo_connect_t * | connect, |
const cs_cdo_quantities_t * | quant, | ||
const double * | dof, | ||
double * | p_ccrec[] | ||
) |
Reconstruct at each cell center a field of edge-based DoFs.
[in] | connect | pointer to the connectivity struct. |
[in] | quant | pointer to the additional quantities struct. |
[in] | dof | pointer to the field of edge-based DoFs |
[in,out] | p_ccrec | pointer to the reconstructed values |
void cs_reco_cell_vect_from_face_dofs | ( | const cs_adjacency_t * | c2f, |
const cs_cdo_quantities_t * | cdoq, | ||
const cs_real_t | i_face_vals[], | ||
const cs_real_t | b_face_vals[], | ||
cs_real_t * | cell_reco | ||
) |
Reconstruct the vector-valued quantity inside each cell from the face DoFs (interior and boundary). Scalar-valued face DoFs are related to the normal flux across faces.
[in] | c2f | cell -> faces connectivity |
[in] | quant | pointer to the additional quantities struct. |
[in] | i_face_vals | array of DoF values for interior faces |
[in] | b_face_vals | array of DoF values for border faces |
[out] | cell_reco | vector-valued reconstruction inside cells |
void cs_reco_conf_vtx_dofs | ( | const cs_cdo_connect_t * | connect, |
const cs_cdo_quantities_t * | quant, | ||
const double * | dof, | ||
double * | p_crec[], | ||
double * | p_frec[] | ||
) |
Reconstruct at cell centers and face centers a vertex-based field Linear interpolation. If p_crec and/or p_frec are not allocated, this done in this subroutine.
[in] | connect | pointer to the connectivity struct. |
[in] | quant | pointer to the additional quantities struct. |
[in] | dof | pointer to the field of vtx-based DoFs |
[in,out] | p_crec | reconstructed values at cell centers |
[in,out] | p_frec | reconstructed values at face centers |
void cs_reco_cw_cell_grad_from_scalar_pv | ( | const cs_cell_mesh_t * | cm, |
const cs_real_t | pdi[], | ||
cs_real_t * | cell_gradient | ||
) |
Reconstruct the value of a scalar potential at a point inside a cell The scalar potential has DoFs located at primal vertices.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | pdi | array of DoF values at vertices |
[out] | cell_gradient | gradient inside the cell |
void cs_reco_cw_cell_vect_from_face_dofs | ( | const cs_cell_mesh_t * | cm, |
const cs_real_t | i_face_vals[], | ||
const cs_real_t | b_face_vals[], | ||
cs_real_t * | cell_reco | ||
) |
Reconstruct the vector-valued quantity inside each cell from the face DoFs (interior and boundary). Scalar-valued face DoFs are related to the normal flux across faces.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | i_face_vals | array of DoF values for interior faces |
[in] | b_face_vals | array of DoF values for border faces |
[out] | cell_reco | vector-valued reconstruction inside the cell |
void cs_reco_cw_cgrd_wbs_from_pvc | ( | const cs_cell_mesh_t * | cm, |
const cs_real_t * | pot, | ||
cs_cell_builder_t * | cb, | ||
cs_real_t * | cgrd | ||
) |
Compute the mean value of a gradient inside a given primal cell. Use the WBS algo. for approximating the gradient. The computation takes into account a subdivision into tetrahedra of the current cell based on p_{ef,c}.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | pot | values of the potential fields at vertices + cell |
[in,out] | cb | auxiliary structure for computing the flux |
[in,out] | cgrd | mean-value of the cell gradient |
|
inlinestatic |
Reconstruct the value of a scalar potential at the cell center from an array of values defined on primal vertices. Algorithm based on the cs_cell_mesh_t structure.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | array | pointer to the array of values (size: n_vc) |
|
inlinestatic |
Reconstruct the value at the face center from an array of values defined on primal vertices.
[in] | f | id of the face in the cellwise numbering |
[in] | cm | pointer to cs_cell_mesh_t structure |
[in] | p_v | pointer to an array of values (local to the cell) |
cs_real_t cs_reco_cw_scalar_pv_inside_cell | ( | const cs_cell_mesh_t * | cm, |
const cs_real_t | pdi[], | ||
const cs_real_t | length_xcxp, | ||
const cs_real_t | unitv_xcxp[], | ||
cs_real_t | wbuf[] | ||
) |
Reconstruct the value of a scalar potential at a point inside a cell The scalar potential has DoFs located at primal vertices.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | pdi | array of DoF values at vertices |
[in] | length_xcxp | lenght of the segment [x_c, x_p] |
[in] | unitv_xcxp | unitary vector pointed from x_c to x_p |
[in,out] | wbuf | pointer to a temporary buffer |
void cs_reco_cw_vgrd_wbs_from_pvc | ( | const cs_cell_mesh_t * | cm, |
const cs_real_t * | pot, | ||
cs_cell_builder_t * | cb, | ||
cs_real_t * | vgrd | ||
) |
Compute the weighted (by volume) gradient inside a given primal cell for the related vertices. Use the WBS algo. for approximating the gradient. The computation takes into account a subdivision into tetrahedra of the current cell based on p_{ef,c}.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | pot | values of the potential fields at vertices + cell |
[in,out] | cb | auxiliary structure for computing the flux |
[in,out] | vgrd | gradient at vertices inside this cell |
void cs_reco_dfbyc_at_cell_center | ( | cs_lnum_t | c_id, |
const cs_adjacency_t * | c2e, | ||
const cs_cdo_quantities_t * | quant, | ||
const double * | array, | ||
cs_real_3_t | val_xc | ||
) |
Reconstruct a constant vector at the cell center from an array of values defined on dual faces lying inside each cell. This array is scanned thanks to the c2e connectivity.
[in] | c_id | cell id |
[in] | c2e | cell -> edges connectivity |
[in] | quant | pointer to the additional quantities struct. |
[in] | array | pointer to the array of values |
[in,out] | val_xc | value of the reconstruction at the cell center |
void cs_reco_dfbyc_in_cell | ( | const cs_cell_mesh_t * | cm, |
const cs_real_t * | array, | ||
cs_real_3_t | val_c | ||
) |
Reconstruct a constant vector inside the cell c. array is scanned thanks to the c2e connectivity. Pointer is already located at the beginning of the cell sequence. Reconstruction used is based on DGA (stabilization = 1/d where d is the space dimension)
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | array | local pointer to the array of values |
[in,out] | val_c | value of the reconstructed vector in the cell |
void cs_reco_dfbyc_in_pec | ( | const cs_cell_mesh_t * | cm, |
short int | e, | ||
const cs_real_t * | array, | ||
cs_real_3_t | val_pec | ||
) |
Reconstruct a constant vector inside pec which is a volume surrounding the edge e inside the cell c. array is scanned thanks to the c2e connectivity. Pointer is already located at the beginning of the cell sequence. Reconstruction used is based on DGA (stabilization = 1/d where d is the space dimension)
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | e | local edge id |
[in] | array | local pointer to the array of values |
[in,out] | val_pec | value of the reconstruction in pec |
|
inlinestatic |
Reconstruct the value at the face center from an array of values defined on primal vertices.
[in] | fm | pointer to cs_face_mesh_t structure |
[in] | p_v | pointer to an array of values (local to this face) |
void cs_reco_grad_cell_from_pv | ( | cs_lnum_t | c_id, |
const cs_cdo_connect_t * | connect, | ||
const cs_cdo_quantities_t * | quant, | ||
const cs_real_t * | pdi, | ||
cs_real_t | val_xc[] | ||
) |
Reconstruct the value at the cell center of the gradient of a field defined on primal vertices.
[in] | c_id | cell id |
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to the additional quantities struct. |
[in] | pdi | pointer to the array of values |
[in,out] | val_xc | value of the reconstructed gradient at cell center |
void cs_reco_pf_from_pv | ( | cs_lnum_t | f_id, |
const cs_cdo_connect_t * | connect, | ||
const cs_cdo_quantities_t * | quant, | ||
const double * | pdi, | ||
cs_real_t * | pdi_f | ||
) |
Reconstruct the value at the face center from an array of values defined on primal vertices.
[in] | f_id | face id (interior and border faces) |
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to the additional quantities struct. |
[in] | pdi | pointer to the array of values |
[in,out] | pdi_f | value of the reconstruction at the face center |
void cs_reco_pv_at_cell_center | ( | cs_lnum_t | c_id, |
const cs_adjacency_t * | c2v, | ||
const cs_cdo_quantities_t * | quant, | ||
const double * | array, | ||
cs_real_t * | val_xc | ||
) |
Reconstruct the value at the cell center from an array of values defined on primal vertices.
[in] | c_id | cell id |
[in] | c2v | cell -> vertices connectivity |
[in] | quant | pointer to the additional quantities struct. |
[in] | array | pointer to the array of values |
[in,out] | val_xc | value of the reconstruction at the cell center |
void cs_reco_pv_at_cell_centers | ( | const cs_adjacency_t * | c2v, |
const cs_cdo_quantities_t * | quant, | ||
const double * | array, | ||
cs_real_t * | val_xc | ||
) |
Reconstruct the value at all cell centers from an array of values defined on primal vertices.
[in] | c2v | cell -> vertices connectivity |
[in] | quant | pointer to the additional quantities struct. |
[in] | array | pointer to the array of values |
[in,out] | val_xc | values of the reconstruction at the cell center |
void cs_reco_vect_pv_at_cell_centers | ( | const cs_adjacency_t * | c2v, |
const cs_cdo_quantities_t * | quant, | ||
const double * | array, | ||
cs_real_t * | val_xc | ||
) |
Reconstruct the value at all cell centers from an array of values defined on primal vertices. Case of vector-valued fields.
[in] | c2v | cell -> vertices connectivity |
[in] | quant | pointer to the additional quantities struct. |
[in] | array | pointer to the array of values |
[in,out] | val_xc | values of the reconstruction at the cell center |
void cs_reco_vect_pv_from_pc | ( | const cs_adjacency_t * | c2v, |
const cs_cdo_quantities_t * | quant, | ||
const double * | val, | ||
cs_real_t * | reco_val | ||
) |
Reconstruct a vector-valued array at vertices from a vector-valued array at cells.
[in] | c2v | cell -> vertices connectivity |
[in] | quant | pointer to the additional quantities struct. |
[in] | val | pointer to the array of values |
[in,out] | reco_val | values of the reconstruction at vertices |