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  cs_gnum_t n_g_i_c_faces; /* Global number of interior faces
104  for counts (with periodic faces
105  counted only once) */
106 
107  /* Global numbering */
108 
109  cs_gnum_t *global_cell_num; /* Global cell numbering */
110  cs_gnum_t *global_i_face_num; /* Global interior face numbering */
111  cs_gnum_t *global_b_face_num; /* Global boundary face numbering */
112  cs_gnum_t *global_vtx_num; /* Global vertex numbering */
113 
114  /* Periodictity features */
115 
116  int n_init_perio; /* Number of initial periodicities */
117  int n_transforms; /* Number of transformations */
118 
119  int have_rotation_perio; /* Periodicity rotation indicator */
120 
121  fvm_periodicity_t *periodicity; /* parameters of each periodicity */
122 
123  /* Parallelism and/or periodic features */
124 
125  cs_halo_type_t halo_type; /* Halo type */
126 
127  cs_lnum_t n_cells_with_ghosts; /* Total number of cells on the local rank
128  (n_cells + n_ghost_cells) */
129  cs_lnum_t n_ghost_cells; /* Number of "ghost" cells */
130 
131  cs_interface_set_t *vtx_interfaces; /* Vertices interface set */
132  cs_halo_t *halo; /* Ghost cells structure */
133  cs_range_set_t *vtx_range_set; /* Handle local/distant ranges for
134  vertices in parallel */
135 
136  cs_numbering_t *cell_numbering; /* Cell numbering info */
137  cs_numbering_t *i_face_numbering; /* Interior face numbering info */
138  cs_numbering_t *b_face_numbering; /* Boundary face numbering info */
139 
140  /* Re-computable connectivity features */
141 
142  cs_lnum_t n_b_cells; /* Number of boundary cells */
143  cs_lnum_t *b_cells; /* Boundary cell list */
144 
145  /* Extended neighborhood features */
146 
147  cs_lnum_t *cell_cells_idx; /* "cell -> cells" connectivity index for
148  extended halo. Only defined if extended
149  neighborhood is built. */
150  cs_lnum_t *cell_cells_lst; /* "cell -> cells" connectivity list for
151  extended halo. Only defined if extended
152  neighborhood is built. */
153 
154  cs_lnum_t *gcell_vtx_idx; /* ghost cells -> vertices index */
155  cs_lnum_t *gcell_vtx_lst; /* ghost cells -> vertices list */
156 
157  /* Group and family features */
158 
159  int n_groups; /* Number of groups */
160  int *group_idx; /* Starting index in group */
161  char *group; /* List of group names */
162 
163  int n_families; /* Number of families */
164  int n_max_family_items; /* Max. number of items for one family */
165  int *family_item; /* Family items */
166  int *cell_family; /* Cell family */
167  int *i_face_family; /* Interior face family */
168  int *b_face_family; /* Boundary face family */
169 
170  fvm_group_class_set_t *class_defs; /* Definition of group classes for
171  selection and postprocessing (built
172  from element families and their
173  descriptions) */
174  fvm_selector_t *select_cells; /* Cells selection object */
175  fvm_selector_t *select_i_faces; /* Interior faces selection object */
176  fvm_selector_t *select_b_faces; /* Boundary faces selection object */
177 
178  /* Status flags */
179 
180  cs_gnum_t n_g_free_faces; /* Global number of boundary faces
181  which are in fact isolated */
182  int verbosity; /* Current verbosity level */
183  int modified; /* Modification status */
184 
185 } cs_mesh_t;
186 
187 /*============================================================================
188  * Static global variables
189  *============================================================================*/
190 
191 extern cs_mesh_t *cs_glob_mesh; /* Pointer to main mesh structure */
192 
193 /*============================================================================
194  * Public function prototypes for Fortran API
195  *============================================================================*/
196 
197 /*----------------------------------------------------------------------------
198  * Update a scalar array in case of parallelism and/or periodicity.
199  *
200  * Fortran interface:
201  *
202  * subroutine synsca(var)
203  * *****************
204  *
205  * var : <-> : scalar array
206  *----------------------------------------------------------------------------*/
207 
208 void CS_PROCF(synsca, SYNSCA)
209 (
210  cs_real_t var[]
211 );
212 
213 /*----------------------------------------------------------------------------
214  * Update a scalar array in case of parallelism and/or periodicity,
215  * using an extended halo.
216  *
217  * Fortran interface:
218  *
219  * subroutine synsce(var)
220  * *****************
221  *
222  * var : <-> : scalar array
223  *----------------------------------------------------------------------------*/
224 
225 void CS_PROCF(synsce, SYNSCE)
226 (
227  cs_real_t var[]
228 );
229 
230 /*----------------------------------------------------------------------------
231  * Update a scalar array in case of parallelism and/or periodicity,
232  * ignoring periodicity of rotation
233  *
234  * Fortran interface:
235  *
236  * subroutine syncmp(var)
237  * *****************
238  *
239  * var : <-> : scalar array
240  *----------------------------------------------------------------------------*/
241 
242 void CS_PROCF(syncmp, SYNCMP)
243 (
244  cs_real_t var[]
245 );
246 
247 /*----------------------------------------------------------------------------
248  * Update a vector array in case of parallelism and/or periodicity.
249  *
250  * Fortran interface:
251  *
252  * subroutine synvec(var)
253  * *****************
254  *
255  * var1 : <-> : vector component 1 array
256  * var2 : <-> : vector component 2 array
257  * var3 : <-> : vector component 3 array
258  *----------------------------------------------------------------------------*/
259 
260 void CS_PROCF(synvec, SYNVEC)
261 (
262  cs_real_t var1[],
263  cs_real_t var2[],
264  cs_real_t var3[]
265 );
266 
267 /*----------------------------------------------------------------------------
268  * Update a vector array in case of parallelism and/or periodicity.
269  *
270  * Fortran interface:
271  *
272  * subroutine synvin(var)
273  * *****************
274  *
275  * var : <-> : interleaved vector (of dimension 3)
276  *----------------------------------------------------------------------------*/
277 
278 void CS_PROCF(synvin, SYNVIN)
279 (
280  cs_real_t var[]
281 );
282 
283 /*----------------------------------------------------------------------------
284  * Update a vector array in case of parallelism and/or periodicity,
285  * using an extended halo.
286  *
287  * Fortran interface:
288  *
289  * subroutine synvin(var)
290  * *****************
291  *
292  * var : <-> : interleaved vector (of dimension 3)
293  *----------------------------------------------------------------------------*/
294 
295 void CS_PROCF(synvie, SYNVIE)
296 (
297  cs_real_t var[]
298 );
299 
300 /*----------------------------------------------------------------------------
301  * Update a diagonal tensor array in case of parallelism and/or periodicity.
302  *
303  * Fortran interface:
304  *
305  * subroutine syndia(var)
306  * *****************
307  *
308  * var11 : <-> : diagonal tensor component 11 array
309  * var22 : <-> : diagonal tensor component 22 array
310  * var33 : <-> : diagonal tensor component 33 array
311  *----------------------------------------------------------------------------*/
312 
313 void CS_PROCF(syndia, SYNDIA)
314 (
315  cs_real_t var11[],
316  cs_real_t var22[],
317  cs_real_t var33[]
318 );
319 
320 /*----------------------------------------------------------------------------
321  * Update a tensor array in case of parallelism and/or periodicity.
322  *
323  * Fortran interface:
324  *
325  * subroutine synten(var)
326  * *****************
327  *
328  * var11 : <-> : tensor component 11 array
329  * var12 : <-> : tensor component 12 array
330  * var13 : <-> : tensor component 13 array
331  * var21 : <-> : tensor component 21 array
332  * var22 : <-> : tensor component 22 array
333  * var23 : <-> : tensor component 23 array
334  * var31 : <-> : tensor component 31 array
335  * var32 : <-> : tensor component 32 array
336  * var33 : <-> : tensor component 33 array
337  *----------------------------------------------------------------------------*/
338 
339 void CS_PROCF(synten, SYNTEN)
340 (
341  cs_real_t var11[],
342  cs_real_t var12[],
343  cs_real_t var13[],
344  cs_real_t var21[],
345  cs_real_t var22[],
346  cs_real_t var23[],
347  cs_real_t var31[],
348  cs_real_t var32[],
349  cs_real_t var33[]
350 );
351 
352 /*----------------------------------------------------------------------------
353  * Update a tensor array in case of parallelism and/or periodicity.
354  *
355  * Fortran interface:
356  *
357  * subroutine syntin(var)
358  * *****************
359  *
360  * var : <-> : interleaved tensor (of dimension 3x3)
361  *----------------------------------------------------------------------------*/
362 
363 void CS_PROCF(syntin, SYNTIN)
364 (
365  cs_real_t var[]
366 );
367 
368 /*----------------------------------------------------------------------------
369  * Update a symmetric tensor array in case of parallelism and/or periodicity.
370  *
371  * Fortran interface:
372  *
373  * subroutine syntis(var)
374  * *****************
375  *
376  * var : <-> : interleaved symmetric tensor (of dimension 6)
377  *----------------------------------------------------------------------------*/
378 
379 void CS_PROCF(syntis, SYNTIS)
380 (
381  cs_real_t var[]
382 );
383 
384 /*=============================================================================
385  * Public function prototypes
386  *============================================================================*/
387 
388 /*----------------------------------------------------------------------------
389  * Create an empty mesh structure
390  *
391  * returns:
392  * pointer to created mesh structure
393  *----------------------------------------------------------------------------*/
394 
395 cs_mesh_t *
396 cs_mesh_create(void);
397 
398 /*----------------------------------------------------------------------------
399  * Destroy a mesh structure
400  *
401  * mesh <-> pointer to a mesh structure
402  *
403  * returns:
404  * NULL pointer
405  *----------------------------------------------------------------------------*/
406 
407 cs_mesh_t *
409 
410 /*----------------------------------------------------------------------------
411  * Update (compactify) an array of global numbers.
412  *
413  * parameters:
414  * n_elts <-> number of local elements
415  * elt_gnum <-> global element numbers
416  *
417  * return:
418  * associated global number of elements
419  *----------------------------------------------------------------------------*/
420 
421 cs_gnum_t
423  cs_gnum_t *elt_gnum);
424 
425 /*----------------------------------------------------------------------------
426  * Remove arrays and structures that mey be rebuilt.
427  *
428  * mesh <-> pointer to a mesh structure
429  * free_halos <-- if true, free halos and parallel/periodic interface
430  * structures
431  *----------------------------------------------------------------------------*/
432 
433 void
435  bool free_halos);
436 
437 /*----------------------------------------------------------------------------
438  * Discard free (isolated) faces from a mesh.
439  *
440  * This should always be done before using the mesh for computation.
441  *
442  * parameters:
443  * mesh <-> pointer to mesh structure
444  *----------------------------------------------------------------------------*/
445 
446 void
448 
449 /*----------------------------------------------------------------------------
450  * Generate or update list of mesh boundary cells.
451  *
452  * parameters:
453  * mesh <-> pointer to a cs_mesh_t structure
454  *----------------------------------------------------------------------------*/
455 
456 void
458 
459 /*----------------------------------------------------------------------------
460  * Compute or update mesh structure members that depend on other members,
461  * but whose results may be reused, such as global number of elements
462  * (cells, vertices, interior and boundary faces) and sync cell family.
463  *
464  * parameters:
465  * mesh <-> pointer to a cs_mesh_t structure
466  *----------------------------------------------------------------------------*/
467 
468 void
470 
471 /*----------------------------------------------------------------------------
472  * Creation and initialization of mesh face and vertex interfaces.
473  *
474  * parameters:
475  * mesh <-> pointer to mesh structure
476  * mb <-> pointer to mesh builder (in case of periodicity)
477  *----------------------------------------------------------------------------*/
478 
479 void
481  cs_mesh_builder_t *mb);
482 
483 /*----------------------------------------------------------------------------
484  * Creation and initialization of halo structures.
485  *
486  * Treatment of parallel and/or periodic halos for standard and extended
487  * ghost cells according to halo type requested by global options.
488  *
489  * parameters:
490  * mesh <-> pointer to mesh structure
491  * mb <-> pointer to mesh builder (in case of periodicity)
492  * halo_type <-> type of halo (standard or extended)
493  *----------------------------------------------------------------------------*/
494 
495 void
497  cs_mesh_builder_t *mb,
498  cs_halo_type_t halo_type);
499 
500 /*----------------------------------------------------------------------------
501  * Get the global number of ghost cells.
502  *
503  * parameters:
504  * mesh <-- pointer to a mesh structure
505  *
506  * returns:
507  * Global number of ghost cells
508  *---------------------------------------------------------------------------*/
509 
510 cs_gnum_t
512 
513 /*----------------------------------------------------------------------------
514  * Update a scalar array in case of parallelism and/or periodicity.
515  *
516  * Note: this function is only present so that a C equivalent to the
517  * Fortran wrappers is available. In C code, directly using
518  * cs_halo_sync_var() is preferred.
519  *
520  * parameters:
521  * var <-> scalar array
522  *----------------------------------------------------------------------------*/
523 
524 void
526 
527 /*----------------------------------------------------------------------------
528  * Update a scalar array in case of parallelism and/or periodicity,
529  * using an extended halo.
530  *
531  * Note: this function is only present so that a C equivalent to the
532  * Fortran wrappers is available. In C code, directly using the
533  * cs_halo_sync_var() is preferred.
534  *
535  * parameters:
536  * var <-> scalar array
537  *----------------------------------------------------------------------------*/
538 
539 void
541 
542 /*----------------------------------------------------------------------------
543  * Update a component of a vector for parallelism and/or periodicity,
544  * ignoring periodicity of rotation.
545  *
546  * Note: this function is only present so that a C equivalent to the
547  * Fortran wrappers is available. In C code, directly using the
548  * cs_halo_sync_var() is preferred.
549  *
550  * parameters:
551  * var <-> scalar array
552  *----------------------------------------------------------------------------*/
553 
554 void
556 
557 /*----------------------------------------------------------------------------
558  * Update a vector array in case of parallelism and/or periodicity.
559  *
560  * parameters:
561  * var1 <-> vector component 1 array
562  * var2 <-> vector component 2 array
563  * var3 <-> vector component 3 array
564  *----------------------------------------------------------------------------*/
565 
566 void
568  cs_real_t *var2,
569  cs_real_t *var3);
570 
571 /*----------------------------------------------------------------------------
572  * Update a vector array in case of parallelism and/or periodicity.
573  *
574  * parameters:
575  * var <-> interleaved vector (of dimension 3)
576  *----------------------------------------------------------------------------*/
577 
578 void
580 
581 /*----------------------------------------------------------------------------
582  * Update a vector array in case of parallelism and/or periodicity,
583  * using an extended halo.
584  *
585  * parameters:
586  * var <-> interleaved vector (of dimension 3)
587  *----------------------------------------------------------------------------*/
588 
589 void
591 
592 /*----------------------------------------------------------------------------
593  * Update a components of a vector for parallelism and/or periodicity,
594  * ignoring periodicity of rotation.
595  *
596  * var <-> gradient components (interleaved)
597  *----------------------------------------------------------------------------*/
598 
599 void
601 
602 /*----------------------------------------------------------------------------
603  * Update a diagonal tensor array in case of parallelism and/or periodicity.
604  *
605  * parameters:
606  * var11 <-> diagonal tensor component 11 array
607  * var22 <-> diagonal tensor component 22 array
608  * var33 <-> diagonal tensor component 33 array
609  *----------------------------------------------------------------------------*/
610 
611 void
613  cs_real_t *var22,
614  cs_real_t *var33);
615 
616 /*----------------------------------------------------------------------------
617  * Update a tensor array in case of parallelism and/or periodicity.
618  *
619  * parameters:
620  * var11 <-> tensor component 11 array
621  * var12 <-> tensor component 12 array
622  * var13 <-> tensor component 13 array
623  * var21 <-> tensor component 21 array
624  * var22 <-> tensor component 22 array
625  * var23 <-> tensor component 23 array
626  * var31 <-> tensor component 31 array
627  * var32 <-> tensor component 32 array
628  * var33 <-> tensor component 33 array
629  *----------------------------------------------------------------------------*/
630 
631 void
633  cs_real_t *var12,
634  cs_real_t *var13,
635  cs_real_t *var21,
636  cs_real_t *var22,
637  cs_real_t *var23,
638  cs_real_t *var31,
639  cs_real_t *var32,
640  cs_real_t *var33);
641 
642 /*----------------------------------------------------------------------------
643  * Update a tensor array in case of parallelism and/or periodicity.
644  *
645  * parameters:
646  * var <-> interleaved tensor (of dimension 3x3)
647  *----------------------------------------------------------------------------*/
648 
649 void
651 
652 /*----------------------------------------------------------------------------
653  * Update a symmetric tensor array in case of parallelism and/or periodicity.
654  *
655  * parameters:
656  * var <-> symmetric interleaved tensor (of dimension 6)
657  *----------------------------------------------------------------------------*/
658 
659 void
661 
662 /*----------------------------------------------------------------------------
663  * Order family numbers and remove duplicates
664  *
665  * parameters
666  * mesh <-> pointer to mesh structure
667  *----------------------------------------------------------------------------*/
668 
669 void
671 
672 /*----------------------------------------------------------------------------
673  * Create group classes based on a mesh's family definitions.
674  *
675  * parameters:
676  * mesh <-- pointer to mesh structure
677  *
678  * returns:
679  * pointer to group classes structure based on mesh's family definitions
680  *----------------------------------------------------------------------------*/
681 
684 
685 /*----------------------------------------------------------------------------
686  * Define group classes for a mesh based on its family definitions.
687  *
688  * parameters:
689  * mesh <-> pointer to mesh structure
690  *----------------------------------------------------------------------------*/
691 
692 void
694 
695 /*----------------------------------------------------------------------------
696  * Assign selectors to global mesh.
697  *
698  * Should be called once the mesh is fully built.
699  *----------------------------------------------------------------------------*/
700 
701 void
703 
704 /*----------------------------------------------------------------------------
705  * Update selector and associated structures.
706  *
707  * parameters:
708  * mesh <-> pointer to a mesh structure
709  *----------------------------------------------------------------------------*/
710 
711 void
713 
714 /*----------------------------------------------------------------------------
715  * Get global lists of periodic face couples.
716  *
717  * In parallel, each face couple may appear on only one rank.
718  *
719  * The caller is responsible for freeing the arrays allocated and returned
720  * by this function once they are no onger needed.
721  *
722  * parameters:
723  * mesh <-- pointer to mesh structure
724  * n_perio_face_couples --> global number of periodic couples per
725  * periodicity (size: mesh->n_init_perio)
726  * perio_face_couples --> arrays of global periodic couple face numbers,
727  * for each periodicity
728  *----------------------------------------------------------------------------*/
729 
730 void
732  cs_lnum_t **n_perio_face_couples,
733  cs_gnum_t ***perio_face_couples);
734 
735 /*----------------------------------------------------------------------------
736  * Build global cell numbering array extended to ghost cell values.
737  *
738  * If the blank_perio flag is nonzero, periodic ghost cell numbers
739  * are set to zero instead of the value of the matching cell.
740  *
741  * The caller is responsible for freeing the returned array when it
742  * is no longer useful.
743  *
744  * parameters:
745  * mesh <-- pointer to mesh structure
746  * blank_perio <-- flag to zeroe periodic cell values
747  *----------------------------------------------------------------------------*/
748 
749 cs_gnum_t *
751  int blank_perio);
752 
753 /*----------------------------------------------------------------------------
754  * Mark interior faces with the number of their associated periodic
755  * transform id.
756  *
757  * parameters:
758  * mesh <-- pointer to mesh structure
759  * perio_num --> periodicity number associated with each face, signed for
760  * direct/reverse transform, 0 for non-periodic faces
761  * (size: mesh->n_i_faces)
762  *----------------------------------------------------------------------------*/
763 
764 void
766  int perio_num[]);
767 
768 /*----------------------------------------------------------------------------
769  * Print information on a mesh structure.
770  *
771  * parameters:
772  * mesh <-- pointer to mesh structure.
773  * name <-- associated name.
774  *----------------------------------------------------------------------------*/
775 
776 void
778  const char *name);
779 
780 /*----------------------------------------------------------------------------
781  * Compute global face connectivity size.
782  *
783  * Faces on simple parallel boundaries are counted only once, but periodic
784  * faces are counted twice.
785  *
786  * parameters:
787  * mesh <-- pointer to a cs_mesh_t structure
788  * g_i_face_vertices_size --> global interior face connectivity size, or NULL
789  * g_b_face_vertices_size --> global boundary face connectivity size, or NULL
790  *----------------------------------------------------------------------------*/
791 
792 void
794  cs_gnum_t *g_i_face_vertices_size,
795  cs_gnum_t *g_b_face_vertices_size);
796 
797 /*----------------------------------------------------------------------------
798  * Print statistics about mesh selectors usage to log.
799  *
800  * parameters:
801  * mesh <-- pointer to a mesh structure
802  *----------------------------------------------------------------------------*/
803 
804 void
806 
807 /*----------------------------------------------------------------------------
808  * Dump of a mesh structure.
809  *
810  * parameters:
811  * mesh <-> pointer to mesh structure.
812  *----------------------------------------------------------------------------*/
813 
814 void
815 cs_mesh_dump(const cs_mesh_t *mesh);
816 
817 /*----------------------------------------------------------------------------*/
818 
820 
821 #endif /* __CS_MESH_H__ */
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:281
cs_gnum_t cs_mesh_compact_gnum(cs_lnum_t n_elts, cs_gnum_t *elt_gnum)
Definition: cs_mesh.c:2285
int n_transforms
Definition: cs_mesh.h:117
void cs_mesh_selector_stats(cs_mesh_t *mesh)
Definition: cs_mesh.c:3747
cs_lnum_t * gcell_vtx_idx
Definition: cs_mesh.h:154
fvm_periodicity_t * periodicity
Definition: cs_mesh.h:121
cs_gnum_t * global_b_face_num
Definition: cs_mesh.h:111
Definition: cs_mesh_builder.h:57
void syncmp(cs_real_t var[])
Definition: cs_mesh.c:1939
cs_gnum_t * cs_mesh_get_cell_gnum(const cs_mesh_t *mesh, int blank_perio)
Definition: cs_mesh.c:3548
cs_mesh_t * cs_mesh_create(void)
Definition: cs_mesh.c:2118
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:2458
void cs_mesh_sync_var_vect_ni(cs_real_t *var1, cs_real_t *var2, cs_real_t *var3)
Definition: cs_mesh.c:3273
int * b_face_family
Definition: cs_mesh.h:168
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:2690
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:3210
void cs_mesh_sync_var_diag_ni(cs_real_t *var11, cs_real_t *var22, cs_real_t *var33)
Definition: cs_mesh.c:3369
void synvin(cs_real_t var[])
Definition: cs_mesh.c:1981
cs_lnum_t n_domains
Definition: cs_mesh.h:69
cs_range_set_t * vtx_range_set
Definition: cs_mesh.h:133
#define BEGIN_C_DECLS
Definition: cs_defs.h:462
void cs_mesh_sync_var_component(cs_real_t *var)
Definition: cs_mesh.c:3252
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:3403
cs_mesh_t * cs_glob_mesh
cs_interface_set_t * vtx_interfaces
Definition: cs_mesh.h:131
void synvec(cs_real_t var1[], cs_real_t var2[], cs_real_t var3[])
Definition: cs_mesh.c:1960
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:143
int * group_idx
Definition: cs_mesh.h:160
cs_gnum_t n_g_b_faces
Definition: cs_mesh.h:100
void cs_mesh_init_selectors(void)
Definition: cs_mesh.c:3148
cs_gnum_t n_g_free_faces
Definition: cs_mesh.h:180
Definition: cs_halo.h:71
char * group
Definition: cs_mesh.h:161
cs_gnum_t n_g_i_c_faces
Definition: cs_mesh.h:103
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:3496
cs_real_t * vtx_coord
Definition: cs_mesh.h:85
void cs_mesh_dump(const cs_mesh_t *mesh)
Definition: cs_mesh.c:3794
void cs_mesh_clean_families(cs_mesh_t *mesh)
Definition: cs_mesh.c:2966
void cs_mesh_update_b_cells(cs_mesh_t *mesh)
Definition: cs_mesh.c:2548
void cs_mesh_sync_var_vect_no_rotation(cs_real_t *var)
Definition: cs_mesh.c:3346
int n_groups
Definition: cs_mesh.h:159
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:175
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:2319
Definition: cs_mesh.h:63
fvm_selector_t * select_cells
Definition: cs_mesh.h:174
int * cell_family
Definition: cs_mesh.h:166
cs_gnum_t * global_cell_num
Definition: cs_mesh.h:109
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:2238
int n_init_perio
Definition: cs_mesh.h:116
void syntin(cs_real_t var[])
Definition: cs_mesh.c:2080
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:3087
int modified
Definition: cs_mesh.h:183
void synsca(cs_real_t var[])
Definition: cs_mesh.c:1899
int n_families
Definition: cs_mesh.h:163
void cs_mesh_init_interfaces(cs_mesh_t *mesh, cs_mesh_builder_t *mb)
int verbosity
Definition: cs_mesh.h:182
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:2001
cs_lnum_t * gcell_vtx_lst
Definition: cs_mesh.h:155
void cs_mesh_sync_var_scal_ext(cs_real_t *var)
Definition: cs_mesh.c:3231
void cs_mesh_get_face_perio_num(const cs_mesh_t *mesh, int perio_num[])
Definition: cs_mesh.c:3625
cs_gnum_t cs_mesh_n_g_ghost_cells(cs_mesh_t *mesh)
Definition: cs_mesh.c:2943
int * i_face_family
Definition: cs_mesh.h:167
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:3443
void cs_mesh_discard_free_faces(cs_mesh_t *mesh)
Definition: cs_mesh.c:2376
void synsce(cs_real_t var[])
Definition: cs_mesh.c:1919
void cs_mesh_print_info(const cs_mesh_t *mesh, const char *name)
Definition: cs_mesh.c:3669
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:2051
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:3133
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
cs_lnum_t n_cells_with_ghosts
Definition: cs_mesh.h:127
cs_lnum_t n_ghost_cells
Definition: cs_mesh.h:129
int * family_item
Definition: cs_mesh.h:165
cs_lnum_t * cell_cells_idx
Definition: cs_mesh.h:147
cs_gnum_t * global_i_face_num
Definition: cs_mesh.h:110
cs_lnum_t * b_face_vtx_idx
Definition: cs_mesh.h:93
#define END_C_DECLS
Definition: cs_defs.h:463
cs_numbering_t * cell_numbering
Definition: cs_mesh.h:136
void cs_mesh_sync_var_vect(cs_real_t *var)
Definition: cs_mesh.c:3299
void syntis(cs_real_t var[])
Definition: cs_mesh.c:2099
cs_numbering_t * b_face_numbering
Definition: cs_mesh.h:138
cs_gnum_t * global_vtx_num
Definition: cs_mesh.h:112
cs_numbering_t * i_face_numbering
Definition: cs_mesh.h:137
#define CS_PROCF(x, y)
Definition: cs_defs.h:476
void cs_mesh_sync_var_vect_ext(cs_real_t *var)
Definition: cs_mesh.c:3323
cs_lnum_t n_b_cells
Definition: cs_mesh.h:142
void cs_mesh_update_selectors(cs_mesh_t *mesh)
Definition: cs_mesh.c:3192
int have_rotation_perio
Definition: cs_mesh.h:119
fvm_group_class_set_t * class_defs
Definition: cs_mesh.h:170
cs_halo_type_t halo_type
Definition: cs_mesh.h:125
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:2591
cs_lnum_2_t * i_face_cells
Definition: cs_mesh.h:87
int n_max_family_items
Definition: cs_mesh.h:164
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:150
Definition: cs_numbering.h:83
fvm_selector_t * select_b_faces
Definition: cs_mesh.h:176
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:3465
cs_halo_t * halo
Definition: cs_mesh.h:132
void syndia(cs_real_t var11[], cs_real_t var22[], cs_real_t var33[])
Definition: cs_mesh.c:2022
cs_lnum_t * b_face_cells
Definition: cs_mesh.h:88