My Project
programmer's documentation
|
Macros | |
#define | CS_SCHEME_GEOMETRY_DBG 0 |
#define | _dp3 cs_math_3_dot_product |
Functions | |
static void | _get_wvf_pefcvol (short int f, const cs_cell_mesh_t *cm, const double hf_coef, const double f_coef, cs_real_t *wvf, cs_real_t *pefc_vol) |
Compute for a face the weight related to each vertex w_{v,f} This weight is equal to |dc(v) cap f|/|f| so that the sum of the weights is equal to 1. Compute also the volume pefc attached to each edge of the face. More... | |
static void | _add_tria_to_covariance (const cs_real_t x1[3], const cs_real_t x2[3], const cs_real_t x3[3], const cs_nvec3_t ax, const cs_nvec3_t ay, const cs_real_t center[3], cs_real_t area, cs_real_t tensor[3]) |
Update the covariance tensor with the contribution of the current triangle. More... | |
static void | _add_tetra_to_inertia2 (const cs_real_t x1[3], const cs_real_t x2[3], const cs_real_t x3[3], const cs_real_t x4[3], const cs_real_t center[3], cs_real_t vol, cs_real_33_t tensor) |
Update the computation of the inertia tensor with the contribution of a tetrahedron. More... | |
static void | _add_tetra_to_inertia3 (const cs_real_t x1[3], const cs_real_t x2[3], const cs_real_t x3[3], const cs_real_t x4[3], const cs_real_t center[3], cs_real_t vol, cs_real_33_t tensor) |
Update the computation of the inertia tensor with the contribution of a tetrahedron. More... | |
static void | _add_tetra_to_inertia (const cs_real_t x1[3], const cs_real_t x2[3], const cs_real_t x3[3], const cs_real_t x4[3], const cs_real_t center[3], cs_real_t vol, cs_real_33_t tensor) |
Update the computation of the inertia tensor with the contribution of a tetrahedron Ref.: F. Tonon "Explicit exact formulas for the 3D tetrahedron
inertia tensor in terms of its vertex coordinates" (2004) J. of Mathematics and Statistics. More... | |
void | cs_compute_face_covariance_tensor (const cs_cell_mesh_t *cm, short int f, const cs_nvec3_t ax, const cs_nvec3_t ay, const cs_real_t center[3], cs_real_t cov[3]) |
Compute the inertial matrix of a cell with respect to the point called "center". This computation is performed exactly thanks to quadrature based on a "tetrahedrization" of the cell. More... | |
void | cs_compute_inertia_tensor (const cs_cell_mesh_t *cm, const cs_real_t center[3], cs_real_t inertia[3][3]) |
Compute the inertial matrix of a cell with respect to the point called "center". This computation is performed exactly thanks to quadrature based on a "tetrahedrization" of the cell. More... | |
void | cs_compute_grd_ve (const short int v1, const short int v2, const cs_nvec3_t deq, const cs_real_3_t uvc[], const cs_real_t lvc[], cs_real_t *grd_v1, cs_real_t *grd_v2) |
Compute the gradient of a Lagrange hat function related to primal vertices in a p_{ef,c} subvolume of a cell c where e is an edge belonging to the face f with vertices v1 and v2. More... | |
double | cs_compute_fwbs_q1 (short int f, const cs_cell_mesh_t *cm, cs_real_t *wvf, cs_real_t *pefc_vol) |
Compute for a face the weight related to each vertex w_{v,f} This weight is equal to |dc(v) cap f|/|f| so that the sum of the weights is equal to 1. Compute also the volume pefc attached to each edge of the face wvf should be allocated to n_max_vbyc and pefc_vol to n_max_ebyf. More... | |
void | cs_compute_fwbs_q2 (short int f, const cs_cell_mesh_t *cm, cs_real_3_t grd_c, cs_real_t *wvf, cs_real_t *pefc_vol) |
Compute for a face the weight related to each vertex w_{v,f} This weight is equal to |dc(v) cap f|/|f| so that the sum of the weights is equal to 1. Compute also the volume pefc attached to each edge of the face wvf should be allocated to n_max_vbyc and pefc_vol to n_max_ebyf. More... | |
double | cs_compute_fwbs_q3 (short int f, const cs_cell_mesh_t *cm, cs_real_3_t grd_c, cs_real_t *wvf, cs_real_t *pefc_vol) |
Compute for a face the weight related to each vertex w_{v,f} This weight is equal to |dc(v) cap f|/|f| so that the sum of the weights is equal to 1. Compute also the volume pefc attached to each edge of the face wvf should be allocated to n_max_vbyc and pefc_vol to n_max_ebyf. More... | |
#define _dp3 cs_math_3_dot_product |
#define CS_SCHEME_GEOMETRY_DBG 0 |
|
inlinestatic |
Update the computation of the inertia tensor with the contribution of a tetrahedron Ref.: F. Tonon "Explicit exact formulas for the 3D tetrahedron inertia tensor in terms of its vertex coordinates" (2004) J. of Mathematics and Statistics.
[in] | x1 | 1st vertex coordinate |
[in] | x2 | 2nd vertex coordinate |
[in] | x3 | 3rd vertex coordinate |
[in] | x4 | 4th vertex coordinate |
[in] | center | center used for the computation |
[in] | vol | volume of the tetrahedron |
[in,out] | tensor | inertia tensor to update |
|
inlinestatic |
Update the computation of the inertia tensor with the contribution of a tetrahedron.
[in] | x1 | 1st vertex coordinate |
[in] | x2 | 2nd vertex coordinate |
[in] | x3 | 3rd vertex coordinate |
[in] | x4 | 4th vertex coordinate |
[in] | center | center used for the computation |
[in] | vol | volume of the tetrahedron |
[in,out] | tensor | inertia tensor to update |
|
inlinestatic |
Update the computation of the inertia tensor with the contribution of a tetrahedron.
[in] | x1 | 1st vertex coordinate |
[in] | x2 | 2nd vertex coordinate |
[in] | x3 | 3rd vertex coordinate |
[in] | x4 | 4th vertex coordinate |
[in] | center | center used for the computation |
[in] | vol | volume of the tetrahedron |
[in,out] | tensor | inertia tensor to update |
|
inlinestatic |
Update the covariance tensor with the contribution of the current triangle.
[in] | x1 | 1st vertex coordinate |
[in] | x2 | 2nd vertex coordinate |
[in] | x3 | 3rd vertex coordinate |
[in] | ax | main X-axis for the face-related coordinate system |
[in] | ay | main Y-axis for the face-related coordinate system |
[in] | center | center used for the computation |
[in] | area | area of the triangle |
[in,out] | tensor | covariance tensor to update |
|
inlinestatic |
Compute for a face the weight related to each vertex w_{v,f} This weight is equal to |dc(v) cap f|/|f| so that the sum of the weights is equal to 1. Compute also the volume pefc attached to each edge of the face.
[in] | f | id of the face in the cell-wise numbering |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | hf_coef | coefficient related to the height of p_{f,c} |
[in] | f_coef | coefficient related to the area of f |
[in,out] | wvf | pointer to an array storing the weight/vertex |
[in,out] | pefc_vol | pointer to an array storing the volume of pefc |
void cs_compute_face_covariance_tensor | ( | const cs_cell_mesh_t * | cm, |
short int | f, | ||
const cs_nvec3_t | ax, | ||
const cs_nvec3_t | ay, | ||
const cs_real_t | center[3], | ||
cs_real_t | cov[3] | ||
) |
Compute the inertial matrix of a cell with respect to the point called "center". This computation is performed exactly thanks to quadrature based on a "tetrahedrization" of the cell.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | f | id of the face in the cell numbering |
[in] | ax | main X-axis for the face-related coordinate system |
[in] | ay | main Y-axis for the face-related coordinate system |
[in] | center | coordinates of the face center |
[in,out] | cov | 2x2 symmetric covariance matrix to compute |
double cs_compute_fwbs_q1 | ( | short int | f, |
const cs_cell_mesh_t * | cm, | ||
cs_real_t * | wvf, | ||
cs_real_t * | pefc_vol | ||
) |
Compute for a face the weight related to each vertex w_{v,f} This weight is equal to |dc(v) cap f|/|f| so that the sum of the weights is equal to 1. Compute also the volume pefc attached to each edge of the face wvf should be allocated to n_max_vbyc and pefc_vol to n_max_ebyf.
[in] | f | id of the face in the cell-wise numbering |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | wvf | pointer to an array storing the weight/vertex |
[in,out] | pefc_vol | pointer to an array storing the volume of pefc |
void cs_compute_fwbs_q2 | ( | short int | f, |
const cs_cell_mesh_t * | cm, | ||
cs_real_3_t | grd_c, | ||
cs_real_t * | wvf, | ||
cs_real_t * | pefc_vol | ||
) |
Compute for a face the weight related to each vertex w_{v,f} This weight is equal to |dc(v) cap f|/|f| so that the sum of the weights is equal to 1. Compute also the volume pefc attached to each edge of the face wvf should be allocated to n_max_vbyc and pefc_vol to n_max_ebyf.
[in] | f | id of the face in the cell-wise numbering |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | grd_c | gradient of the Lagrange function related to xc |
[in,out] | wvf | pointer to an array storing the weight/vertex |
[in,out] | pefc_vol | pointer to an array storing the volume of pefc |
double cs_compute_fwbs_q3 | ( | short int | f, |
const cs_cell_mesh_t * | cm, | ||
cs_real_3_t | grd_c, | ||
cs_real_t * | wvf, | ||
cs_real_t * | pefc_vol | ||
) |
Compute for a face the weight related to each vertex w_{v,f} This weight is equal to |dc(v) cap f|/|f| so that the sum of the weights is equal to 1. Compute also the volume pefc attached to each edge of the face wvf should be allocated to n_max_vbyc and pefc_vol to n_max_ebyf.
[in] | f | id of the face in the cell-wise numbering |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | grd_c | gradient of the Lagrange function related to xc |
[in,out] | wvf | pointer to an array storing the weight/vertex |
[in,out] | pefc_vol | pointer to an array storing the volume of pefc |
void cs_compute_grd_ve | ( | const short int | v1, |
const short int | v2, | ||
const cs_nvec3_t | deq, | ||
const cs_real_3_t | uvc[], | ||
const cs_real_t | lvc[], | ||
cs_real_t * | grd_v1, | ||
cs_real_t * | grd_v2 | ||
) |
Compute the gradient of a Lagrange hat function related to primal vertices in a p_{ef,c} subvolume of a cell c where e is an edge belonging to the face f with vertices v1 and v2.
[in] | v1 | number of the first vertex in cell numbering |
[in] | v2 | number of the second vertex in cell numbering |
[in] | deq | dual edge quantities |
[in] | uvc | xc --> xv unit tangent vector |
[in] | lvc | xc --> xv vector length |
[in,out] | grd_v1 | gradient of Lagrange function related to v1 |
[in,out] | grd_v2 | gradient of Lagrange function related to v2 |
void cs_compute_inertia_tensor | ( | const cs_cell_mesh_t * | cm, |
const cs_real_t | center[3], | ||
cs_real_t | inertia[3][3] | ||
) |
Compute the inertial matrix of a cell with respect to the point called "center". This computation is performed exactly thanks to quadrature based on a "tetrahedrization" of the cell.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | center | coordinates of the cell center |
[in,out] | inertia | inertia matrix to compute |