programmer's documentation
cs_mesh.h
Go to the documentation of this file.
1 #ifndef __CS_MESH_H__
2 #define __CS_MESH_H__
3 
4 /*============================================================================
5  * Main structure associated to a mesh
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2018 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 "cs_defs.h"
35 
36 #include "fvm_group.h"
37 #include "fvm_selector.h"
38 #include "fvm_periodicity.h"
39 
40 #include "cs_base.h"
41 #include "cs_halo.h"
42 #include "cs_interface.h"
43 #include "cs_numbering.h"
44 #include "cs_range_set.h"
45 
46 #include "cs_mesh_builder.h"
47 
48 /*----------------------------------------------------------------------------*/
49 
51 
52 /*=============================================================================
53  * Macro definitions
54  *============================================================================*/
55 
56 /*============================================================================
57  * Type definitions
58  *============================================================================*/
59 
60 /* Mesh structure definition */
61 /* ------------------------- */
62 
63 typedef struct {
64 
65  /* General features */
66 
67  cs_lnum_t dim; /* Space dimension */
68  cs_lnum_t domain_num; /* Local domain number */
69  cs_lnum_t n_domains; /* Number of domains */
70 
71  /* Local dimensions */
72 
73  cs_lnum_t n_cells; /* Number of cells */
74  cs_lnum_t n_i_faces; /* Number of interior faces */
75  cs_lnum_t n_b_faces; /* Number of boundary faces */
76  cs_lnum_t n_vertices; /* Number of vertices */
77 
78  cs_lnum_t i_face_vtx_connect_size; /* Size of the connectivity
79  interior faces -> vertices */
80  cs_lnum_t b_face_vtx_connect_size; /* Size of the connectivity
81  boundary faces -> vertices */
82 
83  /* Local structures */
84 
85  cs_real_t *vtx_coord; /* Vertex coordinates */
86 
87  cs_lnum_2_t *i_face_cells; /* Interior faces -> cells connectivity */
88  cs_lnum_t *b_face_cells; /* Boundary faces -> cells connectivity */
89 
90  cs_lnum_t *i_face_vtx_idx; /* Interior faces -> vertices index */
91  cs_lnum_t *i_face_vtx_lst; /* Interior faces -> vertices connectivity */
92 
93  cs_lnum_t *b_face_vtx_idx; /* Boundary faces -> vertices index */
94  cs_lnum_t *b_face_vtx_lst; /* Boundary faces -> vertices connectivity */
95 
96  /* Global dimension */
97 
98  cs_gnum_t n_g_cells; /* Global number of cells */
99  cs_gnum_t n_g_i_faces; /* Global number of interior faces */
100  cs_gnum_t n_g_b_faces; /* Global number of boundary faces */
101  cs_gnum_t n_g_vertices; /* Global number of vertices */
102 
103  /* Global numbering */
104 
105  cs_gnum_t *global_cell_num; /* Global cell numbering */
106  cs_gnum_t *global_i_face_num; /* Global interior face numbering */
107  cs_gnum_t *global_b_face_num; /* Global boundary face numbering */
108  cs_gnum_t *global_vtx_num; /* Global vertex numbering */
109 
110  /* Periodictity features */
111 
112  int n_init_perio; /* Number of initial periodicities */
113  int n_transforms; /* Number of transformations */
114 
115  int have_rotation_perio; /* Periodicity rotation indicator */
116 
117  fvm_periodicity_t *periodicity; /* parameters of each periodicity */
118 
119  /* Parallelism and/or periodic features */
120 
121  cs_halo_type_t halo_type; /* Halo type */
122 
123  cs_lnum_t n_cells_with_ghosts; /* Total number of cells on the local rank
124  (n_cells + n_ghost_cells) */
125  cs_lnum_t n_ghost_cells; /* Number of "ghost" cells */
126 
127  cs_interface_set_t *vtx_interfaces; /* Vertices interface set */
128  cs_halo_t *halo; /* Ghost cells structure */
129  cs_range_set_t *vtx_range_set; /* Handle local/distant ranges for
130  vertices in parallel */
131 
132  cs_numbering_t *cell_numbering; /* Cell numbering info */
133  cs_numbering_t *i_face_numbering; /* Interior face numbering info */
134  cs_numbering_t *b_face_numbering; /* Boundary face numbering info */
135 
136  /* Re-computable connectivity features */
137 
138  cs_lnum_t n_b_cells; /* Number of boundary cells */
139  cs_lnum_t *b_cells; /* Boundary cell list */
140 
141  /* Extended neighborhood features */
142 
143  cs_lnum_t *cell_cells_idx; /* "cell -> cells" connectivity index for
144  extended halo. Only defined if extended
145  neighborhood is built. */
146  cs_lnum_t *cell_cells_lst; /* "cell -> cells" connectivity list for
147  extended halo. Only defined if extended
148  neighborhood is built. */
149 
150  cs_lnum_t *gcell_vtx_idx; /* ghost cells -> vertices index */
151  cs_lnum_t *gcell_vtx_lst; /* ghost cells -> vertices list */
152 
153  /* Group and family features */
154 
155  int n_groups; /* Number of groups */
156  int *group_idx; /* Starting index in group */
157  char *group; /* List of group names */
158 
159  int n_families; /* Number of families */
160  int n_max_family_items; /* Max. number of items for one family */
161  int *family_item; /* Family items */
162  int *cell_family; /* Cell family */
163  int *i_face_family; /* Interior face family */
164  int *b_face_family; /* Boundary face family */
165 
166  fvm_group_class_set_t *class_defs; /* Definition of group classes for
167  selection and postprocessing (built
168  from element families and their
169  descriptions) */
170  fvm_selector_t *select_cells; /* Cells selection object */
171  fvm_selector_t *select_i_faces; /* Interior faces selection object */
172  fvm_selector_t *select_b_faces; /* Boundary faces selection object */
173 
174  /* Status flags */
175 
176  cs_gnum_t n_g_free_faces; /* Global number of boundary faces
177  which are in fact isolated */
178  int verbosity; /* Current verbosity level */
179  int modified; /* Modification status */
180 
181 } cs_mesh_t;
182 
183 /*============================================================================
184  * Static global variables
185  *============================================================================*/
186 
187 extern cs_mesh_t *cs_glob_mesh; /* Pointer to main mesh structure */
188 
189 /*============================================================================
190  * Public function prototypes for Fortran API
191  *============================================================================*/
192 
193 /*----------------------------------------------------------------------------
194  * Update a scalar array in case of parallelism and/or periodicity.
195  *
196  * Fortran interface:
197  *
198  * subroutine synsca(var)
199  * *****************
200  *
201  * var : <-> : scalar array
202  *----------------------------------------------------------------------------*/
203 
204 void CS_PROCF(synsca, SYNSCA)
205 (
206  cs_real_t var[]
207 );
208 
209 /*----------------------------------------------------------------------------
210  * Update a scalar array in case of parallelism and/or periodicity,
211  * using an extended halo.
212  *
213  * Fortran interface:
214  *
215  * subroutine synsce(var)
216  * *****************
217  *
218  * var : <-> : scalar array
219  *----------------------------------------------------------------------------*/
220 
221 void CS_PROCF(synsce, SYNSCE)
222 (
223  cs_real_t var[]
224 );
225 
226 /*----------------------------------------------------------------------------
227  * Update a scalar array in case of parallelism and/or periodicity,
228  * ignoring periodicity of rotation
229  *
230  * Fortran interface:
231  *
232  * subroutine syncmp(var)
233  * *****************
234  *
235  * var : <-> : scalar array
236  *----------------------------------------------------------------------------*/
237 
238 void CS_PROCF(syncmp, SYNCMP)
239 (
240  cs_real_t var[]
241 );
242 
243 /*----------------------------------------------------------------------------
244  * Update a vector array in case of parallelism and/or periodicity.
245  *
246  * Fortran interface:
247  *
248  * subroutine synvec(var)
249  * *****************
250  *
251  * var1 : <-> : vector component 1 array
252  * var2 : <-> : vector component 2 array
253  * var3 : <-> : vector component 3 array
254  *----------------------------------------------------------------------------*/
255 
256 void CS_PROCF(synvec, SYNVEC)
257 (
258  cs_real_t var1[],
259  cs_real_t var2[],
260  cs_real_t var3[]
261 );
262 
263 /*----------------------------------------------------------------------------
264  * Update a vector array in case of parallelism and/or periodicity.
265  *
266  * Fortran interface:
267  *
268  * subroutine synvin(var)
269  * *****************
270  *
271  * var : <-> : interleaved vector (of dimension 3)
272  *----------------------------------------------------------------------------*/
273 
274 void CS_PROCF(synvin, SYNVIN)
275 (
276  cs_real_t var[]
277 );
278 
279 /*----------------------------------------------------------------------------
280  * Update a vector array in case of parallelism and/or periodicity,
281  * using an extended halo.
282  *
283  * Fortran interface:
284  *
285  * subroutine synvin(var)
286  * *****************
287  *
288  * var : <-> : interleaved vector (of dimension 3)
289  *----------------------------------------------------------------------------*/
290 
291 void CS_PROCF(synvie, SYNVIE)
292 (
293  cs_real_t var[]
294 );
295 
296 /*----------------------------------------------------------------------------
297  * Update a diagonal tensor array in case of parallelism and/or periodicity.
298  *
299  * Fortran interface:
300  *
301  * subroutine syndia(var)
302  * *****************
303  *
304  * var11 : <-> : diagonal tensor component 11 array
305  * var22 : <-> : diagonal tensor component 22 array
306  * var33 : <-> : diagonal tensor component 33 array
307  *----------------------------------------------------------------------------*/
308 
309 void CS_PROCF(syndia, SYNDIA)
310 (
311  cs_real_t var11[],
312  cs_real_t var22[],
313  cs_real_t var33[]
314 );
315 
316 /*----------------------------------------------------------------------------
317  * Update a tensor array in case of parallelism and/or periodicity.
318  *
319  * Fortran interface:
320  *
321  * subroutine synten(var)
322  * *****************
323  *
324  * var11 : <-> : tensor component 11 array
325  * var12 : <-> : tensor component 12 array
326  * var13 : <-> : tensor component 13 array
327  * var21 : <-> : tensor component 21 array
328  * var22 : <-> : tensor component 22 array
329  * var23 : <-> : tensor component 23 array
330  * var31 : <-> : tensor component 31 array
331  * var32 : <-> : tensor component 32 array
332  * var33 : <-> : tensor component 33 array
333  *----------------------------------------------------------------------------*/
334 
335 void CS_PROCF(synten, SYNTEN)
336 (
337  cs_real_t var11[],
338  cs_real_t var12[],
339  cs_real_t var13[],
340  cs_real_t var21[],
341  cs_real_t var22[],
342  cs_real_t var23[],
343  cs_real_t var31[],
344  cs_real_t var32[],
345  cs_real_t var33[]
346 );
347 
348 /*----------------------------------------------------------------------------
349  * Update a tensor array in case of parallelism and/or periodicity.
350  *
351  * Fortran interface:
352  *
353  * subroutine syntin(var)
354  * *****************
355  *
356  * var : <-> : interleaved tensor (of dimension 3x3)
357  *----------------------------------------------------------------------------*/
358 
359 void CS_PROCF(syntin, SYNTIN)
360 (
361  cs_real_t var[]
362 );
363 
364 /*----------------------------------------------------------------------------
365  * Update a symmetric tensor array in case of parallelism and/or periodicity.
366  *
367  * Fortran interface:
368  *
369  * subroutine syntis(var)
370  * *****************
371  *
372  * var : <-> : interleaved symmetric tensor (of dimension 6)
373  *----------------------------------------------------------------------------*/
374 
375 void CS_PROCF(syntis, SYNTIS)
376 (
377  cs_real_t var[]
378 );
379 
380 /*=============================================================================
381  * Public function prototypes
382  *============================================================================*/
383 
384 /*----------------------------------------------------------------------------
385  * Create an empty mesh structure
386  *
387  * returns:
388  * pointer to created mesh structure
389  *----------------------------------------------------------------------------*/
390 
391 cs_mesh_t *
392 cs_mesh_create(void);
393 
394 /*----------------------------------------------------------------------------
395  * Destroy a mesh structure
396  *
397  * mesh <-> pointer to a mesh structure
398  *
399  * returns:
400  * NULL pointer
401  *----------------------------------------------------------------------------*/
402 
403 cs_mesh_t *
405 
406 /*----------------------------------------------------------------------------
407  * Remove arrays and structures that mey be rebuilt.
408  *
409  * mesh <-> pointer to a mesh structure
410  * free_halos <-- if true, free halos and parallel/periodic interface
411  * structures
412  *----------------------------------------------------------------------------*/
413 
414 void
416  bool free_halos);
417 
418 /*----------------------------------------------------------------------------
419  * Discard free (isolated) faces from a mesh.
420  *
421  * This should always be done before using the mesh for computation.
422  *
423  * parameters:
424  * mesh <-> pointer to mesh structure
425  *----------------------------------------------------------------------------*/
426 
427 void
429 
430 /*----------------------------------------------------------------------------
431  * Generate or update list of mesh boundary cells.
432  *
433  * parameters:
434  * mesh <-> pointer to a cs_mesh_t structure
435  *----------------------------------------------------------------------------*/
436 
437 void
439 
440 /*----------------------------------------------------------------------------
441  * Compute or update mesh structure members that depend on other members,
442  * but whose results may be reused, such as global number of elements
443  * (cells, vertices, interior and boundary faces) and sync cell family.
444  *
445  * parameters:
446  * mesh <-> pointer to a cs_mesh_t structure
447  *----------------------------------------------------------------------------*/
448 
449 void
451 
452 /*----------------------------------------------------------------------------
453  * Creation and initialization of mesh face and vertex interfaces.
454  *
455  * parameters:
456  * mesh <-> pointer to mesh structure
457  * mb <-> pointer to mesh builder (in case of periodicity)
458  *----------------------------------------------------------------------------*/
459 
460 void
462  cs_mesh_builder_t *mb);
463 
464 /*----------------------------------------------------------------------------
465  * Creation and initialization of halo structures.
466  *
467  * Treatment of parallel and/or periodic halos for standard and extended
468  * ghost cells according to halo type requested by global options.
469  *
470  * parameters:
471  * mesh <-> pointer to mesh structure
472  * mb <-> pointer to mesh builder (in case of periodicity)
473  * halo_type <-> type of halo (standard or extended)
474  *----------------------------------------------------------------------------*/
475 
476 void
478  cs_mesh_builder_t *mb,
479  cs_halo_type_t halo_type);
480 
481 /*----------------------------------------------------------------------------
482  * Get the global number of ghost cells.
483  *
484  * parameters:
485  * mesh <-- pointer to a mesh structure
486  *
487  * returns:
488  * Global number of ghost cells
489  *---------------------------------------------------------------------------*/
490 
491 cs_gnum_t
493 
494 /*----------------------------------------------------------------------------
495  * Update a scalar array in case of parallelism and/or periodicity.
496  *
497  * Note: this function is only present so that a C equivalent to the
498  * Fortran wrappers is available. In C code, directly using
499  * cs_halo_sync_var() is preferred.
500  *
501  * parameters:
502  * var <-> scalar array
503  *----------------------------------------------------------------------------*/
504 
505 void
507 
508 /*----------------------------------------------------------------------------
509  * Update a scalar array in case of parallelism and/or periodicity,
510  * using an extended halo.
511  *
512  * Note: this function is only present so that a C equivalent to the
513  * Fortran wrappers is available. In C code, directly using the
514  * cs_halo_sync_var() is preferred.
515  *
516  * parameters:
517  * var <-> scalar array
518  *----------------------------------------------------------------------------*/
519 
520 void
522 
523 /*----------------------------------------------------------------------------
524  * Update a component of a vector for parallelism and/or periodicity,
525  * ignoring periodicity of rotation.
526  *
527  * Note: this function is only present so that a C equivalent to the
528  * Fortran wrappers is available. In C code, directly using the
529  * cs_halo_sync_var() is preferred.
530  *
531  * parameters:
532  * var <-> scalar array
533  *----------------------------------------------------------------------------*/
534 
535 void
537 
538 /*----------------------------------------------------------------------------
539  * Update a vector array in case of parallelism and/or periodicity.
540  *
541  * parameters:
542  * var1 <-> vector component 1 array
543  * var2 <-> vector component 2 array
544  * var3 <-> vector component 3 array
545  *----------------------------------------------------------------------------*/
546 
547 void
549  cs_real_t *var2,
550  cs_real_t *var3);
551 
552 /*----------------------------------------------------------------------------
553  * Update a vector array in case of parallelism and/or periodicity.
554  *
555  * parameters:
556  * var <-> interleaved vector (of dimension 3)
557  *----------------------------------------------------------------------------*/
558 
559 void
561 
562 /*----------------------------------------------------------------------------
563  * Update a vector array in case of parallelism and/or periodicity,
564  * using an extended halo.
565  *
566  * parameters:
567  * var <-> interleaved vector (of dimension 3)
568  *----------------------------------------------------------------------------*/
569 
570 void
572 
573 /*----------------------------------------------------------------------------
574  * Update a components of a vector for parallelism and/or periodicity,
575  * ignoring periodicity of rotation.
576  *
577  * var <-> gradient components (interleaved)
578  *----------------------------------------------------------------------------*/
579 
580 void
582 
583 /*----------------------------------------------------------------------------
584  * Update a diagonal tensor array in case of parallelism and/or periodicity.
585  *
586  * parameters:
587  * var11 <-> diagonal tensor component 11 array
588  * var22 <-> diagonal tensor component 22 array
589  * var33 <-> diagonal tensor component 33 array
590  *----------------------------------------------------------------------------*/
591 
592 void
594  cs_real_t *var22,
595  cs_real_t *var33);
596 
597 /*----------------------------------------------------------------------------
598  * Update a tensor array in case of parallelism and/or periodicity.
599  *
600  * parameters:
601  * var11 <-> tensor component 11 array
602  * var12 <-> tensor component 12 array
603  * var13 <-> tensor component 13 array
604  * var21 <-> tensor component 21 array
605  * var22 <-> tensor component 22 array
606  * var23 <-> tensor component 23 array
607  * var31 <-> tensor component 31 array
608  * var32 <-> tensor component 32 array
609  * var33 <-> tensor component 33 array
610  *----------------------------------------------------------------------------*/
611 
612 void
614  cs_real_t *var12,
615  cs_real_t *var13,
616  cs_real_t *var21,
617  cs_real_t *var22,
618  cs_real_t *var23,
619  cs_real_t *var31,
620  cs_real_t *var32,
621  cs_real_t *var33);
622 
623 /*----------------------------------------------------------------------------
624  * Update a tensor array in case of parallelism and/or periodicity.
625  *
626  * parameters:
627  * var <-> interleaved tensor (of dimension 3x3)
628  *----------------------------------------------------------------------------*/
629 
630 void
632 
633 /*----------------------------------------------------------------------------
634  * Update a symmetric tensor array in case of parallelism and/or periodicity.
635  *
636  * parameters:
637  * var <-> symmetric interleaved tensor (of dimension 6)
638  *----------------------------------------------------------------------------*/
639 
640 void
642 
643 /*----------------------------------------------------------------------------
644  * Order family numbers and remove duplicates
645  *
646  * parameters
647  * mesh <-> pointer to mesh structure
648  *----------------------------------------------------------------------------*/
649 
650 void
652 
653 /*----------------------------------------------------------------------------
654  * Create group classes based on a mesh's family definitions.
655  *
656  * parameters:
657  * mesh <-- pointer to mesh structure
658  *
659  * returns:
660  * pointer to group classes structure based on mesh's family definitions
661  *----------------------------------------------------------------------------*/
662 
665 
666 /*----------------------------------------------------------------------------
667  * Define group classes for a mesh based on its family definitions.
668  *
669  * parameters:
670  * mesh <-> pointer to mesh structure
671  *----------------------------------------------------------------------------*/
672 
673 void
675 
676 /*----------------------------------------------------------------------------
677  * Assign selectors to global mesh.
678  *
679  * Should be called once the mesh is fully built.
680  *----------------------------------------------------------------------------*/
681 
682 void
684 
685 /*----------------------------------------------------------------------------
686  * Update selector and associated structures.
687  *
688  * parameters:
689  * mesh <-> pointer to a mesh structure
690  *----------------------------------------------------------------------------*/
691 
692 void
694 
695 /*----------------------------------------------------------------------------
696  * Get global lists of periodic face couples.
697  *
698  * In parallel, each face couple may appear on only one rank.
699  *
700  * The caller is responsible for freeing the arrays allocated and returned
701  * by this function once they are no onger needed.
702  *
703  * parameters:
704  * mesh <-- pointer to mesh structure
705  * n_perio_face_couples --> global number of periodic couples per
706  * periodicity (size: mesh->n_init_perio)
707  * perio_face_couples --> arrays of global periodic couple face numbers,
708  * for each periodicity
709  *----------------------------------------------------------------------------*/
710 
711 void
713  cs_lnum_t **n_perio_face_couples,
714  cs_gnum_t ***perio_face_couples);
715 
716 /*----------------------------------------------------------------------------
717  * Build global cell numbering array extended to ghost cell values.
718  *
719  * If the blank_perio flag is nonzero, periodic ghost cell numbers
720  * are set to zero instead of the value of the matching cell.
721  *
722  * The caller is responsible for freeing the returned array when it
723  * is no longer useful.
724  *
725  * parameters:
726  * mesh <-- pointer to mesh structure
727  * blank_perio <-- flag to zeroe periodic cell values
728  *----------------------------------------------------------------------------*/
729 
730 cs_gnum_t *
732  int blank_perio);
733 
734 /*----------------------------------------------------------------------------
735  * Mark interior faces with the number of their associated periodic
736  * transform id.
737  *
738  * parameters:
739  * mesh <-- pointer to mesh structure
740  * perio_num --> periodicity number associated with each face, signed for
741  * direct/reverse transform, 0 for non-periodic faces
742  * (size: mesh->n_i_faces)
743  *----------------------------------------------------------------------------*/
744 
745 void
747  int perio_num[]);
748 
749 /*----------------------------------------------------------------------------
750  * Print information on a mesh structure.
751  *
752  * parameters:
753  * mesh <-- pointer to mesh structure.
754  * name <-- associated name.
755  *----------------------------------------------------------------------------*/
756 
757 void
759  const char *name);
760 
761 /*----------------------------------------------------------------------------
762  * Compute global face connectivity size.
763  *
764  * Faces on simple parallel boundaries are counted only once, but periodic
765  * faces are counted twice.
766  *
767  * parameters:
768  * mesh <-- pointer to a cs_mesh_t structure
769  * g_i_face_vertices_size --> global interior face connectivity size, or NULL
770  * g_b_face_vertices_size --> global boundary face connectivity size, or NULL
771  *----------------------------------------------------------------------------*/
772 
773 void
775  cs_gnum_t *g_i_face_vertices_size,
776  cs_gnum_t *g_b_face_vertices_size);
777 
778 /*----------------------------------------------------------------------------
779  * Print statistics about mesh selectors usage to log.
780  *
781  * parameters:
782  * mesh <-- pointer to a mesh structure
783  *----------------------------------------------------------------------------*/
784 
785 void
787 
788 /*----------------------------------------------------------------------------
789  * Dump of a mesh structure.
790  *
791  * parameters:
792  * mesh <-> pointer to mesh structure.
793  *----------------------------------------------------------------------------*/
794 
795 void
796 cs_mesh_dump(const cs_mesh_t *mesh);
797 
798 /*----------------------------------------------------------------------------*/
799 
801 
802 #endif /* __CS_MESH_H__ */
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:281
int n_transforms
Definition: cs_mesh.h:113
void cs_mesh_selector_stats(cs_mesh_t *mesh)
Definition: cs_mesh.c:3708
cs_lnum_t * gcell_vtx_idx
Definition: cs_mesh.h:150
fvm_periodicity_t * periodicity
Definition: cs_mesh.h:117
cs_gnum_t * global_b_face_num
Definition: cs_mesh.h:107
Definition: cs_mesh_builder.h:57
void syncmp(cs_real_t var[])
Definition: cs_mesh.c:1936
cs_gnum_t * cs_mesh_get_cell_gnum(const cs_mesh_t *mesh, int blank_perio)
Definition: cs_mesh.c:3509
cs_mesh_t * cs_mesh_create(void)
Definition: cs_mesh.c:2115
void cs_mesh_g_face_vertices_sizes(const cs_mesh_t *mesh, cs_gnum_t *g_i_face_vertices_size, cs_gnum_t *g_b_face_vertices_size)
Definition: cs_mesh.c:2439
void cs_mesh_sync_var_vect_ni(cs_real_t *var1, cs_real_t *var2, cs_real_t *var3)
Definition: cs_mesh.c:3234
int * b_face_family
Definition: cs_mesh.h:164
cs_lnum_t * b_face_vtx_lst
Definition: cs_mesh.h:94
void cs_mesh_init_halo(cs_mesh_t *mesh, cs_mesh_builder_t *mb, cs_halo_type_t halo_type)
Definition: cs_mesh.c:2651
cs_gnum_t n_g_cells
Definition: cs_mesh.h:98
void cs_mesh_sync_var_scal(cs_real_t *var)
Definition: cs_mesh.c:3171
void cs_mesh_sync_var_diag_ni(cs_real_t *var11, cs_real_t *var22, cs_real_t *var33)
Definition: cs_mesh.c:3330
void synvin(cs_real_t var[])
Definition: cs_mesh.c:1978
cs_lnum_t n_domains
Definition: cs_mesh.h:69
cs_range_set_t * vtx_range_set
Definition: cs_mesh.h:129
#define BEGIN_C_DECLS
Definition: cs_defs.h:453
void cs_mesh_sync_var_component(cs_real_t *var)
Definition: cs_mesh.c:3213
cs_lnum_t i_face_vtx_connect_size
Definition: cs_mesh.h:78
void cs_mesh_sync_var_tens_ni(cs_real_t *var11, cs_real_t *var12, cs_real_t *var13, cs_real_t *var21, cs_real_t *var22, cs_real_t *var23, cs_real_t *var31, cs_real_t *var32, cs_real_t *var33)
Definition: cs_mesh.c:3364
cs_mesh_t * cs_glob_mesh
cs_interface_set_t * vtx_interfaces
Definition: cs_mesh.h:127
void synvec(cs_real_t var1[], cs_real_t var2[], cs_real_t var3[])
Definition: cs_mesh.c:1957
cs_lnum_t * i_face_vtx_idx
Definition: cs_mesh.h:90
cs_lnum_t * i_face_vtx_lst
Definition: cs_mesh.h:91
cs_lnum_t * b_cells
Definition: cs_mesh.h:139
int * group_idx
Definition: cs_mesh.h:156
cs_gnum_t n_g_b_faces
Definition: cs_mesh.h:100
void cs_mesh_init_selectors(void)
Definition: cs_mesh.c:3109
cs_gnum_t n_g_free_faces
Definition: cs_mesh.h:176
Definition: cs_halo.h:71
char * group
Definition: cs_mesh.h:157
void cs_mesh_get_perio_faces(const cs_mesh_t *mesh, cs_lnum_t **n_perio_face_couples, cs_gnum_t ***perio_face_couples)
Definition: cs_mesh.c:3457
cs_real_t * vtx_coord
Definition: cs_mesh.h:85
void cs_mesh_dump(const cs_mesh_t *mesh)
Definition: cs_mesh.c:3755
void cs_mesh_clean_families(cs_mesh_t *mesh)
Definition: cs_mesh.c:2927
void cs_mesh_update_b_cells(cs_mesh_t *mesh)
Definition: cs_mesh.c:2529
void cs_mesh_sync_var_vect_no_rotation(cs_real_t *var)
Definition: cs_mesh.c:3307
int n_groups
Definition: cs_mesh.h:155
struct _fvm_selector_t fvm_selector_t
Definition: fvm_selector.h:51
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
fvm_selector_t * select_i_faces
Definition: cs_mesh.h:171
cs_gnum_t n_g_vertices
Definition: cs_mesh.h:101
void cs_mesh_free_rebuildable(cs_mesh_t *mesh, bool free_halos)
Definition: cs_mesh.c:2277
Definition: cs_mesh.h:63
fvm_selector_t * select_cells
Definition: cs_mesh.h:170
int * cell_family
Definition: cs_mesh.h:162
cs_gnum_t * global_cell_num
Definition: cs_mesh.h:105
cs_lnum_t n_vertices
Definition: cs_mesh.h:76
cs_lnum_t n_cells
Definition: cs_mesh.h:73
cs_lnum_t domain_num
Definition: cs_mesh.h:68
cs_mesh_t * cs_mesh_destroy(cs_mesh_t *mesh)
Definition: cs_mesh.c:2233
int n_init_perio
Definition: cs_mesh.h:112
void syntin(cs_real_t var[])
Definition: cs_mesh.c:2077
cs_gnum_t n_g_i_faces
Definition: cs_mesh.h:99
fvm_group_class_set_t * cs_mesh_create_group_classes(cs_mesh_t *mesh)
Definition: cs_mesh.c:3048
int modified
Definition: cs_mesh.h:179
void synsca(cs_real_t var[])
Definition: cs_mesh.c:1896
int n_families
Definition: cs_mesh.h:159
void cs_mesh_init_interfaces(cs_mesh_t *mesh, cs_mesh_builder_t *mb)
int verbosity
Definition: cs_mesh.h:178
Definition: cs_range_set.h:57
cs_halo_type_t
Definition: cs_halo.h:50
void synvie(cs_real_t var[])
Definition: cs_mesh.c:1998
cs_lnum_t * gcell_vtx_lst
Definition: cs_mesh.h:151
void cs_mesh_sync_var_scal_ext(cs_real_t *var)
Definition: cs_mesh.c:3192
void cs_mesh_get_face_perio_num(const cs_mesh_t *mesh, int perio_num[])
Definition: cs_mesh.c:3586
cs_gnum_t cs_mesh_n_g_ghost_cells(cs_mesh_t *mesh)
Definition: cs_mesh.c:2904
int * i_face_family
Definition: cs_mesh.h:163
struct _cs_interface_set_t cs_interface_set_t
Definition: cs_interface.h:61
int cs_lnum_2_t[2]
vector of 2 local mesh-entity ids
Definition: cs_defs.h:303
void cs_mesh_sync_var_tens(cs_real_t *var)
Definition: cs_mesh.c:3404
void cs_mesh_discard_free_faces(cs_mesh_t *mesh)
Definition: cs_mesh.c:2334
void synsce(cs_real_t var[])
Definition: cs_mesh.c:1916
void cs_mesh_print_info(const cs_mesh_t *mesh, const char *name)
Definition: cs_mesh.c:3630
void synten(cs_real_t var11[], cs_real_t var12[], cs_real_t var13[], cs_real_t var21[], cs_real_t var22[], cs_real_t var23[], cs_real_t var31[], cs_real_t var32[], cs_real_t var33[])
Definition: cs_mesh.c:2048
struct _fvm_periodicity_t fvm_periodicity_t
Definition: fvm_periodicity.h:67
cs_lnum_t dim
Definition: cs_mesh.h:67
void cs_mesh_init_group_classes(cs_mesh_t *mesh)
Definition: cs_mesh.c:3094
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
cs_lnum_t n_cells_with_ghosts
Definition: cs_mesh.h:123
cs_lnum_t n_ghost_cells
Definition: cs_mesh.h:125
int * family_item
Definition: cs_mesh.h:161
cs_lnum_t * cell_cells_idx
Definition: cs_mesh.h:143
cs_gnum_t * global_i_face_num
Definition: cs_mesh.h:106
cs_lnum_t * b_face_vtx_idx
Definition: cs_mesh.h:93
#define END_C_DECLS
Definition: cs_defs.h:454
cs_numbering_t * cell_numbering
Definition: cs_mesh.h:132
void cs_mesh_sync_var_vect(cs_real_t *var)
Definition: cs_mesh.c:3260
void syntis(cs_real_t var[])
Definition: cs_mesh.c:2096
cs_numbering_t * b_face_numbering
Definition: cs_mesh.h:134
cs_gnum_t * global_vtx_num
Definition: cs_mesh.h:108
cs_numbering_t * i_face_numbering
Definition: cs_mesh.h:133
#define CS_PROCF(x, y)
Definition: cs_defs.h:467
void cs_mesh_sync_var_vect_ext(cs_real_t *var)
Definition: cs_mesh.c:3284
cs_lnum_t n_b_cells
Definition: cs_mesh.h:138
void cs_mesh_update_selectors(cs_mesh_t *mesh)
Definition: cs_mesh.c:3153
int have_rotation_perio
Definition: cs_mesh.h:115
fvm_group_class_set_t * class_defs
Definition: cs_mesh.h:166
cs_halo_type_t halo_type
Definition: cs_mesh.h:121
struct _fvm_group_class_set_t fvm_group_class_set_t
Definition: fvm_group.h:60
void cs_mesh_update_auxiliary(cs_mesh_t *mesh)
Definition: cs_mesh.c:2572
cs_lnum_2_t * i_face_cells
Definition: cs_mesh.h:87
int n_max_family_items
Definition: cs_mesh.h:160
cs_lnum_t n_b_faces
Definition: cs_mesh.h:75
cs_lnum_t b_face_vtx_connect_size
Definition: cs_mesh.h:80
cs_lnum_t * cell_cells_lst
Definition: cs_mesh.h:146
Definition: cs_numbering.h:78
fvm_selector_t * select_b_faces
Definition: cs_mesh.h:172
cs_lnum_t n_i_faces
Definition: cs_mesh.h:74
Definition: mesh.f90:26
void cs_mesh_sync_var_sym_tens(cs_real_t *var)
Definition: cs_mesh.c:3426
cs_halo_t * halo
Definition: cs_mesh.h:128
void syndia(cs_real_t var11[], cs_real_t var22[], cs_real_t var33[])
Definition: cs_mesh.c:2019
cs_lnum_t * b_face_cells
Definition: cs_mesh.h:88