9.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-2026 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 "base/cs_base.h"
36#include "cdo/cs_cdo_connect.h"
38
39/*============================================================================
40 * Macro definitions
41 *============================================================================*/
42
43/*============================================================================
44 * Type definitions
45 *============================================================================*/
46
47/*----------------------------------------------------------------------------*/
57/*----------------------------------------------------------------------------*/
58
60 const cs_real_t *b);
61
62/*----------------------------------------------------------------------------*/
71/*----------------------------------------------------------------------------*/
72
74
75/*----------------------------------------------------------------------------*/
88/*----------------------------------------------------------------------------*/
89
91 const cs_real_t *b);
92
93/*============================================================================
94 * Public function prototypes
95 *============================================================================*/
96
97/*----------------------------------------------------------------------------*/
104/*----------------------------------------------------------------------------*/
105
106void
108 const cs_cdo_connect_t *connect);
109
110/*----------------------------------------------------------------------------*/
121/*----------------------------------------------------------------------------*/
122
125
126/*----------------------------------------------------------------------------*/
138/*----------------------------------------------------------------------------*/
139
142
143/*----------------------------------------------------------------------------*/
157/*----------------------------------------------------------------------------*/
158
161
162/*----------------------------------------------------------------------------*/
174/*----------------------------------------------------------------------------*/
175
176double
178
179/*----------------------------------------------------------------------------*/
189/*----------------------------------------------------------------------------*/
190
191double
193
194/*----------------------------------------------------------------------------*/
208/*----------------------------------------------------------------------------*/
209
210double
212
213/*----------------------------------------------------------------------------*/
224/*----------------------------------------------------------------------------*/
225
228
229/*----------------------------------------------------------------------------*/
241/*----------------------------------------------------------------------------*/
242
245
246/*----------------------------------------------------------------------------*/
258/*----------------------------------------------------------------------------*/
259
260double
262
263/*----------------------------------------------------------------------------*/
277/*----------------------------------------------------------------------------*/
278
279double
281
282/*----------------------------------------------------------------------------*/
293/*----------------------------------------------------------------------------*/
294
297
298/*----------------------------------------------------------------------------*/
309/*----------------------------------------------------------------------------*/
310
313
314/*----------------------------------------------------------------------------*/
328/*----------------------------------------------------------------------------*/
329
332
333/*----------------------------------------------------------------------------*/
345/*----------------------------------------------------------------------------*/
346
349
350/*----------------------------------------------------------------------------*/
363/*----------------------------------------------------------------------------*/
364
367
368/*----------------------------------------------------------------------------*/
379/*----------------------------------------------------------------------------*/
380
383
384/*----------------------------------------------------------------------------*/
396/*----------------------------------------------------------------------------*/
397
400
401/*----------------------------------------------------------------------------*/
416/*----------------------------------------------------------------------------*/
417
420
421/*----------------------------------------------------------------------------*/
432/*----------------------------------------------------------------------------*/
433
436
437/*----------------------------------------------------------------------------*/
449/*----------------------------------------------------------------------------*/
450
453
454/*----------------------------------------------------------------------------*/
469/*----------------------------------------------------------------------------*/
470
473
474#endif /* CS_CDO_BLAS_H */
cs_real_t cs_cdo_blas_square_norm_pfsf_trace_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 the flux at primal faces....
Definition: cs_cdo_blas.cpp:1853
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:1111
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:844
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:927
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:1515
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:73
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:1636
cs_real_t cs_cdo_blas_square_norm_pfsf_trace(const cs_real_t *array)
Compute the square norm of an array Case of a scalar-valued array defined as the flux at primal faces...
Definition: cs_cdo_blas.cpp:1821
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:1543
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:1130
cs_real_t cs_cdo_blas_dotprod_pfsf_hdiv(const cs_real_t *a, const cs_real_t *b)
Compute the dot product of two arrays using a H(div)-like dot product relying on CDO quantities....
Definition: cs_cdo_blas.cpp:1981
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:1359
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:1398
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:1243
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:1156
cs_real_t cs_cdo_blas_square_norm_pfsf_hdiv_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 the flux at primal faces....
Definition: cs_cdo_blas.cpp:1949
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:90
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:1490
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:1729
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:1014
cs_real_t cs_cdo_blas_dotprod_pfsf_trace(const cs_real_t *a, const cs_real_t *b)
Compute the dot product of two arrays using a H(div)-like dot product relying on CDO quantities....
Definition: cs_cdo_blas.cpp:1889
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:821
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:1269
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:59
cs_real_t cs_cdo_blas_square_norm_pfsf_hdiv(const cs_real_t *array)
Compute the square norm of an array Case of a scalar-valued array defined as the flux at primal faces...
Definition: cs_cdo_blas.cpp:1921
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
Definition: cs_cdo_connect.h:57
Definition: cs_cdo_quantities.h:142