1
/*============================================================================
3
* This file is part of the Code_Saturne Kernel, element of the
4
* Code_Saturne CFD tool.
6
* Copyright (C) 1998-2009 EDF S.A., France
8
* contact: saturne-support@edf.fr
10
* The Code_Saturne Kernel is free software; you can redistribute it
11
* and/or modify it under the terms of the GNU General Public License
12
* as published by the Free Software Foundation; either version 2 of
13
* the License, or (at your option) any later version.
15
* The Code_Saturne Kernel is distributed in the hope that it will be
16
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
17
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with the Code_Saturne Kernel; if not, write to the
22
* Free Software Foundation, Inc.,
23
* 51 Franklin St, Fifth Floor,
24
* Boston, MA 02110-1301 USA
26
*============================================================================*/
28
#ifndef __CS_PROTOTYPES_H__
29
#define __CS_PROTOTYPES_H__
31
/*============================================================================
32
* Prototypes for Fortran functions and subroutines callable from C
33
*============================================================================*/
35
/*----------------------------------------------------------------------------
37
*----------------------------------------------------------------------------*/
41
/*----------------------------------------------------------------------------*/
45
/*============================================================================
47
*============================================================================*/
49
/*=============================================================================
50
* Fortran function/subroutine prototypes
51
*============================================================================*/
53
/*----------------------------------------------------------------------------
54
* Compute coarsening array for algebraic multigrid
55
*----------------------------------------------------------------------------*/
57
extern void CS_PROCF (autmgr, AUTMGR)
59
const cs_int_t *igr, /* <-- new grid level (0 = base) */
60
const cs_int_t *isym, /* <-- 1: symmetric; 2 nonsymmteric */
61
const cs_int_t *iagmax, /* <-- max fine cells per coarse cell */
62
const cs_int_t *nagmax, /* <-- fine cells per coarse cell limit */
63
const cs_int_t *ncelf, /* <-- number of cells in fine grid */
64
const cs_int_t *ncelfe, /* <-- number of cells with halo in fine grid */
65
const cs_int_t *nfacf, /* <-- number of faces in fine grid */
66
const cs_int_t *iwarnp, /* <-- verbosity level */
67
const cs_int_t ifacef[], /* <-- fine grid face->cell connectivity */
68
const cs_real_t daf[], /* <-- diagonal terms of fine grid */
69
const cs_real_t xaf[], /* <-- extradiagonal terms of fine grid */
70
const cs_real_t surfaf[], /* <-- fine grid face surface vectors */
71
const cs_real_t volumf[], /* <-- fine grid cell volumes */
72
const cs_real_t xyzfin[], /* <-- fine grid cell centers */
73
cs_int_t irscel[], /* --> Fine -> coarse cell connectivity */
74
cs_int_t indic[], /* --- work array of size ncelfe */
75
cs_int_t inombr[], /* --- work array of size ncelfe */
76
cs_int_t irsfac[], /* --- work array of size nfacf */
77
cs_int_t indicf[], /* --- work array of size nfacf */
78
cs_real_t w1[], /* --- work array of size ncelfe */
79
cs_real_t w2[] /* --- work array of size ncelfe */
82
/*----------------------------------------------------------------------------
83
* Main Fortran subroutine
84
*----------------------------------------------------------------------------*/
86
extern void CS_PROCF (caltri, CALTRI)
88
const cs_int_t *iverif, /* <-- activate elementary tests */
89
const cs_int_t *nideve, /* <-- size of IDEVEL integer array */
90
const cs_int_t *nrdeve, /* <-- size of rdevel floating-point array */
91
const cs_int_t *nituse, /* <-- size of ITUSER integer array */
92
const cs_int_t *nrtuse, /* <-- size of RTUSER floating-point array */
93
const cs_int_t *ifacel, /* <-- interior faces -> cells connectivity */
94
const cs_int_t *ifabor, /* <-- boundary faces -> cells connectivity */
95
const cs_int_t *ifmfbr, /* <-- boundary face family (group class) number */
96
const cs_int_t *ifmcel, /* <-- cell family (group class) number */
97
const cs_int_t *iprfml, /* <-- family (group class) properties */
98
const cs_int_t *ipnfac, /* <-- interior faces -> vertices connect. index */
99
const cs_int_t *nodfac, /* <-- interior faces -> vertices connectivity */
100
const cs_int_t *ipnfbr, /* <-- boundary faces -> vertices connect. index */
101
const cs_int_t *nodfbr, /* <-- boundary faces -> vertices connectivity */
102
cs_int_t *idevel, /* --> IDEVEL integer array */
103
cs_int_t *ituser, /* --> ITUSER integer array */
104
cs_int_t *ia, /* --> IA integer array */
105
cs_real_t *xyzcen, /* <-> points associated with cell centers */
106
cs_real_t *surfac, /* <-> interior face surface vectors */
107
cs_real_t *surfbo, /* <-> boundary face surface vectors */
108
cs_real_t *cdgfac, /* <-> interior face centers */
109
cs_real_t *cdgfbr, /* <-> boundary face vectors */
110
cs_real_t *xyznod, /* <-> vertex coordinates (optional) */
111
cs_real_t *volume, /* <-> cell volumes */
112
cs_real_t *rdevel, /* --> RDEVEL floating-point array */
113
cs_real_t *rtuser, /* --> RTUSER floating-point array */
114
cs_real_t *ra /* --> RA floating-point array */
117
/*----------------------------------------------------------------------------
118
* Compute coarsening grid values for algebraic multigrid
119
*----------------------------------------------------------------------------*/
121
extern void CS_PROCF (crstgr, CRSTGR)
123
const cs_int_t *iappel, /* <-- call number (0 or 1) */
124
const cs_int_t *isym, /* <-- 1: symmetric; 2 nonsymmteric */
125
const cs_int_t *igr, /* <-- new grid level (0 = base) */
126
const cs_int_t *ncelf, /* <-- number of cells in fine grid */
127
const cs_int_t *ncelg, /* <-- number of cells in coarse grid */
128
const cs_int_t *ncelfe, /* <-- number of cells with halo in fine grid */
129
const cs_int_t *ncelge, /* <-- number of cells with halo coarse grid */
130
const cs_int_t *nfacf, /* <-- number of faces in fine grid */
131
const cs_int_t *nfacg, /* <-- number of faces in coarse grid */
132
const cs_int_t *iwarnp, /* <-- verbosity level */
133
const cs_int_t ifacef[], /* <-- fine grid face->cell connectivity */
134
const cs_int_t ifaceg[], /* <-- coarse grid face->cell connectivity */
135
const cs_int_t irscel[], /* <-- Fine -> coarse cell connectivity */
136
const cs_int_t irsfac[], /* <-- Fine -> coarse face connectivity */
137
const cs_real_t volumf[], /* <-- fine grid cell volumes */
138
const cs_real_t xyzfin[], /* <-- fine grid cell centers */
139
const cs_real_t surfaf[], /* <-- fine grid face surface vectors */
140
const cs_real_t xaf0[], /* <-- symmetrized extradiagonal, fine */
141
const cs_real_t xaf0ij[], /* <-- matrix coarsening term, fine */
142
const cs_real_t daf[], /* <-- diagonal terms of fine grid */
143
const cs_real_t xaf[], /* <-- extradiagonal terms of fine grid */
144
const cs_real_t volumg[], /* <-- coarse grid cell volumes */
145
const cs_real_t xyzgro[], /* <-- coarse grid cell centers */
146
const cs_real_t surfag[], /* <-- coarse grid face surface vectors */
147
cs_real_t xag0[], /* --> symmetrized extradiagonal, coarse */
148
cs_real_t xag0ij[], /* --> matrix coarsening term, coarse */
149
cs_real_t dag[], /* --> diagonal terms of coarse grid */
150
cs_real_t xag[], /* --> extradiagonal terms, coarse grid */
151
cs_real_t rwc1[], /* --- work array of size ncelfe */
152
cs_real_t rwc2[], /* --- work array of size ncelfe */
153
cs_real_t rwc3[], /* --- work array of size ncelfe */
154
cs_real_t rwc4[] /* --- work array of size ncelfe */
157
/*----------------------------------------------------------------------------
158
* Close log (listing) handled by Fortran: (CLose LIsting)
159
*----------------------------------------------------------------------------*/
161
extern void CS_PROCF (csclli, CSCLLI)
166
/*----------------------------------------------------------------------------
167
* Flush standard output.
168
*----------------------------------------------------------------------------*/
170
extern void CS_PROCF (csflsh, CSFLSH)
175
/*----------------------------------------------------------------------------
176
* Initialize Fortran log (listing) files
177
*----------------------------------------------------------------------------*/
179
extern void CS_PROCF (csinit, CSINIT)
181
const cs_int_t *ifoenv, /* <-- 0: SolCom mesh; 1: Preprocesor mesh */
182
const cs_int_t *irgpar, /* <-- MPI Rank in parallel, -1 otherwise */
183
const cs_int_t *nrgpar, /* <-- Number of MPI processes, or 1 */
184
const cs_int_t *nthpar, /* <-- Number of threads */
185
const cs_int_t *ilisr0, /* <-- Output of main log (listing (rank 0): */
186
/* 0: non redirected; 1: to 'listing' file */
187
const cs_int_t *ilisrp /* <-- Output of logs for ranks > 0: */
188
/* 0: non redirected; 1: to 'listing_n*' files */
189
/* 2: to '/dev/null' (suppressed) */
192
/*----------------------------------------------------------------------------
193
* Print a message to standard output.
194
*----------------------------------------------------------------------------*/
196
extern void CS_PROCF (csprnt, CSPRNT)
202
/*----------------------------------------------------------------------------
203
* Developper function for output of variables on a post-processing mesh
204
*----------------------------------------------------------------------------*/
206
extern void CS_PROCF (dvvpst, DVVPST)
208
const cs_int_t *idbia0, /* <-> number of first free position in IA */
209
const cs_int_t *idbra0, /* <-> number of first free position in RA */
210
const cs_int_t *nummai, /* <-- number or post-processing mesh */
211
const cs_int_t *numtyp, /* <-- number or post-processing type
212
* (-1 as volume, -2 as boundary, or nummai) */
213
const cs_int_t *ndim, /* <-- spatial dimension */
214
const cs_int_t *ncelet, /* <-- number of extended (real + ghost) cells */
215
const cs_int_t *ncel, /* <-- number of cells */
216
const cs_int_t *nfac, /* <-- number of interior faces */
217
const cs_int_t *nfabor, /* <-- number of boundary faces */
218
const cs_int_t *nfml, /* <-- number of families (group classes) */
219
const cs_int_t *nprfml, /* <-- number of family (group class) properties */
220
const cs_int_t *nnod, /* <-- number of vertices */
221
const cs_int_t *lndfac, /* <-- size of nodfac */
222
const cs_int_t *lndfbr, /* <-- size of nodfbr */
223
const cs_int_t *ncelbr, /* <-- number of cells on boundary */
224
const cs_int_t *nvar, /* <-- number of variables */
225
const cs_int_t *nscal, /* <-- number of scalars */
226
const cs_int_t *nphas, /* <-- nulber of phases */
227
const cs_int_t *nvlsta, /* <-- number of statistical variables (lagr) */
228
const cs_int_t *nvisbr, /* <-- number of boundary stat. variables (lagr) */
229
const cs_int_t *ncelps, /* <-- number of post-processed cells */
230
const cs_int_t *nfacps, /* <-- number of post processed interior faces */
231
const cs_int_t *nfbrps, /* <-- number of post processed boundary faces */
232
const cs_int_t *nideve, /* <-- size of IDEVEL integer array */
233
const cs_int_t *nrdeve, /* <-- size of rdevel floating-point array */
234
const cs_int_t *nituse, /* <-- size of ITUSER integer array */
235
const cs_int_t *nrtuse, /* <-- size of RTUSER floating-point array */
236
const cs_int_t itypps[3], /* <-- flag (0 or 1) for presence of cells, */
237
/* interior faces, and boundary faces */
238
const cs_int_t ifacel[], /* <-- interior faces / cells connectivity */
239
const cs_int_t ifabor[], /* <-- boundary faces / cell connectivity */
240
const cs_int_t ifmfbr[], /* <-- boundary face families */
241
const cs_int_t ifmcel[], /* <-- cell families */
242
const cs_int_t iprfml[], /* <-- list of family properties */
243
const cs_int_t ipnfac[], /* <-- interior faces -> vertices connect. index */
244
const cs_int_t nodfac[], /* <-- interior faces -> vertices connectivity */
245
const cs_int_t ipnfbr[], /* <-- boundary faces -> vertices connect. index */
246
const cs_int_t nodfbr[], /* <-- boundary faces -> vertices connectivity */
247
const cs_int_t lstcel[], /* <-- list of post-processed cells */
248
const cs_int_t lstfac[], /* <-- list of post-processed interior faces */
249
const cs_int_t lstfbr[], /* <-- list of post-processed boundary faces */
250
const cs_int_t idevel[], /* <-- IDEVEL integer array */
251
cs_int_t ituser[], /* <-- ITUSER integer array */
252
cs_int_t ia[], /* <-- IA integer array */
253
const cs_real_t xyzcen[], /* <-- points associated with cell centers */
254
const cs_real_t surfac[], /* <-- interior face surface vectors */
255
const cs_real_t surfbo[], /* <-- boundary face surface vectors */
256
const cs_real_t cdgfac[], /* <-- interior face centers */
257
const cs_real_t cdgfbr[], /* <-- boundary face vectors */
258
const cs_real_t xyznod[], /* <-- vertex coordinates (optional) */
259
const cs_real_t volume[], /* <-- cell volumes */
260
const cs_real_t dt[], /* <-- local time step */
261
const cs_real_t rtpa[], /* <-- cell variables at previous time step */
262
const cs_real_t rtp[], /* <-- cell variables */
263
const cs_real_t propce[], /* <-- cell physical properties */
264
const cs_real_t propfa[], /* <-- interior face physical properties */
265
const cs_real_t propfb[], /* <-- boundary face physical properties */
266
const cs_real_t coefa[], /* <-- boundary conditions array */
267
const cs_real_t coefb[], /* <-- boundary conditions array */
268
const cs_real_t statce[], /* <-- cell statistics (Lagrangian) */
269
const cs_real_t stativ[], /* <-- cell variance statistics (Lagrangian) */
270
const cs_real_t statfb[], /* <-- boundary face statistics (Lagrangian) */
271
cs_real_t tracel[], /* --- work array for output cells */
272
cs_real_t trafac[], /* --- work array for output interior faces */
273
cs_real_t trafbr[], /* --- work array for output boundary faces */
274
const cs_real_t rdevel[], /* <-- RDEVEL floating-point array */
275
cs_real_t rtuser[], /* <-- RTUSER floating-point array */
276
cs_real_t ra[] /* <-- RA floating-point array */
279
/*----------------------------------------------------------------------------
280
* Find the nearest cell's center from a node
281
*----------------------------------------------------------------------------*/
283
extern void CS_PROCF (findpt, FINDPT)
285
const cs_int_t *ncelet, /* <-- number of extended (real + ghost) cells */
286
const cs_int_t *ncel, /* <-- number of cells */
287
const cs_real_t *xyzcen, /* <-- cell centers */
288
const cs_real_t *xx, /* <-- node coordinate X */
289
const cs_real_t *yy, /* <-- node coordinate Y */
290
const cs_real_t *zz, /* <-- node coordinate Z */
291
cs_int_t *node, /* --> node we are looking for, zero if error */
292
cs_int_t *ndrang /* --> rank of associated process */
295
/*----------------------------------------------------------------------------
296
* Compute gradients using least squares method (standard or extended
298
*----------------------------------------------------------------------------*/
300
extern void CS_PROCF (gradmc, GRADMC)
302
const cs_int_t *ncelet, /* <-- number of extended (real + ghost) cells */
303
const cs_int_t *ncel, /* <-- number of cells */
304
const cs_int_t *nfac, /* <-- number of interior faces */
305
const cs_int_t *nfabor, /* <-- number of boundary faces */
306
const cs_int_t *ncelbr, /* <-- number of cells on boundary */
307
const cs_int_t *inc, /* <-- 0 or 1: increment or not */
308
const cs_int_t *iccocg, /* <-- 1 or 0: recompute COCG or not */
309
const cs_int_t *nswrgp, /* <-- >1: with reconstruction */
310
const cs_int_t *idimte, /* <-- 0, 1, 2: scalar, vector, tensor */
311
const cs_int_t *itenso, /* <-- for rotational periodicity */
312
const cs_int_t *iphydp, /* <-- use hydrosatatic pressure */
313
const cs_int_t *imrgra, /* <-- gradient computation mode */
314
const cs_int_t *iwarnp, /* <-- verbosity level */
315
const cs_int_t *nfecra, /* <-- standard output unit */
316
const cs_real_t *epsrgp, /* <-- precision for iterative gradient calc. */
317
const cs_real_t *extrap, /* <-- extrapolate gradient at boundary */
318
const cs_int_t ifacel[], /* <-- interior face->cell connectivity */
319
const cs_int_t ifabor[], /* <-- boundary face->cell connectivity */
320
const cs_int_t icelbr[], /* <-- list of cells on boundary */
321
const cs_int_t ipcvse[], /* <-- cells -> ext. neighborhood cells index */
322
const cs_int_t ielvse[], /* <-- cells -> ext. neighborhood cells list */
323
const cs_int_t isympa[], /* <-- indicator for symmetry faces */
324
const cs_real_t volume[], /* <-- cell volumes */
325
const cs_real_t surfac[], /* <-- surfaces of interior faces */
326
const cs_real_t surfbo[], /* <-- surfaces of boundary faces */
327
const cs_real_t surfbn[], /* <-- norm of surfbo */
328
const cs_real_t pond[], /* <-- interior faces geometric weight */
329
const cs_real_t dist[], /* <-- interior faces I' to J' distance */
330
const cs_real_t distbr[], /* <-- boundary faces I' to J' distance */
331
const cs_real_t dijpf[], /* <-- interior faces I'J' vector */
332
const cs_real_t diipb[], /* <-- boundary faces II' vector */
333
const cs_real_t fextx[], /* <-- components of the exterior force */
334
const cs_real_t fexty[], /* generating the hydrostatic pressure */
335
const cs_real_t fextz[],
336
const cs_real_t xyzcen[], /* <-- cell centers */
337
const cs_real_t cdgfac[], /* <-- interior face centers of gravity */
338
const cs_real_t cdgfbo[], /* <-- boundary face centers of gravity */
339
const cs_real_t coefap[], /* <-- boundary condition term */
340
const cs_real_t coefbp[], /* <-- boundary condition term */
341
const cs_real_t pvar[], /* <-- gradient's base variable */
342
cs_real_t cocgb[], /* <-> contribution to COCG of cells on
343
on boundary's interior faces */
344
cs_real_t cocg[], /* <-> contribution to COCG of cells on
345
on boundary's boundary faces */
346
cs_real_t dpdx[], /* --> gradient x component */
347
cs_real_t dpdy[], /* --> gradient y component */
348
cs_real_t dpdz[], /* --> gradient z component */
349
cs_real_t bx[], /* --- local work array */
350
cs_real_t by[], /* --- local work array */
351
cs_real_t bz[] /* --- local work array */
354
/*----------------------------------------------------------------------------
355
* Main Fortran options initialization
356
*----------------------------------------------------------------------------*/
358
extern void CS_PROCF (initi1, INITI1)
360
const cs_int_t *iverif /* <-- Activate elementary tests */
363
/*----------------------------------------------------------------------------
364
* Get parameters necessary for post-processing initialization from
366
*----------------------------------------------------------------------------*/
368
void CS_PROCF (inipst, INIPST)
370
const cs_int_t *ichrvl, /* <-- fluid volume post processing indicator */
371
const cs_int_t *ichrbo, /* <-- boundary faces post processing indicator */
372
const cs_int_t *ichrsy, /* <-- post processing indicator for faces
373
* coupled with SYRTHES */
374
const cs_int_t *ichrze, /* <-- post processing indicator for cooling
375
* tower exchange zones */
376
const cs_int_t *ipstmd, /* <-- deformable mesh flag
377
* 0: no time dependency
378
* 1: deformable post processing meshes
379
* 2: output of a displacement field */
380
const cs_int_t *ntchr, /* <-- frequency of post processing output */
381
const char *fmtchr, /* <-- name of main output format */
382
const char *optchr /* <-- options for main output format */
385
/*----------------------------------------------------------------------------
386
* Read geometric entities in "SolCom" format
387
*----------------------------------------------------------------------------*/
389
void CS_PROCF (letgeo, LETGEO)
391
const cs_int_t *ndim, /* <-- space dimension */
392
const cs_int_t *ncelet, /* <-- number of extended (real + ghost) cells */
393
const cs_int_t *ncel, /* <-- number of cells */
394
const cs_int_t *nfac, /* <-- number of interior faces */
395
const cs_int_t *nfabor, /* <-- number of boundary faces */
396
const cs_int_t *nfml, /* <-- number of familes */
397
const cs_int_t *nprfml, /* <-- number of family properties */
398
const cs_int_t *nnod, /* <-- number of vertices */
399
const cs_int_t *lndfac, /* <-- size of interior faces -> vertices array */
400
const cs_int_t *lndfbr, /* <-- size of boundary faces -> vertices array */
401
const cs_int_t *ntetra, /* <-- number of tetrahedra */
402
const cs_int_t *npyram, /* <-- number of pyramids */
403
const cs_int_t *nprism, /* <-- number of prisms */
404
const cs_int_t *nhexae, /* <-- number of hexahedra */
405
cs_int_t *inodal, /* --> indicates if we should read the nodal */
406
/* connectivity for post-processing */
407
cs_int_t ifacel[], /* --> interior faces -> cells connectivity */
408
cs_int_t ifabor[], /* --> boundary faces -> cells connectivity */
409
cs_int_t ifmfbr[], /* --> boundary face families */
410
cs_int_t ifmcel[], /* --> cell families */
411
cs_int_t iprfml[], /* --> list of family properties */
412
cs_int_t icotet[], /* --> nodal connectivity for tetrahedra */
413
cs_int_t icopyr[], /* --> nodal connectivity for pyramids */
414
cs_int_t icopri[], /* --> nodal conncetivity for prisms */
415
cs_int_t icohex[], /* --> nodal connectivity for hexahedra */
416
cs_int_t ipnfac[], /* --> interior faces -> vertices index */
417
cs_int_t nodfac[], /* --> interior faces -> vertices connectivity */
418
cs_int_t ipnfbr[], /* --> boundary faces -> vertices index */
419
cs_int_t nodfbr[], /* --> boundary faces -> vertices connectivity */
420
cs_real_t xyzcen[], /* --> cell centers */
421
cs_real_t surfac[], /* --> interior face surface vectors */
422
cs_real_t surfbo[], /* --> boundary face surface vectors */
423
cs_real_t cdgfac[], /* --> interior face centers */
424
cs_real_t cdgfbo[], /* --> boundary face centers */
425
cs_real_t xyznod[] /* --> vertex coordinates */
428
/*----------------------------------------------------------------------------
429
* Update mesh dimensions in Fortran commons
430
*----------------------------------------------------------------------------*/
432
extern void CS_PROCF (majgeo, MAJGEO)
434
const cs_int_t *ncel, /* <-- number of cells */
435
const cs_int_t *ncelet, /* <-- number of extended (real + ghost) cells */
436
const cs_int_t *nfac, /* <-- number of interior faces */
437
const cs_int_t *nfabor, /* <-- number of boundary faces */
438
const cs_int_t *nsom, /* <-- number of vertices */
439
const cs_int_t *lndfac, /* <-- interior face -> vertices array size */
440
const cs_int_t *lndfbr, /* <-- boundary face -> vertices array size */
441
const cs_int_t *ncelgb, /* <-- global number of cells */
442
const cs_int_t *nfacgb, /* <-- global number of interior faces */
443
const cs_int_t *nfbrgb, /* <-- global number of boundary faces */
444
const cs_int_t *nsomgb, /* <-- global number of vertices */
445
const cs_int_t *nthrdi, /* <-- max threads per interior faces group */
446
const cs_int_t *nthrdb, /* <-- max threads per boundary faces group */
447
const cs_int_t *ngrpi, /* <-- number of interior face groups */
448
const cs_int_t *ngrpb, /* <-- number of boundary face groups */
449
const cs_int_t *idxfi, /* <-- interior face group/thread start/end ids */
450
const cs_int_t *idxfb /* <-- boundary face group/thread start/end ids */
453
/*----------------------------------------------------------------------------
454
* Initialize Fortran working array sizes
455
*----------------------------------------------------------------------------*/
457
extern void CS_PROCF (memini, MEMINI)
459
cs_int_t *iasize, /* --- size of IA integer array */
460
cs_int_t *rasize, /* --- size of RA integer array */
461
cs_int_t *nideve, /* --- size of IDEVEL integer array */
462
cs_int_t *nrdeve, /* --- size of rdevel floating-point array */
463
cs_int_t *nituse, /* --- size of ITUSER integer array */
464
cs_int_t *nrtuse /* --- size of RTUSER floating-point array */
467
/*----------------------------------------------------------------------------
468
* Mesh renumbering for vector processors
469
*----------------------------------------------------------------------------*/
471
extern void CS_PROCF (numvec, NUMVEC)
473
const cs_int_t *ncelet, /* <-- number of extended (real + ghost) cells */
474
const cs_int_t *ncel, /* <-- number of local cells */
475
const cs_int_t *nfac, /* <-- number of interior faces */
476
const cs_int_t *nfabor, /* <-- number of boundary faces */
477
const cs_int_t *lregis, /* <-- vector registor length */
478
cs_int_t *irveci, /* <-> interior face vectorization indic. */
479
cs_int_t *irvecb, /* <-> boundary face vectorization indic. */
480
cs_int_t ifacel[], /* <-- interior face->cell connectivity */
481
cs_int_t ifabor[], /* <-- boundary face->cell connectivity */
482
cs_int_t inumfi[], /* <-> interior faces renumbering (size: nfac) */
483
cs_int_t inumfb[], /* <-> boundary faces renumbering (size: nfabor) */
484
cs_int_t iworkf[], /* --- work array, size: max(nfac, nfabor) */
485
cs_int_t ismbs[] /* --- work array, size: ncelet */
488
/*----------------------------------------------------------------------------
489
* Test renumbering for vector processors
490
*----------------------------------------------------------------------------*/
492
extern void CS_PROCF (tstvec, TSTVEC)
494
const cs_int_t *ncelet, /* <-- number of extended (real + ghost) cells */
495
const cs_int_t *ncel, /* <-- number of local cells */
496
const cs_int_t *nfac, /* <-- number of interior faces */
497
const cs_int_t *nfabor, /* <-- number of boundary faces */
498
const cs_int_t ifacel[], /* <-- interior face->cell connectivity */
499
const cs_int_t ifabor[], /* <-- boundary face->cell connectivity */
500
cs_int_t iworkf[], /* --- work array, size: max(nfac, nfabor) */
501
cs_int_t ismbs[], /* --- work array, size: ncelet */
502
cs_int_t ismbv[], /* --- work array, size: ncelet */
503
cs_real_t rworkf[], /* --- work array, size: max(nfac, nfabor) */
504
cs_real_t rsmbs[], /* --- work array, size: ncelet */
505
cs_real_t rsmbv[] /* --- work array, size: ncelet */
508
/*----------------------------------------------------------------------------
509
* User function for mesh joining definition
510
*----------------------------------------------------------------------------*/
512
extern void CS_PROCF (usjoin, USJOIN) (void);
514
/*----------------------------------------------------------------------------
515
* User subroutine for geometry modification
516
*----------------------------------------------------------------------------*/
518
extern void CS_PROCF (usmodg, USMODG)
520
const cs_int_t *ndim, /* <-- spatial dimension */
521
const cs_int_t *ncelet, /* <-- number of extended (real + ghost) cells */
522
const cs_int_t *ncel, /* <-- number of cells */
523
const cs_int_t *nfac, /* <-- number of interior faces */
524
const cs_int_t *nfabor, /* <-- number of boundary faces */
525
const cs_int_t *nfml, /* <-- number of families (group classes) */
526
const cs_int_t *nprfml, /* <-- number of family (group class) properties */
527
const cs_int_t *nnod, /* <-- number of vertices */
528
const cs_int_t *lndfac, /* <-- size of nodfac */
529
const cs_int_t *lndfbr, /* <-- size of nodfbr */
530
const cs_int_t ifacel[], /* <-- interior faces / cells connectivity */
531
const cs_int_t ifabor[], /* <-- boundary faces / cell connectivity */
532
const cs_int_t ifmfbr[], /* <-- boundary face families */
533
const cs_int_t ifmcel[], /* <-- cell families */
534
const cs_int_t iprfml[], /* <-- list of family properties */
535
const cs_int_t ipnfac[], /* <-- interior faces -> vertices connect. index */
536
const cs_int_t nodfac[], /* <-- interior faces -> vertices connectivity */
537
const cs_int_t ipnfbr[], /* <-- boundary faces -> vertices connect. index */
538
const cs_int_t nodfbr[], /* <-- boundary faces -> vertices connectivity */
539
cs_real_t xyznod[] /* --> vertex coordinates */
542
/*----------------------------------------------------------------------------
543
* User function for mesh periodicity definition
544
*----------------------------------------------------------------------------*/
546
extern void CS_PROCF (usperi, USPERI) (void);
548
/*----------------------------------------------------------------------------
549
* User function for modification of a post-processing mesh
550
*----------------------------------------------------------------------------*/
552
void CS_PROCF (usmpst, USMPST)
554
const cs_int_t *idbia0, /* <-> number of first free position in IA */
555
const cs_int_t *idbra0, /* <-> number of first free position in RA */
556
const cs_int_t *nummai, /* <-- number or post-processing mesh */
557
const cs_int_t *ndim, /* <-- spatial dimension */
558
const cs_int_t *ncelet, /* <-- number of extended (real + ghost) cells */
559
const cs_int_t *ncel, /* <-- number of cells */
560
const cs_int_t *nfac, /* <-- number of interior faces */
561
const cs_int_t *nfabor, /* <-- number of boundary faces */
562
const cs_int_t *nfml, /* <-- number of families (group classes) */
563
const cs_int_t *nprfml, /* <-- number of family (group class) properties */
564
const cs_int_t *nnod, /* <-- number of vertices */
565
const cs_int_t *lndfac, /* <-- size of nodfac */
566
const cs_int_t *lndfbr, /* <-- size of nodfbr */
567
const cs_int_t *ncelbr, /* <-- number of cells on boundary */
568
const cs_int_t *nvar, /* <-- number of variables */
569
const cs_int_t *nscal, /* <-- number of scalars */
570
const cs_int_t *nphas, /* <-- number of phases */
571
const cs_int_t *nvlsta, /* <-- number of statistical variables (lagr) */
572
cs_int_t *ncelps, /* <-> number of post-processed cells */
573
cs_int_t *nfacps, /* <-> number of post processed interior faces */
574
cs_int_t *nfbrps, /* <-> number of post processed boundary faces */
575
const cs_int_t *nideve, /* <-- size of IDEVEL integer array */
576
const cs_int_t *nrdeve, /* <-- size of rdevel floating-point array */
577
const cs_int_t *nituse, /* <-- size of ITUSER integer array */
578
const cs_int_t *nrtuse, /* <-- size of RTUSER floating-point array */
579
cs_int_t *imodif, /* <-> 1 if mesh is modified, 0 otherwise */
580
const cs_int_t itypps[3], /* <-- flag (0 or 1) for presence of cells, */
581
/* interior faces, and boundary faces */
582
const cs_int_t ifacel[], /* <-- interior faces / cells connectivity */
583
const cs_int_t ifabor[], /* <-- boundary faces / cell connectivity */
584
const cs_int_t ifmfbr[], /* <-- boundary face families */
585
const cs_int_t ifmcel[], /* <-- cell families */
586
const cs_int_t iprfml[], /* <-- list of family properties */
587
const cs_int_t ipnfac[], /* <-- interior faces -> vertices connect. index */
588
const cs_int_t nodfac[], /* <-- interior faces -> vertices connectivity */
589
const cs_int_t ipnfbr[], /* <-- boundary faces -> vertices connect. index */
590
const cs_int_t nodfbr[], /* <-- boundary faces -> vertices connectivity */
591
cs_int_t lstcel[], /* <-> list of post-processed cells */
592
cs_int_t lstfac[], /* <-> list of post-processed interior faces */
593
cs_int_t lstfbr[], /* <-> list of post-processed boundary faces */
594
const cs_int_t idevel[], /* <-- IDEVEL integer array */
595
cs_int_t ituser[], /* <-- ITUSER integer array */
596
cs_int_t ia[], /* <-- IA integer array */
597
const cs_real_t xyzcen[], /* <-- points associated with cell centers */
598
const cs_real_t surfac[], /* <-- interior face surface vectors */
599
const cs_real_t surfbo[], /* <-- boundary face surface vectors */
600
const cs_real_t cdgfac[], /* <-- interior face centers */
601
const cs_real_t cdgfbr[], /* <-- boundary face vectors */
602
const cs_real_t xyznod[], /* <-- vertex coordinates (optional) */
603
const cs_real_t volume[], /* <-- cell volumes */
604
const cs_real_t dt[], /* <-- local time step */
605
const cs_real_t rtpa[], /* <-- cell variables at previous time step */
606
const cs_real_t rtp[], /* <-- cell variables */
607
const cs_real_t propce[], /* <-- cell physical properties */
608
const cs_real_t propfa[], /* <-- interior face physical properties */
609
const cs_real_t propfb[], /* <-- boundary face physical properties */
610
const cs_real_t coefa[], /* <-- boundary conditions array */
611
const cs_real_t coefb[], /* <-- boundary conditions array */
612
const cs_real_t statce[], /* <-- cell statistics (Lagrangian) */
613
cs_real_t tracel[], /* --- work array for output cells */
614
cs_real_t trafac[], /* --- work array for output interior faces */
615
cs_real_t trafbr[], /* --- work array for output boundary faces */
616
const cs_real_t rdevel[], /* <-- RDEVEL floating-point array */
617
cs_real_t rtuser[], /* <-- RTUSER floating-point array */
618
cs_real_t ra[] /* <-- RA floating-point array */
621
/*----------------------------------------------------------------------------
622
* User function for output of variables on a post-processing mesh
623
*----------------------------------------------------------------------------*/
625
void CS_PROCF (usvpst, USVPST)
627
const cs_int_t *idbia0, /* <-> number of first free position in IA */
628
const cs_int_t *idbra0, /* <-> number of first free position in RA */
629
const cs_int_t *nummai, /* <-- number or post-processing mesh */
630
const cs_int_t *ndim, /* <-- spatial dimension */
631
const cs_int_t *ncelet, /* <-- number of extended (real + ghost) cells */
632
const cs_int_t *ncel, /* <-- number of cells */
633
const cs_int_t *nfac, /* <-- number of interior faces */
634
const cs_int_t *nfabor, /* <-- number of boundary faces */
635
const cs_int_t *nfml, /* <-- number of families (group classes) */
636
const cs_int_t *nprfml, /* <-- number of family (group class) properties */
637
const cs_int_t *nnod, /* <-- number of vertices */
638
const cs_int_t *lndfac, /* <-- size of nodfac */
639
const cs_int_t *lndfbr, /* <-- size of nodfbr */
640
const cs_int_t *ncelbr, /* <-- number of cells on boundary */
641
const cs_int_t *nvar, /* <-- number of variables */
642
const cs_int_t *nscal, /* <-- number of scalars */
643
const cs_int_t *nphas, /* <-- number of phases */
644
const cs_int_t *nvlsta, /* <-- number of statistical variables (lagr) */
645
const cs_int_t *ncelps, /* <-- number of post-processed cells */
646
const cs_int_t *nfacps, /* <-- number of post processed interior faces */
647
const cs_int_t *nfbrps, /* <-- number of post processed boundary faces */
648
const cs_int_t *nideve, /* <-- size of IDEVEL integer array */
649
const cs_int_t *nrdeve, /* <-- size of RDEVEL floating-point array */
650
const cs_int_t *nituse, /* <-- size of ITUSER integer array */
651
const cs_int_t *nrtuse, /* <-- size of RTUSER floating-point array */
652
const cs_int_t itypps[3], /* <-- flag (0 or 1) for presence of cells, */
653
/* interior faces, and boundary faces */
654
const cs_int_t ifacel[], /* <-- interior faces / cells connectivity */
655
const cs_int_t ifabor[], /* <-- boundary faces / cell connectivity */
656
const cs_int_t ifmfbr[], /* <-- boundary face families */
657
const cs_int_t ifmcel[], /* <-- cell families */
658
const cs_int_t iprfml[], /* <-- list of family properties */
659
const cs_int_t ipnfac[], /* <-- interior faces -> vertices connect. index */
660
const cs_int_t nodfac[], /* <-- interior faces -> vertices connectivity */
661
const cs_int_t ipnfbr[], /* <-- boundary faces -> vertices connect. index */
662
const cs_int_t nodfbr[], /* <-- boundary faces -> vertices connectivity */
663
const cs_int_t lstcel[], /* <-- list of post-processed cells */
664
const cs_int_t lstfac[], /* <-- list of post-processed interior faces */
665
const cs_int_t lstfbr[], /* <-- list of post-processed boundary faces */
666
const cs_int_t idevel[], /* <-- IDEVEL integer array */
667
cs_int_t ituser[], /* <-- ITUSER integer array */
668
cs_int_t ia[], /* <-- IA integer array */
669
const cs_real_t xyzcen[], /* <-- points associated with cell centers */
670
const cs_real_t surfac[], /* <-- interior face surface vectors */
671
const cs_real_t surfbo[], /* <-- boundary face surface vectors */
672
const cs_real_t cdgfac[], /* <-- interior face centers */
673
const cs_real_t cdgfbr[], /* <-- boundary face vectors */
674
const cs_real_t xyznod[], /* <-- vertex coordinates (optional) */
675
const cs_real_t volume[], /* <-- cell volumes */
676
const cs_real_t dt[], /* <-- local time step */
677
const cs_real_t rtpa[], /* <-- cell variables at previous time step */
678
const cs_real_t rtp[], /* <-- cell variables */
679
const cs_real_t propce[], /* <-- cell physical properties */
680
const cs_real_t propfa[], /* <-- interior face physical properties */
681
const cs_real_t propfb[], /* <-- boundary face physical properties */
682
const cs_real_t coefa[], /* <-- boundary conditions array */
683
const cs_real_t coefb[], /* <-- boundary conditions array */
684
const cs_real_t statce[], /* <-- cell statistics (Lagrangian) */
685
cs_real_t tracel[], /* --- work array for output cells */
686
cs_real_t trafac[], /* --- work array for output interior faces */
687
cs_real_t trafbr[], /* --- work array for output boundary faces */
688
const cs_real_t rdevel[], /* <-- RDEVEL floating-point array */
689
cs_real_t rtuser[], /* <-- RTUSER floating-point array */
690
cs_real_t ra[] /* <-- RA floating-point array */
693
/*----------------------------------------------------------------------------
694
* User function to compute coarsening array for algebraic multigrid
695
*----------------------------------------------------------------------------*/
697
extern void CS_PROCF (ustmgr, USTMGR)
699
const cs_int_t *iappel, /* <-- 1: initialization call
700
2: computional call */
701
const cs_int_t *igr, /* <-- new grid level (0 = base) */
702
const cs_int_t *isym, /* <-- 1: symmetric; 2 nonsymmteric */
703
const cs_int_t *ncelf, /* <-- number of cells in fine grid */
704
const cs_int_t *ncelfe, /* <-- number of cells with halo in fine grid */
705
const cs_int_t *nfacf, /* <-- number of faces in fine grid */
706
const cs_int_t *iwarnp, /* <-- verbosity level */
707
cs_int_t *iusmgr, /* --> 0: automatic method
708
1: use this sub-routine */
709
cs_int_t *niw, /* --> size of iw for call 2 */
710
cs_int_t *nrw, /* --> size of rw for call 2 */
711
const cs_int_t ifacef[], /* <-- fine grid face->cell connectivity */
712
const cs_real_t daf[], /* <-- diagonal terms of fine grid */
713
const cs_real_t xaf[], /* <-- extradiagonal terms of fine grid */
714
const cs_real_t surfaf[], /* <-- fine grid face surface vectors */
715
const cs_real_t volumf[], /* <-- fine grid cell volumes */
716
const cs_real_t xyzfin[], /* <-- fine grid cell centers */
717
cs_int_t irscel[], /* --> Fine -> coarse cell connectivity */
718
cs_int_t iw[], /* --> work array of size niw (call 2) */
719
cs_real_t rw[] /* --> work array of size nrw (call 2) */
722
/*----------------------------------------------------------------------------*/
726
#endif /* __CS_PROTOTYPES_H__ */