8.0
general documentation
cs_cdo_blas.h File Reference
#include "cs_base.h"
#include "cs_cdo_connect.h"
#include "cs_cdo_quantities.h"
+ Include dependency graph for cs_cdo_blas.h:

Go to the source code of this file.

Typedefs

typedef 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. More...
 
typedef 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. More...
 
typedef 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 the same location and of the same dimension). The result may be normalized by the norm of the second array. Parallel synchronization is performed. More...
 

Functions

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. More...
 
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 cells. Thus, the weigth is the cell volume. The computed quantities are synchronized in parallel. More...
 
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 primal cells. Thus, the weigth is the cell volume. The computed quantities are synchronized in parallel. More...
 
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 potential at primal cells. Thus, the weigth is the cell volume. The computed quantities are synchronized in parallel. "ndiff" stands for "normalized difference". More...
 
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). Case of a scalar-valued arrays defined at primal vertices. The computed quantity is synchronized in parallel. More...
 
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 at primal vertices. The computed quantities are synchronized in parallel. More...
 
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 quantities. Case of a scalar-valued arrays defined as a potential at primal vertices. Thus, the weigth is the portion of dual cell (associated to a primal vertex) inside a primal cell. The computed quantity is synchronized in parallel. More...
 
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 vertices. Thus, the weigth is the portion of dual cell inside each (primal cell). The computed quantities are synchronized in parallel. More...
 
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 primal vertices. Thus, the weigth is the portion of dual cell in a primal cell. The computed quantities are synchronized in parallel. More...
 
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 defined as a potential at primal vertices. Thus, the weigth is the portion of dual cell (associated to a primal vertex) inside a primal cell. The computed quantity is synchronized in parallel. More...
 
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 quantities. Case of non-interlaced scalar-valued arrays of stride = 2 defined as a potential at primal vertices. Thus, the weigth is the portion of dual cell (associated to a primal vertex) inside a primal cell. The computed quantity is synchronized in parallel. More...
 
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). Case of a scalar-valued arrays defined at primal faces. The computed quantity is synchronized in parallel. More...
 
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 at primal faces. The computed quantities are synchronized in parallel. More...
 
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 faces. Thus, the weigth is the pyramid of apex the cell center and of basis the face. The computed quantities are synchronized in parallel. More...
 
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 faces. Thus, the weigth is the pyramid of apex the cell center and of basis the face. The computed quantities are synchronized in parallel. More...
 
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 quantities. Case of a scalar-valued arrays defined as a flux at primal faces. Thus, the weigth is the pyramid of apex the cell center and of basis the face. Each face quantity is normalized by the face surface. The computed quantity is synchronized in parallel. More...
 
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. Thus, the weigth is the pyramid of apex the cell center and of basis the face. Each face quantity is normalized by the face surface. The computed quantities are synchronized in parallel. More...
 
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. Thus, the weigth is the pyramid of apex the cell center and of basis the face. Each face quantity is normalized by the face surface. The computed quantities are synchronized in parallel. More...
 

Typedef Documentation

◆ cs_cdo_blas_dotprod_t

typedef 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.

Parameters
[in]afirst array to analyze
[in]bsecond array to analyze
Returns
the value of the dot product

◆ cs_cdo_blas_square_norm_diff_t

typedef 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 the same location and of the same dimension). The result may be normalized by the norm of the second array. Parallel synchronization is performed.

Parameters
[in]afirst array
[in]bsecond array
Returns
the square weighted L2-norm of the difference

◆ cs_cdo_blas_square_norm_t

typedef 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.

Parameters
[in]arrayarray to analyze
Returns
the square weighted L2-norm

Function Documentation

◆ cs_cdo_blas_dotprod_2pvsp()

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 quantities. Case of non-interlaced scalar-valued arrays of stride = 2 defined as a potential at primal vertices. Thus, the weigth is the portion of dual cell (associated to a primal vertex) inside a primal cell. The computed quantity is synchronized in parallel.

Parameters
[in]afirst array to analyze
[in]bsecond array to analyze
Returns
the value of the dot product

◆ cs_cdo_blas_dotprod_face()

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). Case of a scalar-valued arrays defined at primal faces. The computed quantity is synchronized in parallel.

Parameters
[in]afirst array to analyze
[in]bsecond array to analyze
Returns
the value of the dot product

