My Project
programmer's documentation
cs_cdo_local.h
Go to the documentation of this file.
1 #ifndef __CS_CDO_LOCAL_H__
2 #define __CS_CDO_LOCAL_H__
3 
4 /*============================================================================
5  * Routines to handle low-level routines related to CDO local quantities:
6  * - local matrices (stored in dense format),
7  * - local quantities related to a cell.
8  *============================================================================*/
9 
10 /*
11  This file is part of Code_Saturne, a general-purpose CFD tool.
12 
13  Copyright (C) 1998-2019 EDF S.A.
14 
15  This program is free software; you can redistribute it and/or modify it under
16  the terms of the GNU General Public License as published by the Free Software
17  Foundation; either version 2 of the License, or (at your option) any later
18  version.
19 
20  This program is distributed in the hope that it will be useful, but WITHOUT
21  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
23  details.
24 
25  You should have received a copy of the GNU General Public License along with
26  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
27  Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 */
29 
30 /*----------------------------------------------------------------------------
31  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_cdo_connect.h"
35 #include "cs_cdo_quantities.h"
36 #include "cs_flag.h"
37 #include "cs_param_cdo.h"
38 #include "cs_sdm.h"
39 
40 /*----------------------------------------------------------------------------*/
41 
43 
44 /*============================================================================
45  * Macro definitions
46  *============================================================================*/
47 
48 /*============================================================================
49  * Type definitions
50  *============================================================================*/
51 
56 typedef struct {
57 
58  /* Specific members for the weakly enforcement of Dirichlet BCs (diffusion) */
59  double eig_ratio;
60  double eig_max;
62  /* Store the cellwise value for the diffusion, time and reaction properties */
64  double dpty_val;
66  double tpty_val;
69  double rpty_vals[CS_CDO_N_MAX_REACTIONS];
70  double rpty_val;
72  /* Advection-related values */
73  double *adv_fluxes;
74 
75  /* Temporary buffers (erase and updated several times during the system
76  build */
77  int *ids;
78  double *values;
81  /* Structures used to build specific terms composing the algebraic system */
82  cs_sdm_t *hdg;
83  cs_sdm_t *loc;
84  cs_sdm_t *aux;
87 
93 typedef struct {
94 
98  int n_dofs;
103  cs_sdm_t *mat;
104  double *rhs;
105  double *source;
106  double *val_n;
108  /* Boundary conditions for the local system */
109  short int n_bc_faces;
110  short int *_f_ids;
114  /* Dirichlet BCs */
116  double *dir_values;
118  /* Neumann BCs */
120  double *neu_values;
122  /* Robin BCs */
123  bool has_robin;
124  double *rob_values;
126  /* Sliding BCs */
128 
129  /* Internal enforcement of DoFs */
133 } cs_cell_sys_t;
134 
146 typedef struct {
147 
151  /* Sizes used to allocate buffers */
152  short int n_max_vbyc;
153  short int n_max_ebyc;
154  short int n_max_fbyc;
155 
156  /* Cell information */
159  double vol_c;
160  double diam_c;
162  /* Vertex information */
163  short int n_vc;
165  double *xv;
166  double *wvc;
168  /* Edge information */
169  short int n_ec;
174  /* Face information */
175  short int n_fc;
178  short int *f_sgn;
179  double *f_diam;
180  double *hfc;
181  double *pfc;
185  /* Local e2v connectivity: size 2*n_ec (allocated to 2*n_max_ebyc) */
186  short int *e2v_ids;
187  short int *e2v_sgn;
189  /* Local f2v connectivity: size = 2*n_max_ebyc */
190  short int *f2v_idx;
191  short int *f2v_ids;
193  /* Local f2e connectivity: size = 2*n_max_ebyc */
194  short int *f2e_idx;
195  short int *f2e_ids;
196  double *tef;
198  /* Local e2f connectivity: size 2*n_ec (allocated to 2*n_max_ebyc) */
199  short int *e2f_ids;
203 
212 typedef struct {
213 
214  short int n_max_vbyf;
219  /* Face information */
221  short int f_sgn;
225  /* Vertex information */
226  short int n_vf;
228  double *xv;
229  double *wvf;
231  /* Edge information */
232  short int n_ef;
235  double *tef;
237  /* Local e2v connectivity: size 2*n_ec (allocated to 2*n_max_ebyf) */
238  short int *e2v_ids;
241 
242 /*
243  A cs_face_mesh_light_t structure is close to a cs_face_mesh_t structure
244  There are less members to be buildt quicker.
245  Such structure is always associated to a cs_cell_mesh_t structure
246 */
247 
248 typedef struct {
249 
250  short int n_max_vbyf; /* Max number of vertices belonging to a face
251  (= n_max_ebyf) */
252 
253  cs_lnum_t c_id; /* id of related cell in the mesh numbering */
254  short int f; /* id of the face in the cell mesh numbering */
255 
256  /* Vertex information */
257  short int n_vf; /* local number of vertices on this face */
258  short int *v_ids; /* vertex ids in the cellwise numbering */
259  double *wvf; /* weights related to each vertex */
260 
261  /* Edge information */
262  short int n_ef; /* local number of edges on this face (= n_vf) */
263  short int *e_ids; /* edge ids in the cellwise numbering */
264  double *tef; /* area of the triangle of base e and apex xf */
265 
267 
268 /*============================================================================
269  * Global variables
270  *============================================================================*/
271 
275 
276 /*============================================================================
277  * Staic inline function prototypes
278  *============================================================================*/
279 
280 /*----------------------------------------------------------------------------*/
290 /*----------------------------------------------------------------------------*/
291 
292 static inline short int
294  const cs_cell_mesh_t *const cm)
295 {
296  if (cm == NULL)
297  return -1;
298  for (short int v = 0; v < cm->n_vc; v++)
299  if (cm->v_ids[v] == v_id)
300  return v;
301  return -1;
302 }
303 
304 /*----------------------------------------------------------------------------*/
314 /*----------------------------------------------------------------------------*/
315 
316 static inline short int
318  const cs_cell_mesh_t *const cm)
319 {
320  if (cm == NULL)
321  return -1;
322  for (short int f = 0; f < cm->n_fc; f++)
323  if (cm->f_ids[f] == f_id)
324  return f;
325  return -1;
326 }
327 
328 /*----------------------------------------------------------------------------*/
337 /*----------------------------------------------------------------------------*/
338 
339 static inline void
341  const cs_cell_mesh_t *cm,
342  short int *n_vf,
343  short int *v_ids)
344 {
345  /* Reset */
346  *n_vf = 0;
347  for (short int v = 0; v < cm->n_vc; v++) v_ids[v] = -1;
348 
349  /* Tag vertices belonging to the current face f */
350  for (short int i = cm->f2e_idx[f]; i < cm->f2e_idx[f+1]; i++) {
351 
352  const int shift_e = 2*cm->f2e_ids[i];
353  v_ids[cm->e2v_ids[shift_e]] = 1;
354  v_ids[cm->e2v_ids[shift_e+1]] = 1;
355 
356  } /* Loop on face edges */
357 
358  for (short int v = 0; v < cm->n_vc; v++) {
359  if (v_ids[v] > 0)
360  v_ids[*n_vf] = v, *n_vf += 1;
361  }
362 
363 }
364 
365 /*----------------------------------------------------------------------------*/
376 /*----------------------------------------------------------------------------*/
377 
378 static inline void
379 cs_cell_mesh_get_next_3_vertices(const short int *f2e_ids,
380  const short int *e2v_ids,
381  short int *v0,
382  short int *v1,
383  short int *v2)
384 {
385  const short int e0 = f2e_ids[0];
386  const short int e1 = f2e_ids[1];
387  const short int tmp = e2v_ids[2*e1];
388 
389  *v0 = e2v_ids[2*e0];
390  *v1 = e2v_ids[2*e0+1];
391  *v2 = ((tmp != *v0) && (tmp != *v1)) ? tmp : e2v_ids[2*e1+1];
392 }
393 
394 /*----------------------------------------------------------------------------*/
403 /*----------------------------------------------------------------------------*/
404 
405 static inline bool
407  const short int f)
408 {
409  if (cm->f_ids[f] - cm->bface_shift > -1)
410  return true;
411  else
412  return false;
413 }
414 
415 /*============================================================================
416  * Public function prototypes
417  *============================================================================*/
418 
419 /*----------------------------------------------------------------------------*/
426 /*----------------------------------------------------------------------------*/
427 
428 void
430 
431 /*----------------------------------------------------------------------------*/
436 /*----------------------------------------------------------------------------*/
437 
438 void
440 
441 /*----------------------------------------------------------------------------*/
453 /*----------------------------------------------------------------------------*/
454 
456 cs_cell_sys_create(int n_max_dofbyc,
457  int n_max_fbyc,
458  int n_blocks,
459  int *block_sizes);
460 
461 /*----------------------------------------------------------------------------*/
469 /*----------------------------------------------------------------------------*/
470 
471 void
472 cs_cell_sys_reset(int n_fbyc,
473  cs_cell_sys_t *csys);
474 
475 /*----------------------------------------------------------------------------*/
481 /*----------------------------------------------------------------------------*/
482 
483 void
485 
486 /*----------------------------------------------------------------------------*/
493 /*----------------------------------------------------------------------------*/
494 
495 void
496 cs_cell_sys_dump(const char msg[],
497  const cs_cell_sys_t *csys);
498 
499 /*----------------------------------------------------------------------------*/
505 /*----------------------------------------------------------------------------*/
506 
509 
510 /*----------------------------------------------------------------------------*/
516 /*----------------------------------------------------------------------------*/
517 
518 void
520 
521 /*----------------------------------------------------------------------------*/
529 /*----------------------------------------------------------------------------*/
530 
532 cs_cell_mesh_create(const cs_cdo_connect_t *connect);
533 
534 /*----------------------------------------------------------------------------*/
542 /*----------------------------------------------------------------------------*/
543 
545 cs_cdo_local_get_cell_mesh(int mesh_id);
546 
547 /*----------------------------------------------------------------------------*/
553 /*----------------------------------------------------------------------------*/
554 
555 void
557 
558 /*----------------------------------------------------------------------------*/
564 /*----------------------------------------------------------------------------*/
565 
566 void
568 
569 /*----------------------------------------------------------------------------*/
575 /*----------------------------------------------------------------------------*/
576 
577 void
579 
580 /*----------------------------------------------------------------------------*/
591 /*----------------------------------------------------------------------------*/
592 
593 void
595  cs_flag_t build_flag,
596  const cs_cdo_connect_t *connect,
597  const cs_cdo_quantities_t *quant,
598  cs_cell_mesh_t *cm);
599 
600 /*----------------------------------------------------------------------------*/
608 /*----------------------------------------------------------------------------*/
609 
611 cs_face_mesh_create(short int n_max_vbyf);
612 
613 /*----------------------------------------------------------------------------*/
621 /*----------------------------------------------------------------------------*/
622 
624 cs_cdo_local_get_face_mesh(int mesh_id);
625 
626 /*----------------------------------------------------------------------------*/
632 /*----------------------------------------------------------------------------*/
633 
634 void
636 
637 /*----------------------------------------------------------------------------*/
647 /*----------------------------------------------------------------------------*/
648 
649 void
651  cs_lnum_t f_id,
652  const cs_cdo_connect_t *connect,
653  const cs_cdo_quantities_t *quant,
654  cs_face_mesh_t *fm);
655 
656 /*----------------------------------------------------------------------------*/
666 /*----------------------------------------------------------------------------*/
667 
668 void
670  short int f,
671  cs_face_mesh_t *fm);
672 
673 /*----------------------------------------------------------------------------*/
682 /*----------------------------------------------------------------------------*/
683 
685 cs_face_mesh_light_create(short int n_max_vbyf,
686  short int n_max_vbyc);
687 
688 /*----------------------------------------------------------------------------*/
697 /*----------------------------------------------------------------------------*/
698 
701 
702 /*----------------------------------------------------------------------------*/
708 /*----------------------------------------------------------------------------*/
709 
710 void
712 
713 /*----------------------------------------------------------------------------*/
722 /*----------------------------------------------------------------------------*/
723 
724 void
726  short int f,
728 
729 /*----------------------------------------------------------------------------*/
730 
732 
733 #endif /* __CS_CDO_LOCAL_H__ */
cs_cell_mesh_t::wvc
double * wvc
Definition: cs_cdo_local.h:166
f_id
void const int * f_id
Definition: cs_gui.h:292
cs_cell_sys_t::_f_ids
short int * _f_ids
Definition: cs_cdo_local.h:110
cs_face_mesh_t::e2v_ids
short int * e2v_ids
Definition: cs_cdo_local.h:238
cs_cell_mesh_t::flag
cs_flag_t flag
Definition: cs_cdo_local.h:148
cs_cell_mesh_t::e2v_ids
short int * e2v_ids
Definition: cs_cdo_local.h:186
cs_cell_mesh_dump
void cs_cell_mesh_dump(const cs_cell_mesh_t *cm)
Dump a cs_cell_mesh_t structure.
Definition: cs_cdo_local.c:739
cs_cell_mesh_is_boundary_face
static bool cs_cell_mesh_is_boundary_face(const cs_cell_mesh_t *cm, const short int f)
Is the face a boundary one ?
Definition: cs_cdo_local.h:406
cs_face_mesh_light_build
void cs_face_mesh_light_build(const cs_cell_mesh_t *cm, short int f, cs_face_mesh_light_t *fm)
Define a cs_face_mesh_light_t structure starting from a cs_cell_mesh_t structure.
Definition: cs_cdo_local.c:1778
cs_face_mesh_t::edge
cs_quant_t * edge
Definition: cs_cdo_local.h:234
cs_cell_builder_t::ids
int * ids
Definition: cs_cdo_local.h:77
cs_cell_sys_dump
void cs_cell_sys_dump(const char msg[], const cs_cell_sys_t *csys)
Dump a local system for debugging purpose.
Definition: cs_cdo_local.c:459
cs_cell_sys_free
void cs_cell_sys_free(cs_cell_sys_t **p_csys)
Free a cs_cell_sys_t structure.
Definition: cs_cdo_local.c:420
cs_face_mesh_light_t::n_vf
short int n_vf
Definition: cs_cdo_local.h:257
fm
Definition: cs_field_pointer.h:134
cs_cell_sys_t::neu_values
double * neu_values
Definition: cs_cdo_local.h:120
cs_face_mesh_t::xv
double * xv
Definition: cs_cdo_local.h:228
cs_cell_sys_t::rob_values
double * rob_values
Definition: cs_cdo_local.h:124
cs_cell_builder_t::vectors
cs_real_3_t * vectors
Definition: cs_cdo_local.h:79
cs_face_mesh_t::n_ef
short int n_ef
Definition: cs_cdo_local.h:232
cs_cell_sys_t::dof_flag
cs_flag_t * dof_flag
Definition: cs_cdo_local.h:101
cs_real_3_t
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:315
cs_cell_builder_t::eig_max
double eig_max
Definition: cs_cdo_local.h:60
cs_cell_builder_t::tpty_val
double tpty_val
Definition: cs_cdo_local.h:66
cs_face_mesh_light_t::wvf
double * wvf
Definition: cs_cdo_local.h:259
cs_cell_mesh_t::edge
cs_quant_t * edge
Definition: cs_cdo_local.h:171
cs_cell_mesh_t::dface
cs_nvec3_t * dface
Definition: cs_cdo_local.h:172
cs_cell_sys_t::dir_values
double * dir_values
Definition: cs_cdo_local.h:116
cs_face_mesh_t
Set of local quantities and connectivities related to a mesh face Structure used to get a better memo...
Definition: cs_cdo_local.h:212
cs_face_mesh_t::face
cs_quant_t face
Definition: cs_cdo_local.h:222
cs_cell_builder_t::dpty_val
double dpty_val
Definition: cs_cdo_local.h:64
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_cell_builder_t::loc
cs_sdm_t * loc
Definition: cs_cdo_local.h:83
cs_cell_mesh_t::c_id
cs_lnum_t c_id
Definition: cs_cdo_local.h:157
cs_cell_sys_t::dof_ids
cs_lnum_t * dof_ids
Definition: cs_cdo_local.h:100
cs_face_mesh_t::wvf
double * wvf
Definition: cs_cdo_local.h:229
atimbr::v
double precision, dimension(:,:,:), allocatable v
Definition: atimbr.f90:114
cs_cell_mesh_reset
void cs_cell_mesh_reset(cs_cell_mesh_t *cm)
Initialize to invalid values a cs_cell_mesh_t structure.
Definition: cs_cdo_local.c:671
cs_cell_mesh_t::n_vc
short int n_vc
Definition: cs_cdo_local.h:163
cs_cell_builder_t::values
double * values
Definition: cs_cdo_local.h:78
cs_cell_sys_reset
void cs_cell_sys_reset(int n_fbyc, cs_cell_sys_t *csys)
Reset all members related to BC and some other ones in a cs_cell_sys_t structure.
Definition: cs_cdo_local.c:365
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
cs_cell_sys_t::cell_flag
cs_flag_t cell_flag
Definition: cs_cdo_local.h:96
cs_cell_mesh_t::e2v_sgn
short int * e2v_sgn
Definition: cs_cdo_local.h:187
cs_face_mesh_t::tef
double * tef
Definition: cs_cdo_local.h:235
cs_face_mesh_light_t::e_ids
short int * e_ids
Definition: cs_cdo_local.h:263
cs_cell_sys_t::has_dirichlet
bool has_dirichlet
Definition: cs_cdo_local.h:115
cs_cell_mesh_t::n_ec
short int n_ec
Definition: cs_cdo_local.h:169
cs_cdo_quantities.h
cs_cell_sys_t::has_nhmg_neumann
bool has_nhmg_neumann
Definition: cs_cdo_local.h:119
cs_face_mesh_t::f_sgn
short int f_sgn
Definition: cs_cdo_local.h:221
cs_cell_mesh_t::n_max_fbyc
short int n_max_fbyc
Definition: cs_cdo_local.h:154
cs_cdo_local_get_cell_mesh
cs_cell_mesh_t * cs_cdo_local_get_cell_mesh(int mesh_id)
Get a pointer to a cs_cell_mesh_t structure corresponding to mesh id.
Definition: cs_cdo_local.c:647
cs_cell_mesh_t::xc
cs_real_3_t xc
Definition: cs_cdo_local.h:158
cs_face_mesh_free
void cs_face_mesh_free(cs_face_mesh_t **p_fm)
Free a cs_face_mesh_t structure.
Definition: cs_cdo_local.c:1402
cs_cell_mesh_t::v_ids
cs_lnum_t * v_ids
Definition: cs_cdo_local.h:164
cs_cell_mesh_t::f2v_ids
short int * f2v_ids
Definition: cs_cdo_local.h:191
cs_sdm.h
cs_face_mesh_light_t
Definition: cs_cdo_local.h:248
cs_cell_mesh_t::pfc
double * pfc
Definition: cs_cdo_local.h:181
cs_face_mesh_light_t::n_max_vbyf
short int n_max_vbyf
Definition: cs_cdo_local.h:250
cs_face_mesh_t::e_ids
cs_lnum_t * e_ids
Definition: cs_cdo_local.h:233
CS_CDO_N_MAX_REACTIONS
#define CS_CDO_N_MAX_REACTIONS
Definition: cs_param_cdo.h:69
cs_param_cdo.h
cs_cell_sys_t::has_robin
bool has_robin
Definition: cs_cdo_local.h:123
cs_cell_sys_t::bf_flag
cs_flag_t * bf_flag
Definition: cs_cdo_local.h:112
cs_face_mesh_create
cs_face_mesh_t * cs_face_mesh_create(short int n_max_vbyf)
Allocate a cs_face_mesh_t structure.
Definition: cs_cdo_local.c:1343
cs_cell_mesh_t::type
fvm_element_t type
Definition: cs_cdo_local.h:149
cs_cell_mesh_t::hfc
double * hfc
Definition: cs_cdo_local.h:180
cs_cell_sys_t::n_bc_faces
short int n_bc_faces
Definition: cs_cdo_local.h:109
cs_cell_mesh_t::diam_c
double diam_c
Definition: cs_cdo_local.h:160
fvm_element_t
fvm_element_t
Definition: fvm_defs.h:48
cs_cell_mesh_get_f2v
static void cs_cell_mesh_get_f2v(short int f, const cs_cell_mesh_t *cm, short int *n_vf, short int *v_ids)
Retrieve the list of vertices attached to a face.
Definition: cs_cdo_local.h:340
cs_cell_mesh_t::f2v_idx
short int * f2v_idx
Definition: cs_cdo_local.h:190
cs_cell_builder_t::eig_ratio
double eig_ratio
Definition: cs_cdo_local.h:59
cs_cell_mesh_t::f2e_idx
short int * f2e_idx
Definition: cs_cdo_local.h:194
cs_cell_mesh_t::dedge
cs_nvec3_t * dedge
Definition: cs_cdo_local.h:183
cs_face_mesh_t::n_vf
short int n_vf
Definition: cs_cdo_local.h:226
cs_cell_sys_t::n_dofs
int n_dofs
Definition: cs_cdo_local.h:98
cs_face_mesh_light_t::f
short int f
Definition: cs_cdo_local.h:254
cs_face_mesh_light_t::v_ids
short int * v_ids
Definition: cs_cdo_local.h:258
cs_cell_mesh_free
void cs_cell_mesh_free(cs_cell_mesh_t **p_cm)
Free a cs_cell_mesh_t structure.
Definition: cs_cdo_local.c:848
cs_cdo_quantities_t
Definition: cs_cdo_quantities.h:94
cs_face_mesh_t::dedge
cs_nvec3_t dedge
Definition: cs_cdo_local.h:223
cs_cell_sys_t::has_internal_enforcement
bool has_internal_enforcement
Definition: cs_cdo_local.h:130
cs_cdo_local_cell_meshes
cs_cell_mesh_t ** cs_cdo_local_cell_meshes
Definition: cs_cdo_local.c:78
cs_face_mesh_t::f_id
cs_lnum_t f_id
Definition: cs_cdo_local.h:220
cs_face_mesh_light_t::n_ef
short int n_ef
Definition: cs_cdo_local.h:262
cs_cell_sys_t::mat
cs_sdm_t * mat
Definition: cs_cdo_local.h:103
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
cs_cell_mesh_t::tef
double * tef
Definition: cs_cdo_local.h:196
cs_cell_mesh_t::n_max_vbyc
short int n_max_vbyc
Definition: cs_cdo_local.h:152
cs_cdo_connect_t
Definition: cs_cdo_connect.h:74
cs_cdo_local_initialize
void cs_cdo_local_initialize(const cs_cdo_connect_t *connect)
Allocate global structures related to a cs_cell_mesh_t and cs_face_mesh_t structures.
Definition: cs_cdo_local.c:136
cs_cell_sys_t::source
double * source
Definition: cs_cdo_local.h:105
cs_cell_builder_free
void cs_cell_builder_free(cs_cell_builder_t **p_cb)
Free a cs_cell_builder_t structure.
Definition: cs_cdo_local.c:548
cs_cell_builder_t
Set of local and temporary buffers useful for building the algebraic system with a cellwise process....
Definition: cs_cdo_local.h:56
cs_flag.h
cs_face_mesh_light_t::c_id
cs_lnum_t c_id
Definition: cs_cdo_local.h:253
cs_cell_builder_t::adv_fluxes
double * adv_fluxes
Definition: cs_cdo_local.h:73
cs_cell_mesh_t::n_fc
short int n_fc
Definition: cs_cdo_local.h:175
cs_face_mesh_t::v_ids
cs_lnum_t * v_ids
Definition: cs_cdo_local.h:227
cs_cell_sys_create
cs_cell_sys_t * cs_cell_sys_create(int n_max_dofbyc, int n_max_fbyc, int n_blocks, int *block_sizes)
Allocate a cs_cell_sys_t structure.
Definition: cs_cdo_local.c:243
cs_cdo_local_face_meshes_light
cs_face_mesh_light_t ** cs_cdo_local_face_meshes_light
Definition: cs_cdo_local.c:80
cs_cell_mesh_create
cs_cell_mesh_t * cs_cell_mesh_create(const cs_cdo_connect_t *connect)
Allocate and initialize a cs_cell_mesh_t structure.
Definition: cs_cdo_local.c:579
cs_cdo_connect.h
cs_cell_sys_t::bf_ids
cs_lnum_t * bf_ids
Definition: cs_cdo_local.h:111
cs_cell_mesh_t::face
cs_quant_t * face
Definition: cs_cdo_local.h:182
cs_cell_sys_t::has_sliding
bool has_sliding
Definition: cs_cdo_local.h:127
cs_cell_builder_t::rpty_val
double rpty_val
Definition: cs_cdo_local.h:70
cs_cell_mesh_t::xv
double * xv
Definition: cs_cdo_local.h:165
cs_cell_builder_t::aux
cs_sdm_t * aux
Definition: cs_cdo_local.h:84
cs_cell_builder_t::dpty_mat
cs_real_33_t dpty_mat
Definition: cs_cdo_local.h:63
cs_face_mesh_t::c_id
cs_lnum_t c_id
Definition: cs_cdo_local.h:216
cs_cell_sys_t::val_n
double * val_n
Definition: cs_cdo_local.h:106
cs_cdo_local_face_meshes
cs_face_mesh_t ** cs_cdo_local_face_meshes
Definition: cs_cdo_local.c:79
cs_real_33_t
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:321
cs_cell_mesh_build
void cs_cell_mesh_build(cs_lnum_t c_id, cs_flag_t build_flag, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_cell_mesh_t *cm)
Define a cs_cell_mesh_t structure for a given cell id. According to the requested level,...
Definition: cs_cdo_local.c:902
cs_cdo_local_finalize
void cs_cdo_local_finalize(void)
Free global structures related to cs_cell_mesh_t and cs_face_mesh_t structures.
Definition: cs_cdo_local.c:192
cs_cell_mesh_t::f_sgn
short int * f_sgn
Definition: cs_cdo_local.h:178
cs_cell_mesh_t::bface_shift
cs_lnum_t bface_shift
Definition: cs_cdo_local.h:176
cs_cell_sys_t::intern_forced_ids
cs_lnum_t * intern_forced_ids
Definition: cs_cdo_local.h:131
cs_flag_t
unsigned short int cs_flag_t
Definition: cs_defs.h:304
cs_face_mesh_t::n_max_vbyf
short int n_max_vbyf
Definition: cs_cdo_local.h:214
cs_cell_mesh_t::e2f_ids
short int * e2f_ids
Definition: cs_cdo_local.h:199
cs_quant_t
Definition: cs_cdo_quantities.h:86
cs_cell_mesh_t::f2e_ids
short int * f2e_ids
Definition: cs_cdo_local.h:195
cs_cell_mesh_t::f_ids
cs_lnum_t * f_ids
Definition: cs_cdo_local.h:177
cs_cdo_local_get_face_mesh_light
cs_face_mesh_light_t * cs_cdo_local_get_face_mesh_light(int mesh_id)
Get a pointer to a cs_face_mesh_light_t structure corresponding to mesh id.
Definition: cs_cdo_local.c:1733
cs_cell_mesh_t::e_ids
cs_lnum_t * e_ids
Definition: cs_cdo_local.h:170
cs_cell_mesh_t::sefc
cs_nvec3_t * sefc
Definition: cs_cdo_local.h:200
cpincl::e1
double precision, dimension(ncharm), save e1
Definition: cpincl.f90:233
cs_cell_sys_t
Set of arrays and local (small) dense matrices related to a mesh cell This is a key structure for bui...
Definition: cs_cdo_local.h:93
cs_cell_mesh_get_v
static short int cs_cell_mesh_get_v(const cs_lnum_t v_id, const cs_cell_mesh_t *const cm)
Retrieve the vertex id in the cellwise numbering associated to the given vertex id in the mesh number...
Definition: cs_cdo_local.h:293
cs_nvec3_t
Definition: cs_defs.h:343
cs_face_mesh_light_t::tef
double * tef
Definition: cs_cdo_local.h:264
cs_face_mesh_build
void cs_face_mesh_build(cs_lnum_t c_id, cs_lnum_t f_id, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_face_mesh_t *fm)
Define a cs_face_mesh_t structure for a given face/cell id.
Definition: cs_cdo_local.c:1435
cs_cell_sys_t::c_id
cs_lnum_t c_id
Definition: cs_cdo_local.h:95
cs_cell_mesh_t::n_max_ebyc
short int n_max_ebyc
Definition: cs_cdo_local.h:153
cs_cell_mesh_t::vol_c
double vol_c
Definition: cs_cdo_local.h:159
cs_cell_mesh_t
Set of local quantities and connectivities related to a mesh cell This is a key structure for all cel...
Definition: cs_cdo_local.h:146
cs_cell_mesh_get_f
static short int cs_cell_mesh_get_f(const cs_lnum_t f_id, const cs_cell_mesh_t *const cm)
Retrieve the face id in the cellwise numbering associated to the given face id in the mesh numbering.
Definition: cs_cdo_local.h:317
cs_face_mesh_light_create
cs_face_mesh_light_t * cs_face_mesh_light_create(short int n_max_vbyf, short int n_max_vbyc)
Allocate a cs_face_mesh_light_t structure.
Definition: cs_cdo_local.c:1697
cs_face_mesh_t::xc
cs_real_3_t xc
Definition: cs_cdo_local.h:217
cs_cdo_local_get_face_mesh
cs_face_mesh_t * cs_cdo_local_get_face_mesh(int mesh_id)
Get a pointer to a cs_face_mesh_t structure corresponding to mesh id.
Definition: cs_cdo_local.c:1385
cs_cell_builder_create
cs_cell_builder_t * cs_cell_builder_create(void)
Allocate cs_cell_builder_t structure.
Definition: cs_cdo_local.c:509
cs_cell_sys_t::rhs
double * rhs
Definition: cs_cdo_local.h:104
cs_cell_mesh_t::f_diam
double * f_diam
Definition: cs_cdo_local.h:179
cs_cell_mesh_get_next_3_vertices
static void cs_cell_mesh_get_next_3_vertices(const short int *f2e_ids, const short int *e2v_ids, short int *v0, short int *v1, short int *v2)
Get the next three vertices in a row from a face to edge connectivity and a edge to vertex connectivi...
Definition: cs_cdo_local.h:379
cs_face_mesh_build_from_cell_mesh
void cs_face_mesh_build_from_cell_mesh(const cs_cell_mesh_t *cm, short int f, cs_face_mesh_t *fm)
Define a cs_face_mesh_t structure for a given cell from a cs_cell_mesh_t structure....
Definition: cs_cdo_local.c:1577
cs_cell_builder_t::hdg
cs_sdm_t * hdg
Definition: cs_cdo_local.h:82
cs_face_mesh_light_free
void cs_face_mesh_light_free(cs_face_mesh_light_t **p_fm)
Free a cs_face_mesh_light_t structure.
Definition: cs_cdo_local.c:1750