![]() |
programmer's documentation
|
#include "cs_defs.h"
#include <assert.h>
#include <math.h>
#include <bft_mem.h>
#include "cs_cdo_toolbox.h"
#include "cs_reco.h"
Functions | |
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_conf_grdc (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_lnum_t c_id, cs_real_3_t *grdc) |
Compute for each p_{f,c} the value of the gradient of the Lagrange shape function attached to x_c. More... | |
void | cs_reco_cost_edge_dof (cs_lnum_t cid, cs_lnum_t e1_id, const cs_connect_index_t *c2e, const cs_cdo_quantities_t *quant, const double *dof, double reco[]) |
Reconstruct by a constant vector a field of edge-based DoFs in a volume surrounding an edge. More... | |
void | cs_reco_pv_at_cell_center (cs_lnum_t c_id, const cs_connect_index_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_dfbyc_at_cell_center (cs_lnum_t c_id, const cs_connect_index_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_pec (cs_lnum_t c_id, cs_lnum_t e_id, const cs_connect_index_t *c2e, const cs_cdo_quantities_t *quant, const double *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. 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_connect_index_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... | |
Variables | |
static const double | invdim = 1./3. |
void cs_reco_ccen_edge_dof | ( | cs_lnum_t | cid, |
const cs_connect_index_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_conf_grdc | ( | const cs_cdo_connect_t * | connect, |
const cs_cdo_quantities_t * | quant, | ||
cs_lnum_t | c_id, | ||
cs_real_3_t * | grdc | ||
) |
Compute for each p_{f,c} the value of the gradient of the Lagrange shape function attached to x_c.
[in] | connect | pointer to the connectivity struct. |
[in] | quant | pointer to the additional quantities struct. |
[in] | c_id | cell id |
[in,out] | grdc | allocated buffer of size 3*n_max_fbyc |
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_cost_edge_dof | ( | cs_lnum_t | cid, |
cs_lnum_t | e1_id, | ||
const cs_connect_index_t * | c2e, | ||
const cs_cdo_quantities_t * | quant, | ||
const double * | dof, | ||
double | reco[] | ||
) |
Reconstruct by a constant vector a field of edge-based DoFs in a volume surrounding an edge.
[in] | cid | cell id |
[in] | e1_id | sub-volume related to this edge 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 in this sub-volume |
void cs_reco_dfbyc_at_cell_center | ( | cs_lnum_t | c_id, |
const cs_connect_index_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_pec | ( | cs_lnum_t | c_id, |
cs_lnum_t | e_id, | ||
const cs_connect_index_t * | c2e, | ||
const cs_cdo_quantities_t * | quant, | ||
const double * | 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. Reconstruction used is based on DGA (stabilization = 1/d where d is the space dimension)
[in] | c_id | cell id |
[in] | e_id | edge 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_pec | value of the reconstruction in pec |
void cs_reco_pv_at_cell_center | ( | cs_lnum_t | c_id, |
const cs_connect_index_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 |
|
static |