8.0
general documentation
Loading...
Searching...
No Matches
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-2023 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/*----------------------------------------------------------------------------*/
93/*----------------------------------------------------------------------------*/
94
95typedef cs_real_t
97 const cs_real_t *b);
98
99/*============================================================================
100 * Public function prototypes
101 *============================================================================*/
102
103/*----------------------------------------------------------------------------*/
110/*----------------------------------------------------------------------------*/
111
112void
114 const cs_cdo_connect_t *connect);
115
116/*----------------------------------------------------------------------------*/
127/*----------------------------------------------------------------------------*/
128
131
132/*----------------------------------------------------------------------------*/
144/*----------------------------------------------------------------------------*/
145
148 const cs_real_t *b);
149
150/*----------------------------------------------------------------------------*/
164/*----------------------------------------------------------------------------*/
165
168 const cs_real_t *ref);
169
170/*----------------------------------------------------------------------------*/
182/*----------------------------------------------------------------------------*/
183
184double
186 const cs_real_t *b);
187
188/*----------------------------------------------------------------------------*/
198/*----------------------------------------------------------------------------*/
199
200double
202
203/*----------------------------------------------------------------------------*/
217/*----------------------------------------------------------------------------*/
218
219double
221 const cs_real_t *b);
222
223/*----------------------------------------------------------------------------*/
234/*----------------------------------------------------------------------------*/
235
238
239/*----------------------------------------------------------------------------*/
251/*----------------------------------------------------------------------------*/
252
255 const cs_real_t *b);
256
257/*----------------------------------------------------------------------------*/
269/*----------------------------------------------------------------------------*/
270
271double
273
274/*----------------------------------------------------------------------------*/
288/*----------------------------------------------------------------------------*/
289
290double
292 const cs_real_t *b);
293
294/*----------------------------------------------------------------------------*/
306/*----------------------------------------------------------------------------*/
307
310 const cs_real_t *b);
311
312/*----------------------------------------------------------------------------*/
322/*----------------------------------------------------------------------------*/
323
326
327/*----------------------------------------------------------------------------*/
339/*----------------------------------------------------------------------------*/
340
343
344/*----------------------------------------------------------------------------*/
356/*----------------------------------------------------------------------------*/
357
360
361/*----------------------------------------------------------------------------*/
375/*----------------------------------------------------------------------------*/
376
379 const cs_real_t *b);
380
381/*----------------------------------------------------------------------------*/
393/*----------------------------------------------------------------------------*/
394
397
398/*----------------------------------------------------------------------------*/
411/*----------------------------------------------------------------------------*/
412
415 const cs_real_t *b);
416
417/*----------------------------------------------------------------------------*/
418
420
421#endif /* __CS_CDO_BLAS_H__ */
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 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_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_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
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_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_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
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_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
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
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_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
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_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
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
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_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_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
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
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
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
#define BEGIN_C_DECLS
Definition cs_defs.h:509
double cs_real_t
Floating-point value.
Definition cs_defs.h:319
#define END_C_DECLS
Definition cs_defs.h:510
Definition cs_cdo_connect.h:61
Definition cs_cdo_quantities.h:137