programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cs_halo_perio.h
Go to the documentation of this file.
1 #ifndef __CS_HALO_PERIO_H__
2 #define __CS_HALO_PERIO_H__
3 
4 /*============================================================================
5  * Structure and function headers associated to periodicity
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2014 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 #include "cs_defs.h"
31 
32 /*----------------------------------------------------------------------------
33  * Local headers
34  *----------------------------------------------------------------------------*/
35 
36 #include "cs_base.h"
37 #include "cs_halo.h"
38 
39 /*----------------------------------------------------------------------------*/
40 
42 
43 /*============================================================================
44  * Type definitions
45  *============================================================================*/
46 
47 /*============================================================================
48  * Public function header for Fortran API
49  *============================================================================*/
50 
51 /*----------------------------------------------------------------------------
52  * Rotate vector values for periodic cells on extended halos.
53  *
54  * Fortran API:
55  *
56  * subroutine pervec
57  * *****************
58  *
59  * double precision var(3,ncelet) : <-> : interleaved vector
60  *----------------------------------------------------------------------------*/
61 
62 void
63 CS_PROCF (pervec, PERVEC) (cs_real_t var[]);
64 
65 /*----------------------------------------------------------------------------
66  * Rotate vector values for periodic cells on extended halos.
67  *
68  * Fortran API:
69  *
70  * subroutine perrve
71  * *****************
72  *
73  * double precision var1(ncelet) : <-> : component 1 of vector
74  * double precision var2(ncelet) : <-> : component 2 of vector
75  * double precision var3(ncelet) : <-> : component 3 of vector
76  *----------------------------------------------------------------------------*/
77 
78 void
79 CS_PROCF (perrve, PERRVE) (cs_real_t var1[],
80  cs_real_t var2[],
81  cs_real_t var3[]);
82 
83 /*----------------------------------------------------------------------------
84  * Rotate tensor values for periodic cells on extended halos.
85  *
86  * Fortran API:
87  *
88  * subroutine perrte
89  * *****************
90  *
91  * double precision var11(ncelet) : <-> : component 11 of rank 2 tensor
92  * double precision var12(ncelet) : <-> : component 12 of rank 2 tensor
93  * double precision var13(ncelet) : <-> : component 13 of rank 2 tensor
94  * double precision var21(ncelet) : <-> : component 21 of rank 2 tensor
95  * double precision var22(ncelet) : <-> : component 22 of rank 2 tensor
96  * double precision var23(ncelet) : <-> : component 23 of rank 2 tensor
97  * double precision var31(ncelet) : <-> : component 31 of rank 2 tensor
98  * double precision var32(ncelet) : <-> : component 32 of rank 2 tensor
99  * double precision var33(ncelet) : <-> : component 33 of rank 2 tensor
100  *----------------------------------------------------------------------------*/
101 
102 void
103 CS_PROCF (perrte, PERRTE) (cs_real_t var11[],
104  cs_real_t var12[],
105  cs_real_t var13[],
106  cs_real_t var21[],
107  cs_real_t var22[],
108  cs_real_t var23[],
109  cs_real_t var31[],
110  cs_real_t var32[],
111  cs_real_t var33[]);
112 
113 /*=============================================================================
114  * Public function prototypes
115  *============================================================================*/
116 
117 /*----------------------------------------------------------------------------
118  * Apply transformation on coordinates.
119  *
120  * parameters:
121  * halo <-> halo associated with coordinates to synchronize
122  * sync_mode --> kind of halo treatment (standard or extended)
123  * coords --> coordinates on which transformation have to be done.
124  *----------------------------------------------------------------------------*/
125 
126 void
128  cs_halo_type_t sync_mode,
129  cs_real_t *coords);
130 
131 /*----------------------------------------------------------------------------
132  * Synchronize values for a real vector (interleaved) between periodic cells.
133  *
134  * parameters:
135  * halo <-> halo associated with variable to synchronize
136  * sync_mode --> type of halo treatment (standard or extended)
137  * var <-> vector to update
138  * incvar <-- specifies the increment for the elements of var
139  *----------------------------------------------------------------------------*/
140 
141 void
143  cs_halo_type_t sync_mode,
144  cs_real_t var[],
145  int incvar);
146 
147 /*----------------------------------------------------------------------------
148  * Synchronize values for a real vector between periodic cells.
149  *
150  * parameters:
151  * halo <-> halo associated with variable to synchronize
152  * sync_mode --> kind of halo treatment (standard or extended)
153  * var_x <-> component of the vector to update
154  * var_y <-> component of the vector to update
155  * var_z <-> component of the vector to update
156  *----------------------------------------------------------------------------*/
157 
158 void
160  cs_halo_type_t sync_mode,
161  cs_real_t var_x[],
162  cs_real_t var_y[],
163  cs_real_t var_z[]);
164 
165 /*----------------------------------------------------------------------------
166  * Synchronize values for a real tensor between periodic cells.
167  *
168  * parameters:
169  * halo <-> halo associated with variable to synchronize
170  * sync_mode --> kind of halo treatment (standard or extended)
171  * var11 <-> component of the tensor to update
172  * var12 <-> component of the tensor to update
173  * var13 <-> component of the tensor to update
174  * var21 <-> component of the tensor to update
175  * var22 <-> component of the tensor to update
176  * var23 <-> component of the tensor to update
177  * var31 <-> component of the tensor to update
178  * var32 <-> component of the tensor to update
179  * var33 <-> component of the tensor to update
180  *----------------------------------------------------------------------------*/
181 
182 void
184  cs_halo_type_t sync_mode,
185  cs_real_t var11[],
186  cs_real_t var12[],
187  cs_real_t var13[],
188  cs_real_t var21[],
189  cs_real_t var22[],
190  cs_real_t var23[],
191  cs_real_t var31[],
192  cs_real_t var32[],
193  cs_real_t var33[]);
194 
195 /*----------------------------------------------------------------------------
196  * Synchronize values for a real tensor (interleaved) between periodic cells.
197  *
198  * parameters:
199  * halo <-> halo associated with variable to synchronize
200  * sync_mode --> kind of halo treatment (standard or extended)
201  * var <-> tensor to update
202  *----------------------------------------------------------------------------*/
203 
204 void
206  cs_halo_type_t sync_mode,
207  cs_real_t var[]);
208 
209 /*----------------------------------------------------------------------------
210  * Synchronize values for a real tensor (symmetric interleaved) between
211  * periodic cells.
212  *
213  * parameters:
214  * halo <-> halo associated with variable to synchronize
215  * sync_mode --> kind of halo treatment (standard or extended)
216  * var <-> symmetric tensor to update (6 values)
217  *----------------------------------------------------------------------------*/
218 
219 void
221  cs_halo_type_t sync_mode,
222  cs_real_t var[]);
223 
224 /*----------------------------------------------------------------------------
225  * Synchronize values for a real diagonal tensor between periodic cells.
226  *
227  * We only know the diagonal of the tensor.
228  *
229  * parameters:
230  * halo <-> halo associated with variable to synchronize
231  * sync_mode --> kind of halo treatment (standard or extended)
232  * var11 <-> component of the tensor to update
233  * var22 <-> component of the tensor to update
234  * var33 <-> component of the tensor to update
235  *----------------------------------------------------------------------------*/
236 
237 void
239  cs_halo_type_t sync_mode,
240  cs_real_t var11[],
241  cs_real_t var22[],
242  cs_real_t var33[]);
243 
244 /*----------------------------------------------------------------------------
245  * Synchronize values for a real diagonal tensor (interleaved)
246  * between periodic cells.
247  *
248  * We only know the diagonal of the tensor.
249  *
250  * parameters:
251  * halo <-> halo associated with variable to synchronize
252  * sync_mode --> kind of halo treatment (standard or extended)
253  * var <-> diagonal tensor to update
254  *----------------------------------------------------------------------------*/
255 
256 void
258  cs_halo_type_t sync_mode,
259  cs_real_t var[]);
260 
261 /*----------------------------------------------------------------------------
262  * Apply rotation on the gradient of Reynolds stress tensor
263  *
264  * parameters:
265  * drdxyz <-> gradient on the variable (size: 3*6*n_ghost_cells)
266  *----------------------------------------------------------------------------*/
267 
268 void
270 
271 /*----------------------------------------------------------------------------*/
272 
274 
275 #endif /* __CS_HALO_PERIO_H__ */
276 
void cs_halo_perio_sync_var_vect_ni(const cs_halo_t *halo, cs_halo_type_t sync_mode, cs_real_t var_x[], cs_real_t var_y[], cs_real_t var_z[])
Definition: cs_halo_perio.c:696
void cs_halo_perio_rotate_rij(cs_real_t *drdxyz)
Definition: cs_halo_perio.c:1254
void cs_halo_perio_sync_var_vect(const cs_halo_t *halo, cs_halo_type_t sync_mode, cs_real_t var[], int incvar)
Definition: cs_halo_perio.c:625
void cs_halo_perio_sync_var_tens_ni(const cs_halo_t *halo, cs_halo_type_t sync_mode, 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_halo_perio.c:800
#define BEGIN_C_DECLS
Definition: cs_defs.h:405
Definition: cs_halo.h:70
void cs_halo_perio_sync_var_diag(const cs_halo_t *halo, cs_halo_type_t sync_mode, cs_real_t var[])
Definition: cs_halo_perio.c:1152
void perrve(cs_real_t var1[], cs_real_t var2[], cs_real_t var3[])
Definition: cs_halo_perio.c:489
cs_halo_type_t
Definition: cs_halo.h:49
void cs_halo_perio_sync_coords(const cs_halo_t *halo, cs_halo_type_t sync_mode, cs_real_t *coords)
Definition: cs_halo_perio.c:559
void perrte(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_halo_perio.c:523
void cs_halo_perio_sync_var_sym_tens(const cs_halo_t *halo, cs_halo_type_t sync_mode, cs_real_t var[])
Definition: cs_halo_perio.c:986
void cs_halo_perio_sync_var_tens(const cs_halo_t *halo, cs_halo_type_t sync_mode, cs_real_t var[])
Definition: cs_halo_perio.c:917
#define END_C_DECLS
Definition: cs_defs.h:406
double cs_real_t
Definition: cs_defs.h:296
#define CS_PROCF(x, y)
Definition: cs_defs.h:419
void pervec(cs_real_t var[])
Definition: cs_halo_perio.c:462
void cs_halo_perio_sync_var_diag_ni(const cs_halo_t *halo, cs_halo_type_t sync_mode, cs_real_t var11[], cs_real_t var22[], cs_real_t var33[])
Definition: cs_halo_perio.c:1057