DOLFINx 0.11.0.0
DOLFINx C++ interface
Loading...
Searching...
No Matches
dolfinx::la Namespace Reference

Linear algebra interface. More...

Namespaces

namespace  petsc
 PETSc linear algebra functions.

Classes

class  MatrixCSR
 Distributed sparse matrix using compressed sparse row storage. More...
class  SLEPcEigenSolver
 This class provides an eigenvalue solver for PETSc matrices. It is a wrapper for the SLEPc eigenvalue solver. More...
class  SparsityPattern
class  SuperLUDistStructs
 Forward declare structs to avoid exposing SuperLU_DIST headers. More...
struct  SuperMatrixDeleter
class  SuperLUDistMatrix
 SuperLU_DIST matrix interface. More...
struct  GridInfoDeleter
struct  ScalePermStructDeleter
struct  LUStructDeleter
struct  SolveStructDeleter
class  SuperLUDistSolver
 SuperLU_DIST linear solver interface. More...
class  Vector
 A vector that can be distributed across processes. More...

Concepts

concept  MatSet
 Matrix accumulate/set concept for functions that can be used in assemblers to accumulate or set values in a matrix.
concept  VectorPackKernel
 la::Vector scatter pack/unpack function concept.
concept  GetPtrConcept
 Access to pointer function concept.

Typedefs

template<typename T>
using map_t = impl::map<T>
 Map scalar type to SuperLU_DIST 'typed' structs.

Enumerations

enum class  BlockMode : int { compact = 0 , expanded = 1 }
 Modes for representing block structured matrices. More...
enum class  Norm : std::int8_t { l1 , l2 , linf , frobenius }
 Norm types.

Functions

template<class V>
auto inner_product (const V &a, const V &b)
 Compute the inner product of two vectors.
template<class V>
auto squared_norm (const V &a)
 Compute the squared L2 norm of vector.
template<class V>
auto norm (const V &x, Norm type=Norm::l2)
 Compute the norm of the vector.
template<class V>
void orthonormalize (std::vector< std::reference_wrapper< V > > basis)
 Orthonormalize a set of vectors.
template<class V>
bool is_orthonormal (std::vector< std::reference_wrapper< const V > > basis, dolfinx::scalar_value_t< typename V::value_type > eps=std::numeric_limits< dolfinx::scalar_value_t< typename V::value_type > >::epsilon())
 Test if basis is orthonormal.

Detailed Description

Linear algebra interface.

Interface to linear algebra data structures and solvers.

Enumeration Type Documentation

◆ BlockMode

enum class BlockMode : int
strong

Modes for representing block structured matrices.

Enumerator
expanded 

Each entry in the sparsity pattern of the matrix refers to a block of data of size (bs[0], bs[1]).

Function Documentation

◆ inner_product()

template<class V>
auto inner_product ( const V & a,
const V & b )

Compute the inner product of two vectors.

Computes a^{H} b (a^{T} b if a and b are real). The two vectors must have the same parallel layout.

Note
Collective MPI operation
Parameters
aVector a.
bVector b.
Returns
Inner product between a and b.

◆ is_orthonormal()

template<class V>
bool is_orthonormal ( std::vector< std::reference_wrapper< const V > > basis,
dolfinx::scalar_value_t< typename V::value_type > eps = std::numeric_limits< dolfinx::scalar_value_t<typename V::value_type>>::epsilon() )

Test if basis is orthonormal.

Returns true if ||x_i - x_j|| - delta_{ij} < eps for all i, j, and otherwise false.

Parameters
[in]basisSet of vectors to check.
[in]epsTolerance.
Returns
True is basis is orthonormal, otherwise false.

◆ norm()

template<class V>
auto norm ( const V & x,
Norm type = Norm::l2 )

Compute the norm of the vector.

Note
Collective MPI operation.
Parameters
xVector to compute the norm of.
typeNorm type.

◆ orthonormalize()

template<class V>
void orthonormalize ( std::vector< std::reference_wrapper< V > > basis)

Orthonormalize a set of vectors.

Template Parameters
Vdolfinx::la::Vector
Parameters
[in,out]basisThe set of vectors to orthonormalise. The vectors must have identical parallel layouts. The vectors are modified in-place.

◆ squared_norm()

template<class V>
auto squared_norm ( const V & a)

Compute the squared L2 norm of vector.

Note
Collective MPI operation.