My Project
programmer's documentation
|
#include "cs_base.h"
#include "cs_cdo_connect.h"
#include "cs_flag.h"
#include "cs_math.h"
#include "cs_mesh.h"
#include "cs_mesh_quantities.h"
Go to the source code of this file.
Data Structures | |
struct | cs_quant_info_t |
struct | cs_quant_t |
struct | cs_cdo_quantities_t |
Macros | |
#define | CS_CDO_ORTHO (1 << 0) |
Enumerations | |
enum | cs_cdo_quantities_algo_ccenter_t { CS_CDO_QUANTITIES_MEANV_CENTER, CS_CDO_QUANTITIES_BARYC_CENTER, CS_CDO_QUANTITIES_SATURNE_CENTER, CS_CDO_QUANTITIES_N_CENTER_ALGOS } |
Functions | |
static double | cs_compute_area_from_quant (const cs_quant_t qa, const cs_real_t *xb) |
Compute the area of the triangle of base given by q (related to a segment) with apex located at xa. More... | |
void | cs_cdo_quantities_set_algo_ccenter (cs_cdo_quantities_algo_ccenter_t algo) |
Set the type of algorithm to use for computing the cell center. More... | |
cs_cdo_quantities_t * | cs_cdo_quantities_build (const cs_mesh_t *m, const cs_mesh_quantities_t *mq, const cs_cdo_connect_t *topo) |
Build a cs_cdo_quantities_t structure. More... | |
cs_cdo_quantities_t * | cs_cdo_quantities_free (cs_cdo_quantities_t *q) |
Destroy a cs_cdo_quantities_t structure. More... | |
void | cs_cdo_quantities_summary (const cs_cdo_quantities_t *quant) |
Summarize generic information about the cdo mesh quantities. More... | |
void | cs_cdo_quantities_dump (const cs_cdo_quantities_t *cdoq) |
Dump a cs_cdo_quantities_t structure. More... | |
void | cs_cdo_quantities_compute_dual_volumes (const cs_cdo_quantities_t *cdoq, const cs_adjacency_t *c2v, cs_real_t *dual_vol) |
Compute the dual volume surrounding each vertex. More... | |
void | cs_cdo_quantities_compute_i_tef (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, cs_lnum_t f_id, cs_real_t tef[]) |
Compute the area of the triangles with basis each edge of the face and apex the face center. Case of interior faces. Storage in agreement with the bf2v adjacency structure. More... | |
void | cs_cdo_quantities_compute_b_tef (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, cs_lnum_t bf_id, cs_real_t tef[]) |
Compute the area of the triangles with basis each edge of the face and apex the face center. Case of boundary faces. Storage in agreement with the bf2v adjacency structure. More... | |
void | cs_cdo_quantities_compute_i_wvf (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, cs_lnum_t f_id, cs_real_t wvf[]) |
Compute the weight related to each vertex of a face. This weight ensures a 2nd order approximation if the face center is the face barycenter. Case of interior faces. More... | |
void | cs_cdo_quantities_compute_b_wvf (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, cs_lnum_t bf_id, cs_real_t wvf[]) |
Compute the weight related to each vertex of a face. This weight ensures a 2nd order approximation if the face center is the face barycenter. Case of boundary faces. More... | |
static const cs_real_t * | cs_quant_get_face_vector_area (cs_lnum_t f_id, const cs_cdo_quantities_t *cdoq) |
Retrieve the face vector which the face_area * face_normal for a primal face (interior or border) More... | |
static const cs_real_t * | cs_quant_get_face_center (cs_lnum_t f_id, const cs_cdo_quantities_t *cdoq) |
Retrieve the face center for a primal face (interior or border) More... | |
cs_quant_t | cs_quant_set_face (cs_lnum_t f_id, const cs_cdo_quantities_t *cdoq) |
Define a cs_quant_t structure for a primal face (interior or border) More... | |
cs_nvec3_t | cs_quant_set_face_nvec (cs_lnum_t f_id, const cs_cdo_quantities_t *cdoq) |
Retrieve the face surface and its unit normal vector for a primal face (interior or border) More... | |
cs_nvec3_t | cs_quant_set_edge_nvec (cs_lnum_t e_id, const cs_cdo_quantities_t *cdoq) |
Get the normalized vector associated to a primal edge. More... | |
cs_nvec3_t | cs_quant_set_dedge_nvec (cs_lnum_t f_shift, const cs_cdo_quantities_t *cdoq) |
Get the two normalized vector associated to a dual edge. More... | |
void | cs_quant_dump (FILE *f, cs_lnum_t num, const cs_quant_t q) |
Dump a cs_quant_t structure. More... | |
#define CS_CDO_ORTHO (1 << 0) |
cs_cdo_quantities_t* cs_cdo_quantities_build | ( | const cs_mesh_t * | m, |
const cs_mesh_quantities_t * | mq, | ||
const cs_cdo_connect_t * | topo | ||
) |
Build a cs_cdo_quantities_t structure.
[in] | m | pointer to a cs_mesh_t structure |
[in] | mq | pointer to a cs_mesh_quantities_t structure |
[in] | topo | pointer to a cs_cdo_connect_t structure |
void cs_cdo_quantities_compute_b_tef | ( | const cs_cdo_connect_t * | connect, |
const cs_cdo_quantities_t * | cdoq, | ||
cs_lnum_t | bf_id, | ||
cs_real_t | tef[] | ||
) |
Compute the area of the triangles with basis each edge of the face and apex the face center. Case of boundary faces. Storage in agreement with the bf2v adjacency structure.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | cdoq | pointer to a cs_cdo_quantities_t structure |
[in] | bf_id | border face id |
[in,out] | tef | quantities to compute (pre-allocated) |
void cs_cdo_quantities_compute_b_wvf | ( | const cs_cdo_connect_t * | connect, |
const cs_cdo_quantities_t * | cdoq, | ||
cs_lnum_t | bf_id, | ||
cs_real_t | wvf[] | ||
) |
Compute the weight related to each vertex of a face. This weight ensures a 2nd order approximation if the face center is the face barycenter. Case of boundary faces.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | cdoq | pointer to a cs_cdo_quantities_t structure |
[in] | bf_id | border face id |
[in,out] | wvf | quantities to compute (pre-allocated) |
void cs_cdo_quantities_compute_dual_volumes | ( | const cs_cdo_quantities_t * | cdoq, |
const cs_adjacency_t * | c2v, | ||
cs_real_t * | dual_vol | ||
) |
Compute the dual volume surrounding each vertex.
[in] | cdoq | pointer to cs_cdo_quantities_t structure |
[in] | c2v | pointer to the cell-->vertices connectivity |
[in,out] | dual_vol | dual volumes related to each vertex |
void cs_cdo_quantities_compute_i_tef | ( | const cs_cdo_connect_t * | connect, |
const cs_cdo_quantities_t * | cdoq, | ||
cs_lnum_t | f_id, | ||
cs_real_t | tef[] | ||
) |
Compute the area of the triangles with basis each edge of the face and apex the face center. Case of interior faces. Storage in agreement with the bf2v adjacency structure.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | cdoq | pointer to a cs_cdo_quantities_t structure |
[in] | f_id | interior face id |
[in,out] | tef | quantities to compute (pre-allocated) |
Compute the area of the triangles with basis each edge of the face and apex the face center. Case of interior faces. Storage in agreement with the bf2v adjacency structure.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | cdoq | pointer to a cs_cdo_quantities_t structure |
[in] | f_id | interior face id |
[in,out] | tef | quantities to compute (pre-allocated) |
void cs_cdo_quantities_compute_i_wvf | ( | const cs_cdo_connect_t * | connect, |
const cs_cdo_quantities_t * | cdoq, | ||
cs_lnum_t | f_id, | ||
cs_real_t | wvf[] | ||
) |
Compute the weight related to each vertex of a face. This weight ensures a 2nd order approximation if the face center is the face barycenter. Case of interior faces.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | cdoq | pointer to a cs_cdo_quantities_t structure |
[in] | f_id | interior face id |
[in,out] | wvf | quantities to compute (pre-allocated) |
void cs_cdo_quantities_dump | ( | const cs_cdo_quantities_t * | cdoq | ) |
Dump a cs_cdo_quantities_t structure.
[in] | cdoq | pointer to cs_cdo_quantities_t structure |
cs_cdo_quantities_t* cs_cdo_quantities_free | ( | cs_cdo_quantities_t * | q | ) |
Destroy a cs_cdo_quantities_t structure.
[in] | q | pointer to the cs_cdo_quantities_t struct. to free |
void cs_cdo_quantities_set_algo_ccenter | ( | cs_cdo_quantities_algo_ccenter_t | algo | ) |
Set the type of algorithm to use for computing the cell center.
[in] | algo | type of algorithm |
void cs_cdo_quantities_summary | ( | const cs_cdo_quantities_t * | quant | ) |
Summarize generic information about the cdo mesh quantities.
[in] | quant | pointer to cs_cdo_quantities_t structure |
|
inlinestatic |
Compute the area of the triangle of base given by q (related to a segment) with apex located at xa.
[in] | qa | pointer to a cs_quant_t structure related to a segment |
[in] | xb | coordinates of the apex to consider |
void cs_quant_dump | ( | FILE * | f, |
cs_lnum_t | num, | ||
const cs_quant_t | q | ||
) |
Dump a cs_quant_t structure.
[in] | f | FILE struct (stdout if NULL) |
[in] | num | entity number related to this quantity struct. |
[in] | q | cs_quant_t structure to dump |
|
inlinestatic |
Retrieve the face center for a primal face (interior or border)
[in] | f_id | id related to the face (f_id > n_i_face -> border face) |
[in] | cdoq | pointer to a cs_cdo_quantities_t structure |
|
inlinestatic |
Retrieve the face vector which the face_area * face_normal for a primal face (interior or border)
[in] | f_id | id related to the face (f_id > n_i_face -> border face) |
[in] | cdoq | pointer to a cs_cdo_quantities_t structure |
cs_nvec3_t cs_quant_set_dedge_nvec | ( | cs_lnum_t | f_shift, |
const cs_cdo_quantities_t * | cdoq | ||
) |
Get the two normalized vector associated to a dual edge.
[in] | f_shift | position in c2f_idx |
[in] | cdoq | pointer to a cs_cdo_quantities_t structure |
cs_nvec3_t cs_quant_set_edge_nvec | ( | cs_lnum_t | e_id, |
const cs_cdo_quantities_t * | cdoq | ||
) |
Get the normalized vector associated to a primal edge.
[in] | e_id | id related to an edge |
[in] | cdoq | pointer to a cs_cdo_quantities_t structure |
cs_quant_t cs_quant_set_face | ( | cs_lnum_t | f_id, |
const cs_cdo_quantities_t * | cdoq | ||
) |
Define a cs_quant_t structure for a primal face (interior or border)
[in] | f_id | id related to the face (f_id > n_i_face -> border face) |
[in] | cdoq | pointer to a cs_cdo_quantities_t structure |
cs_nvec3_t cs_quant_set_face_nvec | ( | cs_lnum_t | f_id, |
const cs_cdo_quantities_t * | cdoq | ||
) |
Retrieve the face surface and its unit normal vector for a primal face (interior or border)
[in] | f_id | id related to the face (f_id > n_i_face -> border face) |
[in] | cdoq | pointer to a cs_cdo_quantities_t structure |