programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cs_renumber.h
Go to the documentation of this file.
1 #ifndef __CS_RENUMBER_H__
2 #define __CS_RENUMBER_H__
3 
4 /*============================================================================
5  * Optional mesh renumbering
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2013 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_base.h"
35 #include "cs_mesh.h"
36 #include "cs_mesh_quantities.h"
37 
38 /*----------------------------------------------------------------------------*/
39 
41 
42 /*============================================================================
43  * Macro definitions
44  *============================================================================*/
45 
46 /*============================================================================
47  * Type definitions
48  *============================================================================*/
49 
50 /* Renumbering algorithm */
51 
52 typedef enum {
53 
54  CS_RENUMBER_I_FACES_BLOCK, /* No shared cell in block */
55  CS_RENUMBER_I_FACES_MULTIPASS, /* Use multipass face numbering */
56  CS_RENUMBER_I_FACES_NONE /* No interior face numbering */
57 
59 
60 /*=============================================================================
61  * Public function prototypes
62  *============================================================================*/
63 
64 /*----------------------------------------------------------------------------
65  * Set the target number of threads for mesh renumbering.
66  *
67  * By default, the target number of threads is set to cs_glob_n_threads,
68  * but the value may be forced using this function. This is mainly useful
69  * for testing purposes.
70  *
71  * parameters:
72  * n_threads <-- target number of threads for mesh numbering
73  *----------------------------------------------------------------------------*/
74 
75 void
76 cs_renumber_set_n_threads(int n_threads);
77 
78 /*----------------------------------------------------------------------------
79  * Return the target number of threads for mesh renumbering.
80  *
81  * returns:
82  * the target number of threads for mesh numbering
83  *----------------------------------------------------------------------------*/
84 
85 int
87 
88 /*----------------------------------------------------------------------------
89  * Set the minimum sunset sizes when renumbering for threads.
90  *
91  * parameters:
92  * min_i_subset_size <-- minimum number of interior faces per
93  * thread per group
94  * min_b_subset_size <-- minimum number of boundary faces per
95  * thread per group
96  *----------------------------------------------------------------------------*/
97 
98 void
100  cs_lnum_t min_b_subset_size);
101 
102 /*----------------------------------------------------------------------------
103  * Get the minimum sunset sizes when renumbering for threads.
104  *
105  * min_i_subset_size --> minimum number of interior faces per
106  * thread per group, or NULL
107  * min_b_subset_size --> minimum number of boundary faces per
108  * thread per group, or NULL
109  *----------------------------------------------------------------------------*/
110 
111 void
112 cs_renumber_get_min_subset_size(cs_lnum_t *min_i_subset_size,
113  cs_lnum_t *min_b_subset_size);
114 
115 /*----------------------------------------------------------------------------
116  * Select the algorithm for interior faces renumbering.
117  *
118  * parameters:
119  * algorithm <-- algorithm type for interior faces renumbering
120  *----------------------------------------------------------------------------*/
121 
122 void
124 
125 /*----------------------------------------------------------------------------
126  * Return the algorithm for interior faces renumbering.
127  *
128  * returns:
129  * algorithm type for interior faces renumbering
130  *----------------------------------------------------------------------------*/
131 
134 
135 /*----------------------------------------------------------------------------
136  * Renumber mesh elements for vectorization or OpenMP depending on code
137  * options and target machine.
138  *
139  * parameters:
140  * mesh <-> Pointer to global mesh structure
141  * mesh_quantities <-> Pointer to global mesh quantities structure
142  *----------------------------------------------------------------------------*/
143 
144 void
146  cs_mesh_quantities_t *mesh_quantities);
147 
148 /*----------------------------------------------------------------------------*/
149 
151 
152 #endif /* __CS_RENUMBER_H__ */