9.2
general documentation
cs_cdo_quantities.h
Go to the documentation of this file.
1#ifndef CS_CDO_QUANTITIES_H
2#define CS_CDO_QUANTITIES_H
3
4/*============================================================================
5 * Manage geometrical quantities needed in CDO/MAC schemes
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2026 EDF S.A.
12
13 This program is free software; you can redistribute it and/or modify it under
14 the terms of the GNU General Public License as published by the Free Software
15 Foundation; either version 2 of the License, or (at your option) any later
16 version.
17
18 This program is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 details.
22
23 You should have received a copy of the GNU General Public License along with
24 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25 Street, Fifth Floor, Boston, MA 02110-1301, USA.
26*/
27
28/*----------------------------------------------------------------------------*/
29
30/*----------------------------------------------------------------------------
31 * Local headers
32 *----------------------------------------------------------------------------*/
33
34#include "base/cs_base.h"
35#include "base/cs_math.h"
36#include "cdo/cs_cdo_connect.h"
37#include "cdo/cs_flag.h"
38#include "mesh/cs_mesh.h"
40
41/*============================================================================
42 * Macro definitions
43 *============================================================================*/
44
45/*============================================================================
46 * Type definitions
47 *============================================================================*/
48
69typedef enum {
70
75
77
103typedef enum {
104
105 /* Set of geometrical quantities related to CDO schemes */
106
107 CS_CDO_QUANTITIES_EB_SCHEME = 1 << 0, /* = 1 */
108 CS_CDO_QUANTITIES_FB_SCHEME = 1 << 1, /* = 2 */
110 CS_CDO_QUANTITIES_VB_SCHEME = 1 << 3, /* = 8 */
111 CS_CDO_QUANTITIES_VCB_SCHEME = 1 << 4, /* = 16 */
112 CS_CDO_QUANTITIES_CB_SCHEME = 1 << 5, /* = 32 */
113 CS_CDO_QUANTITIES_MAC_SCHEME = 1 << 6, /* = 64 */
114
116
117/* Structure storing information about variation of entities across the
118 mesh for a given type of entity (cell, face and edge) */
119
120typedef struct {
121
122 /* Measure is either a volume for cells, a surface for faces or a length
123 for edges */
124
125 double meas_min; /* Min. value of the entity measure */
126 double meas_max; /* Max. value of the entity measure */
127 double h_min; /* Estimation of the min. value of the diameter */
128 double h_max; /* Estimation of the max. value of the diameter */
129
131
132/* For primal vector quantities (edge or face) */
133
134typedef struct {
135
136 double meas; /* length or area */
137 double unitv[3]; /* unitary vector: tangent or normal to the element */
138 double center[3];
139
140} cs_quant_t;
141
142typedef struct cs_cdo_quantities_t { /* Specific mesh quantities */
143
144 /* Keep the information about the removal of boundary faces in case of 2D
145 computations */
146
148
149 /* Global mesh quantities */
150
151 double vol_tot;
152
153 /* Cell-based quantities */
154 /* ===================== */
155
156 cs_lnum_t n_cells; // Local number of cells
157 cs_gnum_t n_g_cells; // Global number of cells
158 cs_real_3_t *cell_centers; // May be shared according to options
159 cs_real_t *cell_vol; // Can be shared with cs_mesh_quantities_t
160
162
163 /* Face-based quantities */
164 /* ===================== */
165
166 cs_lnum_t n_faces; /* n_i_faces + n_b_faces */
167 cs_lnum_t n_i_faces; /* Local number of interior faces */
168 cs_lnum_t n_b_faces; /* Local number of border faces */
169 cs_gnum_t n_g_faces; /* Global number of faces */
170
171 /* Remark: cs_quant_t structure attached to a face (interior or border) can
172 be built on-the-fly calling the function cdoq.get_face(f_id).
173 See \ref get_face for more details.
174
175 In order to reduce the memory consumption one shares face quantities with
176 the ones defined in the legacy part and stored in the cs_mesh_quantities_t
177 structure that's why a distinction is made between interior and border
178 faces.
179
180 cs_nvec3_t structure associated to a face can also be built on-the-fly
181 using cdoq.get_face_nvec(f_id).
182 See \ref get_face_nvec for more details.
183 */
184
185 cs_nreal_3_t *i_face_u_normal; // Can be shared with cs_mesh_quantities_t
186 cs_real_t *i_face_normal; // Can be shared with cs_mesh_quantities_t
187 cs_real_t *i_face_surf; // Can be shared with cs_mesh_quantities_t
188 cs_real_3_t *i_face_center; // Can be shared with cs_mesh_quantities_t
189 const cs_real_t *i_dist; // Always shared with cs_mesh_quantities_t
190
191 cs_nreal_3_t *b_face_u_normal; // Can be shared with cs_mesh_quantities_t
192 cs_real_t *b_face_normal; // Can be shared with cs_mesh_quantities_t
193 cs_real_t *b_face_surf; // Can be shared with cs_mesh_quantities_t
194 cs_real_3_t *b_face_center; // Can be shared with cs_mesh_quantities_t
195 const cs_real_t *b_dist; // Always shared with cs_mesh_quantities_t
196
197 cs_flag_cartesian_axis_t *face_axis; /* Enum for normal direction of faces
198 * Not always allocated
199 */
200
201 /* Remark: cs_nvec3_t structure attached to a dual edge can be built
202 on-the-fly to access to its length and its unit tangential vector using
203 the function cdoq.get_dedge_nvec(shift)
204
205 One recalls that a dual edge is associated to a primal face and is shared
206 with two cells for an interior face and shared with one cell for a
207 boundary face. Scan this quantity with the c2f connectivity.
208 */
209
210 cs_real_t *dedge_vector; /* Allocation to 3*c2f->idx[n_faces] */
211
212 cs_real_t *pvol_fc; /* Portion of volume surrounding a face
213 * in each cell. This is a pyramid of
214 * base the face and apex the cell center
215 * Scanned with the c2f adjacency.
216 * Not always allocated.
217 */
219
220 /* Edge-based quantities */
221 /* ===================== */
222
223 cs_lnum_t n_edges; /* Local number of edges */
224 cs_gnum_t n_g_edges; /* Global number of edges */
225
226 cs_real_t *edge_vector; /* Allocation to 3*n_edges
227 Norm of the vector is equal to the
228 distance between two vertices.
229 Unit vector is the tangential direction
230 attached to the edge */
231
232 /* For each edge e belonging to a cell c, the dual face is built from the
233 contributions of two triangles s(x_c, x_f, x_e) and s(x_c, x_f', x_e) with
234 the faces f and f' belonging to F_e \cap F_c
235 Scan this quantity with the c2e connectivity */
236
237 cs_real_t *dface_normal; /* Vector-valued normal for each dual face
238 * inside a cell associated to an edge */
239 cs_real_t *pvol_ec; /* Portion of volume surrounding an edge
240 * in each cell. Scanned with the c2e
241 * adjacency.
242 * Not always allocated. */
243
245
246 /* Vertex-based quantities */
247 /* ======================= */
248
249 cs_lnum_t n_vertices; /* Local number of vertices */
250 cs_gnum_t n_g_vertices; /* Global number of vertices */
251
252 cs_real_t *pvol_vc; /* Part of the dual cell associated to a
253 * vertex in each cell. These quantities
254 * are scanned thanks to the c2v
255 * adjacency structure */
256
257 const cs_real_t *vtx_coord; /* Coordinates of the mesh vertices.
258 * Always shared with the global cs_mesh_t
259 * structure */
260
261 /* Dual volume related to the dual cell associated in a one-to-one pairing to
262 * each vertex. This quantity has been synchronized in case of parallel
263 * computing. Size of the array = n_vertices. Not always allocated */
264
266
267 /*----------------------------------------------------------------------------*/
275 /*----------------------------------------------------------------------------*/
276
277 inline cs_real_t
278 get_face_surf(const cs_lnum_t f_id) const
279 {
280 return (f_id < this->n_i_faces) ? this->i_face_surf[f_id]
281 : this->b_face_surf[f_id - this->n_i_faces];
282 };
283
284 /*----------------------------------------------------------------------------*/
292 /*----------------------------------------------------------------------------*/
293
294 inline cs_real_t
295 get_bface_surf(const cs_lnum_t bf_id) const
296 {
297 assert(bf_id >= 0 && bf_id < this->n_b_faces);
298 return this->b_face_surf[bf_id];
299 };
300
301 /*----------------------------------------------------------------------------*/
309 /*----------------------------------------------------------------------------*/
310
311 inline const cs_nreal_t *
313 {
314 assert(bf_id >= 0 && bf_id < this->n_b_faces);
315 return this->b_face_u_normal[bf_id];
316 };
317
318 /*----------------------------------------------------------------------------*/
328 /*----------------------------------------------------------------------------*/
329
330 inline const cs_real_t *
332 {
333 if (f_id < this->n_i_faces) /* Interior face */
334 return this->i_face_normal + 3 * f_id;
335 else /* Border face */
336 return this->b_face_normal + 3 * (f_id - this->n_i_faces);
337 };
338
339 /*----------------------------------------------------------------------------*/
348 /*----------------------------------------------------------------------------*/
349
350 inline const cs_real_t *
352 {
353 if (f_id < this->n_i_faces) /* Interior face */
354 return this->i_face_center[f_id];
355 else /* Border face */
356 return this->b_face_center[f_id - this->n_i_faces];
357 }
358
359 /*----------------------------------------------------------------------------*/
368 /*----------------------------------------------------------------------------*/
369
371 get_face(cs_lnum_t f_id) const;
372
373 /*----------------------------------------------------------------------------*/
382 /*----------------------------------------------------------------------------*/
383
385 get_face_nvec(cs_lnum_t f_id) const;
386
387 /*----------------------------------------------------------------------------*/
396 /*----------------------------------------------------------------------------*/
397
399 get_edge_center(cs_lnum_t e_id, const cs_cdo_connect_t *topo) const;
400
401 /*----------------------------------------------------------------------------*/
409 /*----------------------------------------------------------------------------*/
410
412 get_edge_nvec(cs_lnum_t e_id) const;
413
414 /*----------------------------------------------------------------------------*/
422 /*----------------------------------------------------------------------------*/
423
425 get_dedge_nvec(cs_lnum_t shift) const;
426
427 /*----------------------------------------------------------------------------*/
431 /*----------------------------------------------------------------------------*/
432
433 void
434 log_summary() const;
435
436 /*----------------------------------------------------------------------------*/
440 /*----------------------------------------------------------------------------*/
441
442 void
443 dump() const;
444
445 /*----------------------------------------------------------------------------*/
453 /*----------------------------------------------------------------------------*/
454
455 void
456 check(int verb,
457 const cs_mesh_quantities_t *mq,
458 const cs_cdo_connect_t *topo) const;
459
461
462/*============================================================================
463 * Global variables
464 *============================================================================*/
465
466/*============================================================================
467 * Public function prototypes
468 *============================================================================*/
469
470/*----------------------------------------------------------------------------*/
480/*----------------------------------------------------------------------------*/
481
482static inline double
484 const cs_real_t *xb)
485{
486 const double xab[3] = {xb[0] - qa.center[0],
487 xb[1] - qa.center[1],
488 xb[2] - qa.center[2]};
489 const double cp[3] = {qa.unitv[1]*xab[2] - qa.unitv[2]*xab[1],
490 qa.unitv[2]*xab[0] - qa.unitv[0]*xab[2],
491 qa.unitv[0]*xab[1] - qa.unitv[1]*xab[0]};
492
493 return 0.5 * qa.meas * cs_math_3_norm(cp);
494}
495
496/*----------------------------------------------------------------------------*/
502/*----------------------------------------------------------------------------*/
503
504long long
506
507/*----------------------------------------------------------------------------*/
514/*----------------------------------------------------------------------------*/
515
516void
518
519/*----------------------------------------------------------------------------*/
525/*----------------------------------------------------------------------------*/
526
527void
529
530/*----------------------------------------------------------------------------*/
542/*----------------------------------------------------------------------------*/
543
546 const cs_mesh_quantities_t *mq,
547 const cs_cdo_connect_t *topo);
548
549/*----------------------------------------------------------------------------*/
557/*----------------------------------------------------------------------------*/
558
561
562/*----------------------------------------------------------------------------*/
568/*----------------------------------------------------------------------------*/
569
570void
572
573/*----------------------------------------------------------------------------*/
584/*----------------------------------------------------------------------------*/
585
586const cs_real_t *
588 const cs_adjacency_t *c2f);
589
590/*----------------------------------------------------------------------------*/
602/*----------------------------------------------------------------------------*/
603
604void
606 const cs_adjacency_t *c2f,
607 cs_real_t **p_pvol_fc);
608
609/*----------------------------------------------------------------------------*/
622/*----------------------------------------------------------------------------*/
623
624const cs_real_t *
626 const cs_adjacency_t *c2e);
627
628/*----------------------------------------------------------------------------*/
639/*----------------------------------------------------------------------------*/
640
641void
643 const cs_adjacency_t *c2e,
644 cs_real_t **p_pvol_ec);
645
646/*----------------------------------------------------------------------------*/
659/*----------------------------------------------------------------------------*/
660
661const cs_real_t *
663 const cs_cdo_connect_t *connect);
664
665/*----------------------------------------------------------------------------*/
678/*----------------------------------------------------------------------------*/
679
680void
682 const cs_cdo_connect_t *connect,
683 cs_real_t **p_dual_vol);
684
685/*----------------------------------------------------------------------------*/
697/*----------------------------------------------------------------------------*/
698
699void
701 const cs_cdo_quantities_t *cdoq,
702 cs_lnum_t f_id,
703 cs_real_t tef[]);
704
705/*----------------------------------------------------------------------------*/
717/*----------------------------------------------------------------------------*/
718
719void
721 const cs_cdo_quantities_t *cdoq,
722 cs_lnum_t bf_id,
723 cs_real_t tef[]);
724
725/*----------------------------------------------------------------------------*/
737/*----------------------------------------------------------------------------*/
738
739void
741 const cs_cdo_quantities_t *cdoq,
742 cs_lnum_t f_id,
743 cs_real_t wvf[]);
744
745/*----------------------------------------------------------------------------*/
757/*----------------------------------------------------------------------------*/
758
759void
761 const cs_cdo_quantities_t *cdoq,
762 cs_lnum_t bf_id,
763 cs_real_t wvf[]);
764
765/*----------------------------------------------------------------------------*/
773/*----------------------------------------------------------------------------*/
774
775void
776cs_quant_dump(FILE *f, cs_lnum_t num, const cs_quant_t q);
777
778#endif /* CS_CDO_QUANTITIES_H */
cs_cdo_quantities_bit_t
Bit values for setting which quantities to compute.
Definition: cs_cdo_quantities.h:103
@ CS_CDO_QUANTITIES_HHO_SCHEME
Definition: cs_cdo_quantities.h:109
@ CS_CDO_QUANTITIES_VB_SCHEME
Definition: cs_cdo_quantities.h:110
@ CS_CDO_QUANTITIES_CB_SCHEME
Definition: cs_cdo_quantities.h:112
@ CS_CDO_QUANTITIES_FB_SCHEME
Definition: cs_cdo_quantities.h:108
@ CS_CDO_QUANTITIES_MAC_SCHEME
Definition: cs_cdo_quantities.h:113
@ CS_CDO_QUANTITIES_VCB_SCHEME
Definition: cs_cdo_quantities.h:111
@ CS_CDO_QUANTITIES_EB_SCHEME
Definition: cs_cdo_quantities.h:107
const cs_real_t * cs_cdo_quantities_get_pvol_ec(const cs_cdo_quantities_t *cdoq, const cs_adjacency_t *c2e)
Retrieve the portion of volume surrounding each edge of a cell. This volume corresponds to an octahed...
Definition: cs_cdo_quantities.cpp:2186
void cs_cdo_quantities_set_algo_ccenter(cs_cdo_quantities_cell_center_algo_t algo)
Set the type of algorithm to use for computing the cell center.
Definition: cs_cdo_quantities.cpp:1500
const cs_real_t * cs_cdo_quantities_get_dual_volumes(cs_cdo_quantities_t *cdoq, const cs_cdo_connect_t *connect)
Compute or retrieve the dual volume surrounding each vertex. The parallel operation (sum reduction) i...
Definition: cs_cdo_quantities.cpp:2284
void cs_cdo_quantities_set(cs_flag_t option_flag)
Set which quantities have to be computed. Additionnal quantities are added to cs_cdo_quantities_flag ...
Definition: cs_cdo_quantities.cpp:1486
void cs_cdo_quantities_free_cell_vol(cs_cdo_quantities_t *cdoq)
Properly free the cell_vol array according to the settings.
Definition: cs_cdo_quantities.cpp:1927
const cs_real_t * cs_cdo_quantities_get_pvol_fc(const cs_cdo_quantities_t *cdoq, const cs_adjacency_t *c2f)
Retrieve the portion of volume surrounding each face of a cell. This volume corresponds to a pyramid ...
Definition: cs_cdo_quantities.cpp:2095
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...
Definition: cs_cdo_quantities.cpp:2504
cs_cdo_quantities_t * cs_cdo_quantities_free(cs_cdo_quantities_t *cdoq)
Destroy a cs_cdo_quantities_t structure.
Definition: cs_cdo_quantities.cpp:1870
long long cs_cdo_quantities_get_time_perfo(void)
Retrieve the time elapsed to build the cs_cdo_quantities_t structure.
Definition: cs_cdo_quantities.cpp:1471
void cs_cdo_quantities_compute_dual_volumes(const cs_cdo_quantities_t *cdoq, const cs_cdo_connect_t *connect, cs_real_t **p_dual_vol)
Compute the dual volume surrounding each vertex. The parallel operation (sum reduction) is performed ...
Definition: cs_cdo_quantities.cpp:2313
void cs_cdo_quantities_compute_pvol_fc(const cs_cdo_quantities_t *cdoq, const cs_adjacency_t *c2f, cs_real_t **p_pvol_fc)
Compute the portion of volume surrounding each face of a cell. This volume corresponds to a pyramid w...
Definition: cs_cdo_quantities.cpp:2125
cs_cdo_quantities_cell_center_algo_t
Type of algorithm used to compute the cell centers.
Definition: cs_cdo_quantities.h:69
@ CS_CDO_QUANTITIES_MEANV_CENTER
Definition: cs_cdo_quantities.h:71
@ CS_CDO_QUANTITIES_BARYC_CENTER
Definition: cs_cdo_quantities.h:72
@ CS_CDO_QUANTITIES_SUBDIV_CENTER
Definition: cs_cdo_quantities.h:74
@ CS_CDO_QUANTITIES_SATURNE_CENTER
Definition: cs_cdo_quantities.h:73
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....
Definition: cs_cdo_quantities.cpp:2368
void cs_cdo_quantities_compute_pvol_ec(const cs_cdo_quantities_t *cdoq, const cs_adjacency_t *c2e, cs_real_t **p_pvol_ec)
Compute the portion of volume surrounding each edge of a cell. The computed quantity is scanned with ...
Definition: cs_cdo_quantities.cpp:2219
void cs_quant_dump(FILE *f, cs_lnum_t num, const cs_quant_t q)
Dump a cs_quant_t structure.
Definition: cs_cdo_quantities.cpp:2700
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. Some quantities are shared with the cs_mesh_quantities_t struc...
Definition: cs_cdo_quantities.cpp:1520
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....
Definition: cs_cdo_quantities.cpp:2411
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...
Definition: cs_cdo_quantities.cpp:2454
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.
Definition: cs_cdo_quantities.h:483
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
cs_nreal_t cs_nreal_3_t[3]
Definition: cs_defs.h:375
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:349
unsigned cs_gnum_t
global mesh entity number
Definition: cs_defs.h:317
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
double cs_nreal_t
Definition: cs_defs.h:336
unsigned short int cs_flag_t
Definition: cs_defs.h:334
@ cp
Definition: cs_field_pointer.h:99
cs_flag_cartesian_axis_t
Definition: cs_flag.h:305
CS_F_HOST_DEVICE T cs_math_3_norm(const T v[3])
Compute the euclidean norm of a vector of dimension 3.
Definition: cs_math.h:240
char * algo
Definition: field_names.h:106
Definition: cs_mesh_adjacencies.h:68
Definition: cs_cdo_connect.h:57
Definition: cs_cdo_quantities.h:142
cs_nvec3_t get_dedge_nvec(cs_lnum_t shift) const
Get the two normalized vector associated to a dual edge.
Definition: cs_cdo_quantities.cpp:2680
cs_gnum_t n_g_edges
Definition: cs_cdo_quantities.h:224
cs_real_3_t * b_face_center
Definition: cs_cdo_quantities.h:194
cs_real_t get_face_surf(const cs_lnum_t f_id) const
Get the face surface for a primal face (interior or border)
Definition: cs_cdo_quantities.h:278
cs_real_3_t * cell_centers
Definition: cs_cdo_quantities.h:158
cs_real_t get_bface_surf(const cs_lnum_t bf_id) const
Get the face surface for a border primal face.
Definition: cs_cdo_quantities.h:295
cs_lnum_t n_i_faces
Definition: cs_cdo_quantities.h:167
cs_quant_t get_edge_center(cs_lnum_t e_id, const cs_cdo_connect_t *topo) const
Retrieve the edge center for a primal edge (interior or border)
Definition: cs_cdo_quantities.cpp:2632
const cs_real_t * b_dist
Definition: cs_cdo_quantities.h:195
cs_real_t * i_face_surf
Definition: cs_cdo_quantities.h:187
cs_real_3_t * i_face_center
Definition: cs_cdo_quantities.h:188
cs_lnum_t n_faces
Definition: cs_cdo_quantities.h:166
cs_lnum_t n_b_faces
Definition: cs_cdo_quantities.h:168
cs_quant_info_t edge_info
Definition: cs_cdo_quantities.h:244
cs_quant_t get_face(cs_lnum_t f_id) const
Get a cs_quant_t structure for a primal face (interior or border)
Definition: cs_cdo_quantities.cpp:2552
cs_real_t * dual_vol
Definition: cs_cdo_quantities.h:265
const cs_nreal_t * get_bface_normal(cs_lnum_t bf_id) const
Get the unit normal for a border primal face.
Definition: cs_cdo_quantities.h:312
cs_gnum_t n_g_vertices
Definition: cs_cdo_quantities.h:250
const cs_real_t * i_dist
Definition: cs_cdo_quantities.h:189
cs_real_t * b_face_surf
Definition: cs_cdo_quantities.h:193
cs_lnum_t n_cells
Definition: cs_cdo_quantities.h:156
cs_real_t * cell_vol
Definition: cs_cdo_quantities.h:159
cs_real_t * pvol_ec
Definition: cs_cdo_quantities.h:239
cs_quant_info_t face_info
Definition: cs_cdo_quantities.h:218
cs_nvec3_t get_edge_nvec(cs_lnum_t e_id) const
Get the normalized vector associated to a primal edge.
Definition: cs_cdo_quantities.cpp:2661
void check(int verb, const cs_mesh_quantities_t *mq, const cs_cdo_connect_t *topo) const
Check that global quantities are consistently computed.
Definition: cs_cdo_quantities.cpp:1702
void log_summary() const
Summarize generic information about the cdo mesh quantities.
Definition: cs_cdo_quantities.cpp:1945
cs_gnum_t n_g_cells
Definition: cs_cdo_quantities.h:157
cs_nvec3_t get_face_nvec(cs_lnum_t f_id) const
Get the face surface and its unit normal vector for a primal face (interior or border)
Definition: cs_cdo_quantities.cpp:2596
double vol_tot
Definition: cs_cdo_quantities.h:151
const cs_real_t * vtx_coord
Definition: cs_cdo_quantities.h:257
cs_lnum_t n_vertices
Definition: cs_cdo_quantities.h:249
cs_real_t * b_face_normal
Definition: cs_cdo_quantities.h:192
cs_gnum_t n_g_faces
Definition: cs_cdo_quantities.h:169
const cs_real_t * get_face_vector_area(cs_lnum_t f_id) const
Get the face vector which the face_area * face_normal for a primal face (interior or border)
Definition: cs_cdo_quantities.h:331
cs_nreal_3_t * i_face_u_normal
Definition: cs_cdo_quantities.h:185
cs_lnum_t n_edges
Definition: cs_cdo_quantities.h:223
cs_real_t * pvol_fc
Definition: cs_cdo_quantities.h:212
cs_real_t * pvol_vc
Definition: cs_cdo_quantities.h:252
cs_quant_info_t cell_info
Definition: cs_cdo_quantities.h:161
cs_real_t * dface_normal
Definition: cs_cdo_quantities.h:237
bool remove_boundary_faces
Definition: cs_cdo_quantities.h:147
cs_real_t * edge_vector
Definition: cs_cdo_quantities.h:226
cs_nreal_3_t * b_face_u_normal
Definition: cs_cdo_quantities.h:191
void dump() const
Dump a cs_cdo_quantities_t structure (for debugging purpose)
Definition: cs_cdo_quantities.cpp:2001
const cs_real_t * get_face_center(cs_lnum_t f_id) const
Get the face center for a primal face (interior or border)
Definition: cs_cdo_quantities.h:351
cs_real_t * i_face_normal
Definition: cs_cdo_quantities.h:186
cs_flag_cartesian_axis_t * face_axis
Definition: cs_cdo_quantities.h:197
cs_real_t * dedge_vector
Definition: cs_cdo_quantities.h:210
Definition: cs_mesh_quantities.h:88
Definition: cs_mesh.h:85
Definition: cs_defs.h:390
Definition: cs_cdo_quantities.h:120
double meas_max
Definition: cs_cdo_quantities.h:126
double meas_min
Definition: cs_cdo_quantities.h:125
double h_min
Definition: cs_cdo_quantities.h:127
double h_max
Definition: cs_cdo_quantities.h:128
Definition: cs_cdo_quantities.h:134
double meas
Definition: cs_cdo_quantities.h:136
double center[3]
Definition: cs_cdo_quantities.h:138
double unitv[3]
Definition: cs_cdo_quantities.h:137