My Project
programmer's documentation
Functions | Variables
cs_cdo_quantities.c File Reference
#include "cs_defs.h"
#include <limits.h>
#include <assert.h>
#include <float.h>
#include <math.h>
#include <string.h>
#include <bft_mem.h>
#include "cs_array_reduce.h"
#include "cs_log.h"
#include "cs_order.h"
#include "cs_parall.h"
#include "cs_param_cdo.h"
#include "cs_prototypes.h"
#include "cs_cdo_quantities.h"
Include dependency graph for cs_cdo_quantities.c:

Functions

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_tcs_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_tcs_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 if2v 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...
 
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...
 

Variables

cs_cdo_quantities_algo_ccenter_t cs_cdo_quantities_cc_algo
 

Function Documentation

◆ cs_cdo_quantities_build()

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.

Parameters
[in]mpointer to a cs_mesh_t structure
[in]mqpointer to a cs_mesh_quantities_t structure
[in]topopointer to a cs_cdo_connect_t structure
Returns
a new allocated pointer to a cs_cdo_quantities_t structure

◆ cs_cdo_quantities_compute_b_tef()

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.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]cdoqpointer to a cs_cdo_quantities_t structure
[in]bf_idborder face id
[in,out]tefquantities to compute (pre-allocated)

◆ cs_cdo_quantities_compute_b_wvf()

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.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]cdoqpointer to a cs_cdo_quantities_t structure
[in]bf_idborder face id
[in,out]wvfquantities to compute (pre-allocated)

◆ cs_cdo_quantities_compute_dual_volumes()

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.

Parameters
[in]cdoqpointer to cs_cdo_quantities_t structure
[in]c2vpointer to the cell-->vertices connectivity
[in,out]dual_voldual volumes related to each vertex

◆ cs_cdo_quantities_compute_i_tef()

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 if2v adjacency structure.

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.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]cdoqpointer to a cs_cdo_quantities_t structure
[in]f_idinterior face id
[in,out]tefquantities to compute (pre-allocated)

◆ cs_cdo_quantities_compute_i_wvf()

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.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]cdoqpointer to a cs_cdo_quantities_t structure
[in]f_idinterior face id
[in,out]wvfquantities to compute (pre-allocated)

◆ cs_cdo_quantities_dump()

void cs_cdo_quantities_dump ( const cs_cdo_quantities_t cdoq)

Dump a cs_cdo_quantities_t structure.

Parameters
[in]cdoqpointer to cs_cdo_quantities_t structure

◆ cs_cdo_quantities_free()

cs_cdo_quantities_t* cs_cdo_quantities_free ( cs_cdo_quantities_t q)

Destroy a cs_cdo_quantities_t structure.

Parameters
[in]qpointer to the cs_cdo_quantities_t struct. to free
Returns
a NULL pointer

◆ cs_cdo_quantities_set_algo_ccenter()

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.

Parameters
[in]algotype of algorithm

◆ cs_cdo_quantities_summary()

void cs_cdo_quantities_summary ( const cs_cdo_quantities_t quant)

Summarize generic information about the cdo mesh quantities.

Parameters
[in]quantpointer to cs_cdo_quantities_t structure

◆ cs_quant_dump()

void cs_quant_dump ( FILE *  f,
cs_lnum_t  num,
const cs_quant_t  q 
)

Dump a cs_quant_t structure.

Parameters
[in]fFILE struct (stdout if NULL)
[in]numentity number related to this quantity struct.
[in]qcs_quant_t structure to dump

◆ cs_quant_set_dedge_nvec()

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.

Parameters
[in]f_shiftposition in c2f_idx
[in]cdoqpointer to a cs_cdo_quantities_t structure
Returns
a pointer to the dual edge normalized vector

◆ cs_quant_set_edge_nvec()

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.

Parameters
[in]e_idid related to an edge
[in]cdoqpointer to a cs_cdo_quantities_t structure
Returns
a pointer to the edge normalized vector

◆ cs_quant_set_face()

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)

Parameters
[in]f_idid related to the face (f_id > n_i_face -> border face)
[in]cdoqpointer to a cs_cdo_quantities_t structure
Returns
a initialize structure

◆ cs_quant_set_face_nvec()

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)

Parameters
[in]f_idid related to the face (f_id > n_i_face -> border face)
[in]cdoqpointer to a cs_cdo_quantities_t structure
Returns
a pointer to the face normalized vector

Variable Documentation

◆ cs_cdo_quantities_cc_algo

cs_cdo_quantities_algo_ccenter_t cs_cdo_quantities_cc_algo
CS_CDO_QUANTITIES_SATURNE_CENTER
Definition: cs_cdo_quantities.h:66