7.1
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-2021 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 /*----------------------------------------------------------------------------*/
181 /*----------------------------------------------------------------------------*/
182 
183 cs_real_t
185 
186 /*----------------------------------------------------------------------------*/
198 /*----------------------------------------------------------------------------*/
199 
200 cs_real_t
202  const cs_real_t *b);
203 
204 /*----------------------------------------------------------------------------*/
214 /*----------------------------------------------------------------------------*/
215 
216 cs_real_t
218 
219 /*----------------------------------------------------------------------------*/
231 /*----------------------------------------------------------------------------*/
232 
233 cs_real_t
235 
236 /*----------------------------------------------------------------------------*/
248 /*----------------------------------------------------------------------------*/
249 
250 cs_real_t
252 
253 /*----------------------------------------------------------------------------*/
267 /*----------------------------------------------------------------------------*/
268 
269 cs_real_t
271  const cs_real_t *b);
272 
273 /*----------------------------------------------------------------------------*/
285 /*----------------------------------------------------------------------------*/
286 
287 cs_real_t
289 
290 /*----------------------------------------------------------------------------*/
303 /*----------------------------------------------------------------------------*/
304 
305 cs_real_t
307  const cs_real_t *b);
308 
309 /*----------------------------------------------------------------------------*/
310 
312 
313 #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:653
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:917
Definition: cs_cdo_connect.h:79
double cs_real_t
Floating-point value.
Definition: cs_defs.h:322
Definition: cs_cdo_quantities.h:129
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
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:608
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:703
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:429
#define END_C_DECLS
Definition: cs_defs.h:511
void cs_cdo_blas_set_shared_pointers(const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect)
Set shared pointers to main domain members.
Definition: cs_cdo_blas.c:325
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:634
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:677
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:731
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:514
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:347
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:824
double precision, save b
Definition: cs_fuel_incl.f90:146