7.2
general documentation
cs_cdo_blas.h
Go to the documentation of this file.
1 #ifndef __CS_CDO_BLAS_H__
2 #define __CS_CDO_BLAS_H__
3 
4 /*============================================================================
5  * Functions computing BLAS 1 operations (like square norms and dot products
6  * from CDO quantities)
7  *============================================================================*/
8 
9 /*
10  This file is part of code_saturne, a general-purpose CFD tool.
11 
12  Copyright (C) 1998-2022 EDF S.A.
13 
14  This program is free software; you can redistribute it and/or modify it under
15  the terms of the GNU General Public License as published by the Free Software
16  Foundation; either version 2 of the License, or (at your option) any later
17  version.
18 
19  This program is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
22  details.
23 
24  You should have received a copy of the GNU General Public License along with
25  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
26  Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 */
28 
29 /*----------------------------------------------------------------------------*/
30 
31 /*----------------------------------------------------------------------------
32  * Local headers
33  *----------------------------------------------------------------------------*/
34 
35 #include "cs_base.h"
36 #include "cs_cdo_connect.h"
37 #include "cs_cdo_quantities.h"
38 
39 /*----------------------------------------------------------------------------*/
40 
42 
43 /*============================================================================
44  * Macro definitions
45  *============================================================================*/
46 
47 /*============================================================================
48  * Type definitions
49  *============================================================================*/
50 
51 /*----------------------------------------------------------------------------*/
61 /*----------------------------------------------------------------------------*/
62 
63 typedef cs_real_t
65  const cs_real_t *b);
66 
67 /*----------------------------------------------------------------------------*/
76 /*----------------------------------------------------------------------------*/
77 
78 typedef cs_real_t
80 
81 /*----------------------------------------------------------------------------*/
93 /*----------------------------------------------------------------------------*/
94 
95 typedef cs_real_t
97  const cs_real_t *b);
98 
99 /*============================================================================
100  * Public function prototypes
101  *============================================================================*/
102 
103 /*----------------------------------------------------------------------------*/
110 /*----------------------------------------------------------------------------*/
111 
112 void
114  const cs_cdo_connect_t *connect);
115 
116 /*----------------------------------------------------------------------------*/
127 /*----------------------------------------------------------------------------*/
128 
129 cs_real_t
131 
132 /*----------------------------------------------------------------------------*/
144 /*----------------------------------------------------------------------------*/
145 
146 cs_real_t
148  const cs_real_t *b);
149 
150 /*----------------------------------------------------------------------------*/
164 /*----------------------------------------------------------------------------*/
165 
166 cs_real_t
168  const cs_real_t *ref);
169 
170 /*----------------------------------------------------------------------------*/
182 /*----------------------------------------------------------------------------*/
183 
184 double
186  const cs_real_t *b);
187 
188 /*----------------------------------------------------------------------------*/
198 /*----------------------------------------------------------------------------*/
199 
200 double
202 
203 /*----------------------------------------------------------------------------*/
217 /*----------------------------------------------------------------------------*/
218 
219 double
221  const cs_real_t *b);
222 
223 /*----------------------------------------------------------------------------*/
234 /*----------------------------------------------------------------------------*/
235 
236 cs_real_t
238 
239 /*----------------------------------------------------------------------------*/
251 /*----------------------------------------------------------------------------*/
252 
253 cs_real_t
255  const cs_real_t *b);
256 
257 /*----------------------------------------------------------------------------*/
269 /*----------------------------------------------------------------------------*/
270 
271 double
273 
274 /*----------------------------------------------------------------------------*/
288 /*----------------------------------------------------------------------------*/
289 
290 double
292  const cs_real_t *b);
293 
294 /*----------------------------------------------------------------------------*/
306 /*----------------------------------------------------------------------------*/
307 
308 cs_real_t
310  const cs_real_t *b);
311 
312 /*----------------------------------------------------------------------------*/
322 /*----------------------------------------------------------------------------*/
323 
324 cs_real_t
326 
327 /*----------------------------------------------------------------------------*/
339 /*----------------------------------------------------------------------------*/
340 
341 cs_real_t
343 
344 /*----------------------------------------------------------------------------*/
356 /*----------------------------------------------------------------------------*/
357 
358 cs_real_t
360 
361 /*----------------------------------------------------------------------------*/
375 /*----------------------------------------------------------------------------*/
376 
377 cs_real_t
379  const cs_real_t *b);
380 
381 /*----------------------------------------------------------------------------*/
393 /*----------------------------------------------------------------------------*/
394 
395 cs_real_t
397 
398 /*----------------------------------------------------------------------------*/
411 /*----------------------------------------------------------------------------*/
412 
413 cs_real_t
415  const cs_real_t *b);
416 
417 /*----------------------------------------------------------------------------*/
418 
420 
421 #endif /* __CS_CDO_BLAS_H__ */
cs_real_t() cs_cdo_blas_square_norm_diff_t(const cs_real_t *a, const cs_real_t *b)
Generic function pointer for computing a square norm of the difference between two arrays (defined at...
Definition: cs_cdo_blas.h:96
cs_real_t cs_cdo_blas_square_norm_face(const cs_real_t *array)
Compute the square norm of an array using an Euclidean 2-norm. Case of a scalar-valued array defined ...
Definition: cs_cdo_blas.c:1015
cs_real_t() cs_cdo_blas_dotprod_t(const cs_real_t *a, const cs_real_t *b)
Generic function pointer for computing a dot product. Parallel synchronization is performed...
Definition: cs_cdo_blas.h:64
#define BEGIN_C_DECLS
Definition: cs_defs.h:510
cs_real_t cs_cdo_blas_square_norm_pfsf_diff(const cs_real_t *a, const cs_real_t *b)
Compute the norm ||b - a||**2 Case of a scalar-valued array defined as a flux at primal faces...
Definition: cs_cdo_blas.c:1281
Definition: cs_cdo_connect.h:61
double cs_cdo_blas_dotprod_pvsp(const cs_real_t *a, const cs_real_t *b)
Compute the dot product of two arrays using a weighted Euclidean dot product relying on CDO quantitie...
Definition: cs_cdo_blas.c:660
double cs_real_t
Floating-point value.
Definition: cs_defs.h:322
Definition: cs_cdo_quantities.h:132
double cs_cdo_blas_square_norm_2pvsp(const cs_real_t *array)
Compute the square norm of an array Case of a non-interlaced scalar-valued array of stride = 2 define...
Definition: cs_cdo_blas.c:864
cs_real_t() cs_cdo_blas_square_norm_t(const cs_real_t *array)
Generic function pointer for computing a square norm. Parallel synchronization is performed...
Definition: cs_cdo_blas.h:79
double precision, save a
Definition: cs_fuel_incl.f90:146
void cs_cdo_blas_init_sharing(const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect)
Set shared pointers to main domain members.
Definition: cs_cdo_blas.c:330
double cs_cdo_blas_square_norm_vertex(const cs_real_t *array)
Compute the square norm of an array using an Euclidean 2-norm. Case of a scalar-valued array defined ...
Definition: cs_cdo_blas.c:634
cs_real_t cs_cdo_blas_square_norm_pvsp(const cs_real_t *array)
Compute the square norm of an array Case of a scalar-valued array defined as a potential at primal ve...
Definition: cs_cdo_blas.c:748
cs_real_t cs_cdo_blas_square_norm_pfvp(const cs_real_t *array)
Compute the square norm of an array Case of a vector-valued array defined as a potential at primal fa...
Definition: cs_cdo_blas.c:1065
cs_real_t cs_cdo_blas_square_norm_pcsp_diff(const cs_real_t *a, const cs_real_t *b)
Compute the norm ||b - a||**2 Case of two scalar-valued arrays a and b defined as a potential at prim...
Definition: cs_cdo_blas.c:435
#define END_C_DECLS
Definition: cs_defs.h:511
double cs_cdo_blas_dotprod_2pvsp(const cs_real_t *a, const cs_real_t *b)
Compute the dot product of two arrays using a weighted Euclidean dot product relying on CDO quantitie...
Definition: cs_cdo_blas.c:903
cs_real_t cs_cdo_blas_dotprod_face(const cs_real_t *a, const cs_real_t *b)
Compute the dot product of two arrays using the classical Euclidean dot product (without weight)...
Definition: cs_cdo_blas.c:996
cs_real_t cs_cdo_blas_square_norm_pfsp(const cs_real_t *array)
Compute the square norm of an array Case of a scalar-valued array defined as a potential at primal fa...
Definition: cs_cdo_blas.c:1039
cs_real_t cs_cdo_blas_dotprod_pfsf(const cs_real_t *a, const cs_real_t *b)
Compute the dot product of two arrays using a weighted Euclidean dot product relying on CDO quantitie...
Definition: cs_cdo_blas.c:1093
cs_real_t cs_cdo_blas_square_norm_pcsp_ndiff(const cs_real_t *a, const cs_real_t *ref)
Compute the norm ||a - ref||**2 / || ref||**2 Case of two scalar-valued arrays a and ref defined as a...
Definition: cs_cdo_blas.c:520
double cs_cdo_blas_dotprod_vertex(const cs_real_t *a, const cs_real_t *b)
Compute the dot product of two arrays using the classical Euclidean dot product (without weight)...
Definition: cs_cdo_blas.c:615
cs_real_t cs_cdo_blas_square_norm_pvsp_diff(const cs_real_t *a, const cs_real_t *b)
Compute the norm ||b - a||**2 Case of two scalar-valued arrays a and b defined as a potential at prim...
Definition: cs_cdo_blas.c:774
cs_real_t cs_cdo_blas_square_norm_pcsp(const cs_real_t *array)
Compute the square norm of an array Case of a scalar-valued array defined as a potential at primal ce...
Definition: cs_cdo_blas.c:353
cs_real_t cs_cdo_blas_square_norm_pfsf(const cs_real_t *array)
Compute the square norm of an array Case of a scalar-valued array defined as a flux at primal faces...
Definition: cs_cdo_blas.c:1187
double precision, save b
Definition: cs_fuel_incl.f90:146