Management of mesh quantities. More...
#include "cs_defs.h"#include <math.h>#include <float.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <assert.h>#include "bft_mem.h"#include "bft_error.h"#include "bft_printf.h"#include "cs_array.h"#include "cs_base.h"#include "cs_halo_perio.h"#include "cs_log.h"#include "cs_math.h"#include "cs_mesh.h"#include "cs_mesh_adjacencies.h"#include "cs_porosity_from_scan.h"#include "cs_post.h"#include "fvm_nodal_from_desc.h"#include "fvm_nodal_order.h"#include "cs_mesh_quantities.h" Include dependency graph for cs_mesh_quantities.c:
 Include dependency graph for cs_mesh_quantities.c:| Functions | |
| int | cs_mesh_quantities_cell_cen_choice (int algo_choice) | 
| Query or modification of the option for computing cell centers.  More... | |
| int | cs_mesh_quantities_face_cog_choice (int algo_choice) | 
| Query or modification of the option for computing face centers.  More... | |
| cs_mesh_quantities_t * | cs_mesh_quantities_create (void) | 
| Create a mesh quantities structure.  More... | |
| cs_mesh_quantities_t * | cs_mesh_quantities_destroy (cs_mesh_quantities_t *mq) | 
| Destroy a mesh quantities structure.  More... | |
| void | cs_mesh_quantities_free_all (cs_mesh_quantities_t *mq) | 
| Reset a mesh quantities structure to its empty initial state.  More... | |
| void | cs_mesh_quantities_compute_preprocess (const cs_mesh_t *m, cs_mesh_quantities_t *mq) | 
| Compute mesh quantities needed for preprocessing.  More... | |
| void | cs_mesh_quantities_solid_compute (const cs_mesh_t *m, const cs_real_3_t *cen_points, cs_mesh_quantities_t *mq) | 
| Compute cell and faces quantities needed at the immersed boundaries.  More... | |
| void | cs_mesh_quantities_compute (const cs_mesh_t *m, cs_mesh_quantities_t *mq) | 
| Compute mesh quantities.  More... | |
| void | cs_mesh_quantities_fluid_compute (const cs_mesh_t *mesh, cs_mesh_quantities_t *mesh_quantities) | 
| void | cs_mesh_quantities_fluid_vol_reductions (const cs_mesh_t *mesh, cs_mesh_quantities_t *mesh_quantities) | 
| void | cs_mesh_init_fluid_sections (const cs_mesh_t *mesh, cs_mesh_quantities_t *mesh_quantities) | 
| void | cs_mesh_quantities_sup_vectors (const cs_mesh_t *mesh, cs_mesh_quantities_t *mesh_quantities) | 
| void | cs_mesh_quantities_face_normal (const cs_mesh_t *mesh, cs_real_t *p_i_face_normal[], cs_real_t *p_b_face_normal[]) | 
| void | cs_mesh_quantities_i_faces (const cs_mesh_t *mesh, cs_real_t *p_i_face_cog[], cs_real_t *p_i_face_normal[]) | 
| void | cs_mesh_quantities_b_faces (const cs_mesh_t *mesh, cs_real_t *p_b_face_cog[], cs_real_t *p_b_face_normal[]) | 
| void | cs_mesh_quantities_cell_faces_cog (const cs_mesh_t *mesh, const cs_real_t i_face_norm[], const cs_real_t i_face_cog[], const cs_real_t b_face_norm[], const cs_real_t b_face_cog[], cs_real_t cell_cen[]) | 
| Compute approximate cells centers as the mean of the given face centers weighted by the associated surfaces.  More... | |
| cs_real_t * | cs_mesh_quantities_cell_volume (const cs_mesh_t *mesh) | 
| void | cs_mesh_quantities_check_vol (const cs_mesh_t *mesh, const cs_mesh_quantities_t *mesh_quantities, int allow_error) | 
| cs_real_6_t * | cs_mesh_quantities_cell_extents (const cs_mesh_t *m, cs_real_t tolerance) | 
| Compute the bounding box for cells.  More... | |
| int | cs_mesh_quantities_compute_count (void) | 
| void | cs_mesh_quantities_b_thickness_v (const cs_mesh_t *m, const cs_mesh_quantities_t *mq, int n_passes, cs_real_t b_thickness[]) | 
| Determine local boundary thickness around each vertex.  More... | |
| void | cs_mesh_quantities_b_thickness_f (const cs_mesh_t *m, const cs_mesh_quantities_t *mq, int n_passes, cs_real_t b_thickness[]) | 
| Determine local boundary thickness around each boundary face.  More... | |
| void | cs_mesh_quantities_compute_face_quantities (cs_lnum_t n_faces, const cs_real_t vtx_coord[][3], const cs_lnum_t face_vtx_idx[], const cs_lnum_t face_vtx[], cs_real_t face_cog[][3], cs_real_t face_normal[][3]) | 
| void | cs_mesh_quantities_log_setup (void) | 
| Log mesh quantities options to setup file.  More... | |
| void | cs_mesh_quantities_dump (const cs_mesh_t *mesh, const cs_mesh_quantities_t *mesh_quantities) | 
Management of mesh quantities.
Please refer to the geometric quantities section of the theory guide for more informations.
| void cs_mesh_init_fluid_sections | ( | const cs_mesh_t * | mesh, | 
| cs_mesh_quantities_t * | mesh_quantities | ||
| ) | 
| void cs_mesh_quantities_b_faces | ( | const cs_mesh_t * | mesh, | 
| cs_real_t * | p_b_face_cog[], | ||
| cs_real_t * | p_b_face_normal[] | ||
| ) | 
| void cs_mesh_quantities_b_thickness_f | ( | const cs_mesh_t * | m, | 
| const cs_mesh_quantities_t * | mq, | ||
| int | n_passes, | ||
| cs_real_t | b_thickness[] | ||
| ) | 
Determine local boundary thickness around each boundary face.
| [in] | m | pointer to mesh structure | 
| [in] | mq | pointer to mesh quantities structures. | 
| [in] | n_passes | number of optional smoothing passes | 
| [out] | b_thickness | thickness for each mesh boundary face | 
| void cs_mesh_quantities_b_thickness_v | ( | const cs_mesh_t * | m, | 
| const cs_mesh_quantities_t * | mq, | ||
| int | n_passes, | ||
| cs_real_t | b_thickness[] | ||
| ) | 
Determine local boundary thickness around each vertex.
| [in] | m | pointer to mesh structure | 
| [in] | mq | pointer to mesh quantities structures. | 
| [in] | n_passes | number of smoothing passes | 
| [out] | b_thickness | thickness for each mesh vertex (0 at non-boundary vertices) | 
| int cs_mesh_quantities_cell_cen_choice | ( | int | algo_choice | ) | 
Query or modification of the option for computing cell centers.
| [in] | algo_choice | < 0 : query 0 : computation based on face centers (default) 1 : computation by cell sub-volumes | 
| cs_real_6_t* cs_mesh_quantities_cell_extents | ( | const cs_mesh_t * | m, | 
| cs_real_t | tolerance | ||
| ) | 
Compute the bounding box for cells.
The corresponding array is allocated by this function, and it is the caller's responsability to free it when they are no longer needed.
| [in] | m | pointer to mesh structure | 
| [in] | tolerance | addition to local extents of each element: extent = base_extent * (1 + tolerance) | 
| void cs_mesh_quantities_cell_faces_cog | ( | const cs_mesh_t * | mesh, | 
| const cs_real_t | i_face_norm[], | ||
| const cs_real_t | i_face_cog[], | ||
| const cs_real_t | b_face_norm[], | ||
| const cs_real_t | b_face_cog[], | ||
| cs_real_t | cell_cen[] | ||
| ) | 
Compute approximate cells centers as the mean of the given face centers weighted by the associated surfaces.
n-1 Sum Surf(Fi) G(Fi) i=0 G(C) = --------------------— n-1 Sum Surf(Fi) i=0
| [in] | mesh | pointer to mesh structure | 
| [in] | i_face_norm | surface normal of internal faces | 
| [in] | i_face_cog | center of gravity of internal faces | 
| [in] | b_face_norm | surface normal of border faces | 
| [in] | b_face_cog | center of gravity of border faces | 
| [out] | cell_cen | cell centers | 
| void cs_mesh_quantities_check_vol | ( | const cs_mesh_t * | mesh, | 
| const cs_mesh_quantities_t * | mesh_quantities, | ||
| int | allow_error | ||
| ) | 
| void cs_mesh_quantities_compute | ( | const cs_mesh_t * | m, | 
| cs_mesh_quantities_t * | mq | ||
| ) | 
Compute mesh quantities.
| [in] | m | pointer to mesh structure | 
| [in,out] | mq | pointer to mesh quantities structures. | 
| int cs_mesh_quantities_compute_count | ( | void | ) | 
| void cs_mesh_quantities_compute_face_quantities | ( | cs_lnum_t | n_faces, | 
| const cs_real_t | vtx_coord[][3], | ||
| const cs_lnum_t | face_vtx_idx[], | ||
| const cs_lnum_t | face_vtx[], | ||
| cs_real_t | face_cog[][3], | ||
| cs_real_t | face_normal[][3] | ||
| ) | 
| void cs_mesh_quantities_compute_preprocess | ( | const cs_mesh_t * | m, | 
| cs_mesh_quantities_t * | mq | ||
| ) | 
Compute mesh quantities needed for preprocessing.
| [in] | m | pointer to mesh structure | 
| [in,out] | mq | pointer to mesh quantities structures. | 
| cs_mesh_quantities_t* cs_mesh_quantities_create | ( | void | ) | 
Create a mesh quantities structure.
| cs_mesh_quantities_t* cs_mesh_quantities_destroy | ( | cs_mesh_quantities_t * | mq | ) | 
Destroy a mesh quantities structure.
| [in] | mq | pointer to mesh quantities structures | 
| void cs_mesh_quantities_dump | ( | const cs_mesh_t * | mesh, | 
| const cs_mesh_quantities_t * | mesh_quantities | ||
| ) | 
| int cs_mesh_quantities_face_cog_choice | ( | int | algo_choice | ) | 
Query or modification of the option for computing face centers.
| [in] | algo_choice | < 0 : query 0 : standard computation 1 : use adjustment for volume from versions 1.1 to 5.3 | 
| void cs_mesh_quantities_face_normal | ( | const cs_mesh_t * | mesh, | 
| cs_real_t * | p_i_face_normal[], | ||
| cs_real_t * | p_b_face_normal[] | ||
| ) | 
| void cs_mesh_quantities_fluid_compute | ( | const cs_mesh_t * | mesh, | 
| cs_mesh_quantities_t * | mesh_quantities | ||
| ) | 
| void cs_mesh_quantities_fluid_vol_reductions | ( | const cs_mesh_t * | mesh, | 
| cs_mesh_quantities_t * | mesh_quantities | ||
| ) | 
| void cs_mesh_quantities_free_all | ( | cs_mesh_quantities_t * | mq | ) | 
Reset a mesh quantities structure to its empty initial state.
| [in] | mq | pointer to mesh quantities structures | 
| void cs_mesh_quantities_i_faces | ( | const cs_mesh_t * | mesh, | 
| cs_real_t * | p_i_face_cog[], | ||
| cs_real_t * | p_i_face_normal[] | ||
| ) | 
| void cs_mesh_quantities_log_setup | ( | void | ) | 
Log mesh quantities options to setup file.
| void cs_mesh_quantities_solid_compute | ( | const cs_mesh_t * | m, | 
| const cs_real_3_t * | cen_points, | ||
| cs_mesh_quantities_t * | mq | ||
| ) | 
Compute cell and faces quantities needed at the immersed boundaries.
| [in] | m | pointer to mesh structure | 
| [in] | cen_points | point belonging to the immersed solid plane for each cell (or NULL) | 
| [in,out] | mq | pointer to mesh quantities structure | 
| void cs_mesh_quantities_sup_vectors | ( | const cs_mesh_t * | mesh, | 
| cs_mesh_quantities_t * | mesh_quantities | ||
| ) |