8.3
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-2024 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
63typedef cs_real_t
65 const cs_real_t *b);
66
67/*----------------------------------------------------------------------------*/
76/*----------------------------------------------------------------------------*/
77
78typedef cs_real_t
80
81/*----------------------------------------------------------------------------*/
94/*----------------------------------------------------------------------------*/
95
96typedef cs_real_t
98 const cs_real_t *b);
99
100/*============================================================================
101 * Public function prototypes
102 *============================================================================*/
103
104/*----------------------------------------------------------------------------*/
111/*----------------------------------------------------------------------------*/
112
113void
115 const cs_cdo_connect_t *connect);
116
117/*----------------------------------------------------------------------------*/
128/*----------------------------------------------------------------------------*/
129
132
133/*----------------------------------------------------------------------------*/
145/*----------------------------------------------------------------------------*/
146
149 const cs_real_t *b);
150
151/*----------------------------------------------------------------------------*/
165/*----------------------------------------------------------------------------*/
166
169 const cs_real_t *ref);
170
171/*----------------------------------------------------------------------------*/
183/*----------------------------------------------------------------------------*/
184
185double
187 const cs_real_t *b);
188
189/*----------------------------------------------------------------------------*/
199/*----------------------------------------------------------------------------*/
200
201double
203
204/*----------------------------------------------------------------------------*/
218/*----------------------------------------------------------------------------*/
219
220double
222 const cs_real_t *b);
223
224/*----------------------------------------------------------------------------*/
235/*----------------------------------------------------------------------------*/
236
239
240/*----------------------------------------------------------------------------*/
252/*----------------------------------------------------------------------------*/
253
256 const cs_real_t *b);
257
258/*----------------------------------------------------------------------------*/
270/*----------------------------------------------------------------------------*/
271
272double
274
275/*----------------------------------------------------------------------------*/
289/*----------------------------------------------------------------------------*/
290
291double
293 const cs_real_t *b);
294
295/*----------------------------------------------------------------------------*/
307/*----------------------------------------------------------------------------*/
308
311 const cs_real_t *b);
312
313/*----------------------------------------------------------------------------*/
323/*----------------------------------------------------------------------------*/
324
327
328/*----------------------------------------------------------------------------*/
339/*----------------------------------------------------------------------------*/
340
343
344/*----------------------------------------------------------------------------*/
355/*----------------------------------------------------------------------------*/
356
359
360/*----------------------------------------------------------------------------*/
374/*----------------------------------------------------------------------------*/
375
378 const cs_real_t *b);
379
380/*----------------------------------------------------------------------------*/
392/*----------------------------------------------------------------------------*/
393
396
397/*----------------------------------------------------------------------------*/
410/*----------------------------------------------------------------------------*/
411
414 const cs_real_t *b);
415
416/*----------------------------------------------------------------------------*/
417
419
420#endif /* __CS_CDO_BLAS_H__ */
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.cpp:642
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.cpp:375
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.cpp:458
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.cpp:1040
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.cpp:1089
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 inside th...
Definition: cs_cdo_blas.h:79
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.cpp:1210
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.cpp:1021
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.cpp:1117
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.cpp:661
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.cpp:890
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.cpp:929
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.cpp:774
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.cpp:687
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:97
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.cpp:1064
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.cpp:1303
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.cpp:545
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.cpp:352
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.cpp:800
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 inside th...
Definition: cs_cdo_blas.h:64
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
#define END_C_DECLS
Definition: cs_defs.h:543
Definition: cs_cdo_connect.h:61
Definition: cs_cdo_quantities.h:139