8.3
general documentation
cs_cdo_blas.cpp File Reference
#include "cs_defs.h"
#include <string.h>
#include <assert.h>
#include "cs_blas.h"
#include "cs_math.h"
#include "cs_parall.h"
#include "cs_cdo_blas.h"
+ Include dependency graph for cs_cdo_blas.cpp:

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

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 handle
[in]bsecond array to handle
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 handle
[in]bsecond array to handle
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 handle
[in]bsecond array to handle
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 handle
[in]bsecond array to handle
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 handle
[in]bsecond array to handle
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 handle
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 handle
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 handle
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.

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 quantity is synchronized in case of parallel computation.

Parameters
[in]afirst array to handle
[in]bsecond array to handle
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 handle
[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 handle
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 to handle
[in]bsecond array to handle
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 handle
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 handle (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 handle
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 to handle
[in]bsecond array to handle
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 handle
Returns
the square weighted L2-norm