◆ cs_cdo_blas_dotprod_pfsf()

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 quantities. Case of a scalar-valued arrays defined as a flux at primal faces. Thus, the weigth is the pyramid of apex the cell center and of basis the face. Each face quantity is normalized by the face surface. The computed quantity is synchronized in parallel.

Parameters
[in]afirst array to analyze
[in]bsecond array to analyze
Returns
the value of the dot product

◆ cs_cdo_blas_dotprod_pvsp()

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 quantities. Case of a scalar-valued arrays defined as a potential at primal vertices. Thus, the weigth is the portion of dual cell (associated to a primal vertex) inside a primal cell. The computed quantity is synchronized in parallel.

Parameters
[in]afirst array to analyze
[in]bsecond array to analyze
Returns
the value of the dot product

◆ cs_cdo_blas_dotprod_vertex()

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). Case of a scalar-valued arrays defined at primal vertices. The computed quantity is synchronized in parallel.

Parameters
[in]afirst array to analyze
[in]bsecond array to analyze
Returns
the value of the dot product

◆ cs_cdo_blas_init_sharing()

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.

Parameters
[in]quantadditional mesh quantities struct.
[in]connectpointer to a cs_cdo_connect_t struct.

◆ cs_cdo_blas_square_norm_2pvsp()

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 defined as a potential at primal vertices. Thus, the weigth is the portion of dual cell (associated to a primal vertex) inside a primal cell. The computed quantity is synchronized in parallel.

Parameters
[in]arrayarray to analyze
Returns
the square weighted L2-norm

◆ cs_cdo_blas_square_norm_face()

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 at primal faces. The computed quantities are synchronized in parallel.

Parameters
[in]arrayarray to analyze
Returns
the square weighted L2-norm

◆ cs_cdo_blas_square_norm_pcsp()

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 cells. Thus, the weigth is the cell volume. The computed quantities are synchronized in parallel.

Parameters
[in]arrayarray to analyze
Returns
the square weighted L2-norm

◆ cs_cdo_blas_square_norm_pcsp_diff()

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 primal cells. Thus, the weigth is the cell volume. The computed quantities are synchronized in parallel.

Parameters
[in]afirst array
[in]bsecond array
Returns
the value of ||b - a||**2

◆ cs_cdo_blas_square_norm_pcsp_ndiff()

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 potential at primal cells. Thus, the weigth is the cell volume. The computed quantities are synchronized in parallel. "ndiff" stands for "normalized difference".

Parameters
[in]aarray to analyze
[in]refarray used for normalization and difference
Returns
the normalized square weighted L2-norm of the difference between the two arrays

◆ cs_cdo_blas_square_norm_pfsf()

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. Thus, the weigth is the pyramid of apex the cell center and of basis the face. Each face quantity is normalized by the face surface. The computed quantities are synchronized in parallel.

Parameters
[in]arrayarray to analyze
Returns
the square weighted L2-norm

◆ cs_cdo_blas_square_norm_pfsf_diff()

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. Thus, the weigth is the pyramid of apex the cell center and of basis the face. Each face quantity is normalized by the face surface. The computed quantities are synchronized in parallel.

Parameters
[in]afirst array
[in]bsecond array
Returns
the value of ||b - a||**2

◆ cs_cdo_blas_square_norm_pfsp()

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 faces. Thus, the weigth is the pyramid of apex the cell center and of basis the face. The computed quantities are synchronized in parallel.

Parameters
[in]arrayarray to analyze
Returns
the square weighted L2-norm

◆ cs_cdo_blas_square_norm_pfvp()

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 faces. Thus, the weigth is the pyramid of apex the cell center and of basis the face. The computed quantities are synchronized in parallel.

Parameters
[in]arrayarray to analyze (vector-valued)
Returns
the square weighted L2-norm

◆ cs_cdo_blas_square_norm_pvsp()

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 vertices. Thus, the weigth is the portion of dual cell inside each (primal cell). The computed quantities are synchronized in parallel.

Parameters
[in]arrayarray to analyze
Returns
the square weighted L2-norm

◆ cs_cdo_blas_square_norm_pvsp_diff()

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 primal vertices. Thus, the weigth is the portion of dual cell in a primal cell. The computed quantities are synchronized in parallel.

Parameters
[in]afirst array
[in]bsecond array
Returns
the value of ||b - a||**2

◆ cs_cdo_blas_square_norm_vertex()

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 at primal vertices. The computed quantities are synchronized in parallel.

Parameters
[in]arrayarray to analyze
Returns
the square weighted L2-norm