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