programmer's documentation
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
src
base
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-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
#include "
cs_defs.h
"
31
32
/*----------------------------------------------------------------------------
33
* Local headers
34
*----------------------------------------------------------------------------*/
35
36
#include "
cs_base.h
"
37
#include "
cs_halo.h
"
38
39
/*----------------------------------------------------------------------------*/
40
41
BEGIN_C_DECLS
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 perrve
57
* *****************
58
*
59
* double precision var1(ncelet) : <-> : component 1 of vector
60
* double precision var2(ncelet) : <-> : component 2 of vector
61
* double precision var3(ncelet) : <-> : component 3 of vector
62
*----------------------------------------------------------------------------*/
63
64
void
65
CS_PROCF
(
perrve
, PERRVE) (
cs_real_t
var1[],
66
cs_real_t
var2[],
67
cs_real_t
var3[]);
68
69
/*----------------------------------------------------------------------------
70
* Rotate tensor values for periodic cells on extended halos.
71
*
72
* Fortran API:
73
*
74
* subroutine perrte
75
* *****************
76
*
77
* double precision var11(ncelet) : <-> : component 11 of rank 2 tensor
78
* double precision var12(ncelet) : <-> : component 12 of rank 2 tensor
79
* double precision var13(ncelet) : <-> : component 13 of rank 2 tensor
80
* double precision var21(ncelet) : <-> : component 21 of rank 2 tensor
81
* double precision var22(ncelet) : <-> : component 22 of rank 2 tensor
82
* double precision var23(ncelet) : <-> : component 23 of rank 2 tensor
83
* double precision var31(ncelet) : <-> : component 31 of rank 2 tensor
84
* double precision var32(ncelet) : <-> : component 32 of rank 2 tensor
85
* double precision var33(ncelet) : <-> : component 33 of rank 2 tensor
86
*----------------------------------------------------------------------------*/
87
88
void
89
CS_PROCF
(
perrte
, PERRTE) (
cs_real_t
var11[],
90
cs_real_t
var12[],
91
cs_real_t
var13[],
92
cs_real_t
var21[],
93
cs_real_t
var22[],
94
cs_real_t
var23[],
95
cs_real_t
var31[],
96
cs_real_t
var32[],
97
cs_real_t
var33[]);
98
99
/*=============================================================================
100
* Public function prototypes
101
*============================================================================*/
102
103
/*----------------------------------------------------------------------------
104
* Apply transformation on coordinates.
105
*
106
* parameters:
107
* halo <-> halo associated with coordinates to synchronize
108
* sync_mode --> kind of halo treatment (standard or extended)
109
* coords --> coordinates on which transformation have to be done.
110
*----------------------------------------------------------------------------*/
111
112
void
113
cs_halo_perio_sync_coords
(
const
cs_halo_t
*halo,
114
cs_halo_type_t
sync_mode,
115
cs_real_t
*coords);
116
117
/*----------------------------------------------------------------------------
118
* Synchronize values for a real vector (interleaved) between periodic cells.
119
*
120
* parameters:
121
* halo <-> halo associated with variable to synchronize
122
* sync_mode --> type of halo treatment (standard or extended)
123
* var <-> vector to update
124
* incvar <-- specifies the increment for the elements of var
125
*----------------------------------------------------------------------------*/
126
127
void
128
cs_halo_perio_sync_var_vect
(
const
cs_halo_t
*halo,
129
cs_halo_type_t
sync_mode,
130
cs_real_t
var[],
131
int
incvar);
132
133
/*----------------------------------------------------------------------------
134
* Synchronize values for a real vector between periodic cells.
135
*
136
* parameters:
137
* halo <-> halo associated with variable to synchronize
138
* sync_mode --> kind of halo treatment (standard or extended)
139
* var_x <-> component of the vector to update
140
* var_y <-> component of the vector to update
141
* var_z <-> component of the vector to update
142
*----------------------------------------------------------------------------*/
143
144
void
145
cs_halo_perio_sync_var_vect_ni
(
const
cs_halo_t
*halo,
146
cs_halo_type_t
sync_mode,
147
cs_real_t
var_x[],
148
cs_real_t
var_y[],
149
cs_real_t
var_z[]);
150
151
/*----------------------------------------------------------------------------
152
* Synchronize values for a real tensor between periodic cells.
153
*
154
* parameters:
155
* halo <-> halo associated with variable to synchronize
156
* sync_mode --> kind of halo treatment (standard or extended)
157
* var11 <-> component of the tensor to update
158
* var12 <-> component of the tensor to update
159
* var13 <-> component of the tensor to update
160
* var21 <-> component of the tensor to update
161
* var22 <-> component of the tensor to update
162
* var23 <-> component of the tensor to update
163
* var31 <-> component of the tensor to update
164
* var32 <-> component of the tensor to update
165
* var33 <-> component of the tensor to update
166
*----------------------------------------------------------------------------*/
167
168
void
169
cs_halo_perio_sync_var_tens_ni
(
const
cs_halo_t
*halo,
170
cs_halo_type_t
sync_mode,
171
cs_real_t
var11[],
172
cs_real_t
var12[],
173
cs_real_t
var13[],
174
cs_real_t
var21[],
175
cs_real_t
var22[],
176
cs_real_t
var23[],
177
cs_real_t
var31[],
178
cs_real_t
var32[],
179
cs_real_t
var33[]);
180
181
/*----------------------------------------------------------------------------
182
* Synchronize values for a real tensor (interleaved) between periodic cells.
183
*
184
* parameters:
185
* halo <-> halo associated with variable to synchronize
186
* sync_mode --> kind of halo treatment (standard or extended)
187
* var <-> tensor to update
188
*----------------------------------------------------------------------------*/
189
190
void
191
cs_halo_perio_sync_var_tens
(
const
cs_halo_t
*halo,
192
cs_halo_type_t
sync_mode,
193
cs_real_t
var[]);
194
195
/*----------------------------------------------------------------------------
196
* Synchronize values for a real tensor (symmetric interleaved) between
197
* periodic cells.
198
*
199
* parameters:
200
* halo <-> halo associated with variable to synchronize
201
* sync_mode --> kind of halo treatment (standard or extended)
202
* var <-> symmetric tensor to update (6 values)
203
*----------------------------------------------------------------------------*/
204
205
void
206
cs_halo_perio_sync_var_sym_tens
(
const
cs_halo_t
*halo,
207
cs_halo_type_t
sync_mode,
208
cs_real_t
var[]);
209
210
/*----------------------------------------------------------------------------
211
* Synchronize values for a real diagonal tensor between periodic cells.
212
*
213
* We only know the diagonal of the tensor.
214
*
215
* parameters:
216
* halo <-> halo associated with variable to synchronize
217
* sync_mode --> kind of halo treatment (standard or extended)
218
* var11 <-> component of the tensor to update
219
* var22 <-> component of the tensor to update
220
* var33 <-> component of the tensor to update
221
*----------------------------------------------------------------------------*/
222
223
void
224
cs_halo_perio_sync_var_diag_ni
(
const
cs_halo_t
*halo,
225
cs_halo_type_t
sync_mode,
226
cs_real_t
var11[],
227
cs_real_t
var22[],
228
cs_real_t
var33[]);
229
230
/*----------------------------------------------------------------------------
231
* Synchronize values for a real diagonal tensor (interleaved)
232
* between periodic cells.
233
*
234
* We only know the diagonal of the tensor.
235
*
236
* parameters:
237
* halo <-> halo associated with variable to synchronize
238
* sync_mode --> kind of halo treatment (standard or extended)
239
* var <-> diagonal tensor to update
240
*----------------------------------------------------------------------------*/
241
242
void
243
cs_halo_perio_sync_var_diag
(
const
cs_halo_t
*halo,
244
cs_halo_type_t
sync_mode,
245
cs_real_t
var[]);
246
247
/*----------------------------------------------------------------------------
248
* Apply rotation on the gradient of Reynolds stress tensor
249
*
250
* parameters:
251
* drdxyz <-> gradient on the variable (size: 3*6*n_ghost_cells)
252
*----------------------------------------------------------------------------*/
253
254
void
255
cs_halo_perio_rotate_rij
(
cs_real_t
*drdxyz);
256
257
/*----------------------------------------------------------------------------*/
258
259
END_C_DECLS
260
261
#endif
/* __CS_HALO_PERIO_H__ */
262
Generated on Thu Feb 27 2014 19:21:34 by
1.8.3.1