My Project
programmer's documentation
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-2019 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 tensor values for periodic cells on extended halos.
53  *
54  * Fortran API:
55  *
56  * subroutine perrte
57  * *****************
58  *
59  * double precision var11(ncelet) : <-> : component 11 of rank 2 tensor
60  * double precision var12(ncelet) : <-> : component 12 of rank 2 tensor
61  * double precision var13(ncelet) : <-> : component 13 of rank 2 tensor
62  * double precision var21(ncelet) : <-> : component 21 of rank 2 tensor
63  * double precision var22(ncelet) : <-> : component 22 of rank 2 tensor
64  * double precision var23(ncelet) : <-> : component 23 of rank 2 tensor
65  * double precision var31(ncelet) : <-> : component 31 of rank 2 tensor
66  * double precision var32(ncelet) : <-> : component 32 of rank 2 tensor
67  * double precision var33(ncelet) : <-> : component 33 of rank 2 tensor
68  *----------------------------------------------------------------------------*/
69 
70 void
71 CS_PROCF (perrte, PERRTE) (cs_real_t var11[],
73  cs_real_t var13[],
74  cs_real_t var21[],
75  cs_real_t var22[],
76  cs_real_t var23[],
77  cs_real_t var31[],
78  cs_real_t var32[],
79  cs_real_t var33[]);
80 
81 /*=============================================================================
82  * Public function prototypes
83  *============================================================================*/
84 
85 /*----------------------------------------------------------------------------
86  * Apply transformation on coordinates.
87  *
88  * parameters:
89  * halo <-> halo associated with coordinates to synchronize
90  * sync_mode --> kind of halo treatment (standard or extended)
91  * coords --> coordinates on which transformation have to be done.
92  *----------------------------------------------------------------------------*/
93 
94 void
96  cs_halo_type_t sync_mode,
97  cs_real_t *coords);
98 
99 /*----------------------------------------------------------------------------
100  * Synchronize values for a real vector (interleaved) between periodic cells.
101  *
102  * parameters:
103  * halo <-> halo associated with variable to synchronize
104  * sync_mode --> type of halo treatment (standard or extended)
105  * var <-> vector to update
106  * incvar <-- specifies the increment for the elements of var
107  *----------------------------------------------------------------------------*/
108 
109 void
111  cs_halo_type_t sync_mode,
112  cs_real_t var[],
113  int incvar);
114 
115 /*----------------------------------------------------------------------------
116  * Synchronize values for a real vector between periodic cells.
117  *
118  * parameters:
119  * halo <-> halo associated with variable to synchronize
120  * sync_mode --> kind of halo treatment (standard or extended)
121  * var_x <-> component of the vector to update
122  * var_y <-> component of the vector to update
123  * var_z <-> component of the vector to update
124  *----------------------------------------------------------------------------*/
125 
126 void
128  cs_halo_type_t sync_mode,
129  cs_real_t var_x[],
130  cs_real_t var_y[],
131  cs_real_t var_z[]);
132 
133 /*----------------------------------------------------------------------------
134  * Synchronize values for a real tensor 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  * var11 <-> component of the tensor to update
140  * var12 <-> component of the tensor to update
141  * var13 <-> component of the tensor to update
142  * var21 <-> component of the tensor to update
143  * var22 <-> component of the tensor to update
144  * var23 <-> component of the tensor to update
145  * var31 <-> component of the tensor to update
146  * var32 <-> component of the tensor to update
147  * var33 <-> component of the tensor to update
148  *----------------------------------------------------------------------------*/
149 
150 void
152  cs_halo_type_t sync_mode,
153  cs_real_t var11[],
154  cs_real_t var12[],
155  cs_real_t var13[],
156  cs_real_t var21[],
157  cs_real_t var22[],
158  cs_real_t var23[],
159  cs_real_t var31[],
160  cs_real_t var32[],
161  cs_real_t var33[]);
162 
163 /*----------------------------------------------------------------------------
164  * Synchronize values for a real tensor (interleaved) between periodic cells.
165  *
166  * parameters:
167  * halo <-> halo associated with variable to synchronize
168  * sync_mode --> kind of halo treatment (standard or extended)
169  * var <-> tensor to update
170  *----------------------------------------------------------------------------*/
171 
172 void
174  cs_halo_type_t sync_mode,
175  cs_real_t var[]);
176 
177 /*----------------------------------------------------------------------------
178  * Synchronize values for a real tensor (symmetric interleaved) between
179  * periodic cells.
180  *
181  * parameters:
182  * halo <-> halo associated with variable to synchronize
183  * sync_mode --> kind of halo treatment (standard or extended)
184  * var <-> symmetric tensor to update (6 values)
185  *----------------------------------------------------------------------------*/
186 
187 void
189  cs_halo_type_t sync_mode,
190  cs_real_t var[]);
191 
192 /*----------------------------------------------------------------------------
193  * Synchronize values for a real diagonal tensor between periodic cells.
194  *
195  * We only know the diagonal of the tensor.
196  *
197  * parameters:
198  * halo <-> halo associated with variable to synchronize
199  * sync_mode --> kind of halo treatment (standard or extended)
200  * var11 <-> component of the tensor to update
201  * var22 <-> component of the tensor to update
202  * var33 <-> component of the tensor to update
203  *----------------------------------------------------------------------------*/
204 
205 void
207  cs_halo_type_t sync_mode,
208  cs_real_t var11[],
209  cs_real_t var22[],
210  cs_real_t var33[]);
211 
212 /*----------------------------------------------------------------------------
213  * Apply rotation on the gradient of Reynolds stress tensor
214  *
215  * parameters:
216  * drdxyz <-> gradient on the variable (size: 3*6*n_ghost_cells)
217  *----------------------------------------------------------------------------*/
218 
219 void
221 
222 /*----------------------------------------------------------------------------
223  * Synchronize values for a real gradient of a tensor (symmetric interleaved)
224  * between periodic cells.
225  *
226  * parameters:
227  * halo <-> halo associated with variable to synchronize
228  * sync_mode <-- kind of halo treatment (standard or extended)
229  * var <-> symmetric tensor to update (6 values)
230  *----------------------------------------------------------------------------*/
231 
232 void
234  cs_halo_type_t sync_mode,
235  cs_real_t var[]);
236 
237 /*----------------------------------------------------------------------------*/
238 
240 
241 #endif /* __CS_HALO_PERIO_H__ */
242 
cs_defs.h
var
void cs_int_t cs_real_t var[]
Definition: cs_parall.h:63
var31
void cs_real_t cs_real_t cs_real_t cs_real_t cs_real_t cs_real_t var31[]
Definition: cs_halo_perio.h:72
cs_halo_perio_sync_coords
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:574
CS_PROCF
void CS_PROCF(perrte, PERRTE)(cs_real_t var11[]
var22
void cs_real_t cs_real_t cs_real_t cs_real_t var22[]
Definition: cs_halo_perio.h:72
cs_halo_perio_sync_var_tens
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:933
var13
void cs_real_t cs_real_t var13[]
Definition: cs_halo_perio.h:72
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_halo_perio_sync_var_sym_tens_grad
void cs_halo_perio_sync_var_sym_tens_grad(const cs_halo_t *halo, cs_halo_type_t sync_mode, cs_real_t var[])
Definition: cs_halo_perio.c:1230
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
var21
void cs_real_t cs_real_t cs_real_t var21[]
Definition: cs_halo_perio.h:72
cs_halo_perio_sync_var_sym_tens
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:1002
var12
void cs_real_t var12[]
Definition: cs_halo_perio.h:72
var32
void cs_real_t cs_real_t cs_real_t cs_real_t cs_real_t cs_real_t cs_real_t var32[]
Definition: cs_halo_perio.h:72
cs_halo.h
cs_halo_perio_sync_var_vect
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:640
var33
void cs_real_t cs_real_t cs_real_t cs_real_t cs_real_t cs_real_t cs_real_t cs_real_t var33[]
Definition: cs_halo_perio.h:72
cs_halo_perio_rotate_rij
void cs_halo_perio_rotate_rij(cs_real_t *drdxyz)
Definition: cs_halo_perio.c:1164
cs_halo_t
Definition: cs_halo.h:71
cs_halo_perio_sync_var_diag_ni
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:1074
cs_halo_perio_sync_var_vect_ni
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:712
cs_halo_type_t
cs_halo_type_t
Definition: cs_halo.h:50
coords
void const cs_int_t const cs_real_t const cs_real_t * coords
Definition: cs_measures_util.h:360
cs_halo_perio_sync_var_tens_ni
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:816
cs_base.h
var23
void cs_real_t cs_real_t cs_real_t cs_real_t cs_real_t var23[]
Definition: cs_halo_perio.h:72