FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Tiny Namespace Reference

Tiny namespace. More...

Classes

class  Matrix
 Tiny Matrix class template. More...
 
class  Tensor3
 Tiny Tensor3 class template. More...
 
class  Vector
 Tiny Vector class template. More...
 

Functions

template<typename T_ , int n_, int sm_, int sn_>
CUDA_HOST_DEVICE void add_id (Matrix< T_, n_, n_, sm_, sn_ > &x, const typename Matrix< T_, n_, n_, sm_, sn_ >::DataType &alpha)
 Adds a scaled identity onto a matrix. More...
 
template<typename T_ >
CUDA_HOST_DEVICE void add_id (T_ &x, const T_ &alpha)
 Adds a scaled identity onto a scalar. More...
 
template<typename T_ , int n_, int sl_, int sm_, int sn_>
CUDA_HOST_DEVICE void add_id (Tensor3< T_, n_, n_, n_, sl_, sm_, sn_ > &x, const typename Tensor3< T_, n_, n_, n_, sl_, sm_, sn_ >::DataType &alpha)
 Adds a scaled identity onto a tensor3. More...
 
template<typename T_ , int n_, int sn_>
CUDA_HOST_DEVICE void add_id (Vector< T_, n_, sn_ > &x, const typename Vector< T_, n_, sn_ >::DataType &alpha)
 Adds a scaled identity onto a vector. More...
 
template<typename T_ , int m_, int n_, int sm_, int sn_>
CUDA_HOST_DEVICE void axpy (Matrix< T_, m_, n_, sm_, sn_ > &y, const Matrix< T_, m_, n_, sm_, sn_ > &x, const typename Matrix< T_, m_, n_, sm_, sn_ >::DataType &alpha)
 Performs an AXPY of two matrices. More...
 
template<typename T_ >
CUDA_HOST_DEVICE void axpy (T_ &y, const T_ &x, const T_ &alpha)
 Performs an AXPY of two scalars. More...
 
template<typename T_ , int l_, int m_, int n_, int sl_, int sm_, int sn_>
CUDA_HOST_DEVICE void axpy (Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ > &y, const Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ > &x, const typename Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::DataType &alpha)
 Performs an AXPY of two tensor3. More...
 
template<typename T_ , int n_, int sn_>
CUDA_HOST_DEVICE void axpy (Vector< T_, n_, sn_ > &y, const Vector< T_, n_, sn_ > &x, const typename Vector< T_, n_, sn_ >::DataType &alpha)
 Performs an AXPY of two vectors. More...
 
template<typename T_ >
CUDA_HOST T_ calculate_opening_angle (const Vector< T_, 2 > &x, const Vector< T_, 2 > &y)
 Calculates the counter-clockwise opening angle between two 2D vectors. More...
 
template<typename T_ , int n_, int sa_, int sb_>
CUDA_HOST_DEVICE Vector< T_, n_ > component_product (const Vector< T_, n_, sa_ > &a, const Vector< T_, n_, sb_ > &b)
 vector element-wise-product operator More...
 
template<typename T_ , int sx_, int sa_>
void cross (Vector< T_, 2, sx_ > &x, const Vector< T_, 2, sa_ > &a)
 
template<typename T_ , int sx_, int sa_, int sb_>
void cross (Vector< T_, 3, sx_ > &x, const Vector< T_, 3, sa_ > &a, const Vector< T_, 3, sb_ > &b)
 
template<typename T_ , int m_, int n_, int sma_, int sna_, int smb_, int snb_>
CUDA_HOST_DEVICE Matrix< T_, m_, n_ >::DataType dot (const Matrix< T_, m_, n_, sma_, sna_ > &a, const Matrix< T_, m_, n_, smb_, snb_ > &b)
 Computes the dot-product of two matrices. More...
 
template<typename T_ , typename std::enable_if< Intern::DataTypeExtractor< T_ >::level==0, bool >::type = true>
CUDA_HOST_DEVICE T_ dot (const T_ &a, const T_ &b)
 Computes the dot-product of two scalars. More...
 
template<typename T_ , int l_, int m_, int n_, int sla_, int sma_, int sna_, int slb_, int smb_, int snb_>
CUDA_HOST_DEVICE Tensor3< T_, l_, m_, n_ >::DataType dot (const Tensor3< T_, l_, m_, n_, sla_, sma_, sna_ > &a, const Tensor3< T_, l_, m_, n_, slb_, smb_, snb_ > &b)
 Computes the dot-product of two tensor3 objects. More...
 
template<typename T_ , int n_, int sa_, int sb_>
CUDA_HOST_DEVICE Vector< T_, n_ >::DataType dot (const Vector< T_, n_, sa_ > &a, const Vector< T_, n_, sb_ > &b)
 Computes the dot-product of two vectors. More...
 
template<typename T_ , int m_, int n_, int l_, int sma_, int sna_, int smb_, int snb_>
CUDA_HOST_DEVICE Matrix< T_, m_, n_ > operator* (const Matrix< T_, m_, l_, sma_, sna_ > &a, const Matrix< T_, l_, n_, smb_, snb_ > &b)
 algebraic matrix-matrix-multiply operator More...
 
template<typename T_ , int m_, int n_, int sm_, int sn_, int sx_>
CUDA_HOST_DEVICE Vector< T_, m_ > operator* (const Matrix< T_, m_, n_, sm_, sn_ > &a, const Vector< T_, n_, sx_ > &x)
 matrix-vector-multiply operator More...
 
template<typename T_ , int m_, int n_, int sm_, int sn_>
CUDA_HOST_DEVICE Matrix< T_, m_, n_, sm_, sn_ > operator* (const Matrix< T_, m_, n_, sm_, sn_ > &a, typename Matrix< T_, m_, n_ >::DataType alpha)
 scalar-right-multiply operator More...
 
template<typename T_ , int l_, int m_, int n_, int sl_, int sm_, int sn_>
CUDA_HOST_DEVICE Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ > operator* (const Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ > &a, typename Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::DataType alpha)
 scalar right-multiply operator More...
 
template<typename T_ , int m_, int n_, int sm_, int sn_, int sx_>
CUDA_HOST_DEVICE Vector< T_, n_ > operator* (const Vector< T_, m_, sx_ > &x, const Matrix< T_, m_, n_, sm_, sn_ > &a)
 vector-matrix-multiply operator More...
 
template<typename T_ , int n_, int s_>
CUDA_HOST_DEVICE Vector< T_, n_ > operator* (const Vector< T_, n_, s_ > &x, typename Vector< T_, n_ >::DataType alpha)
 scalar-right-multiplication operator More...
 
template<typename T_ , int m_, int n_, int sm_, int sn_>
CUDA_HOST_DEVICE Matrix< T_, m_, n_ > operator* (typename Matrix< T_, m_, n_ >::DataType alpha, const Matrix< T_, m_, n_, sm_, sn_ > &a)
 scalar-left-multiply operator More...
 
template<typename T_ , int l_, int m_, int n_, int sl_, int sm_, int sn_>
CUDA_HOST_DEVICE Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ > operator* (typename Tensor3< T_, l_, m_, n_ >::DataType alpha, const Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ > &a)
 scalar left-multiply operator More...
 
template<typename T_ , int n_, int s_>
CUDA_HOST_DEVICE Vector< T_, n_ > operator* (typename Vector< T_, n_ >::DataType alpha, const Vector< T_, n_, s_ > &x)
 scalar-left-multiplication operator More...
 
template<typename T_ , int m_, int n_, int sma_, int sna_, int smb_, int snb_>
CUDA_HOST_DEVICE Matrix< T_, m_, n_ > operator+ (const Matrix< T_, m_, n_, sma_, sna_ > &a, const Matrix< T_, m_, n_, smb_, snb_ > &b)
 matrix addition operator More...
 
template<typename T_ , int n_, int sa_, int sb_>
CUDA_HOST_DEVICE Vector< T_, n_ > operator+ (const Vector< T_, n_, sa_ > &a, const Vector< T_, n_, sb_ > &b)
 vector addition operator More...
 
template<typename T_ , int m_, int n_, int sma_, int sna_, int smb_, int snb_>
CUDA_HOST_DEVICE Matrix< T_, m_, n_ > operator- (const Matrix< T_, m_, n_, sma_, sna_ > &a, const Matrix< T_, m_, n_, smb_, snb_ > &b)
 matrix subtraction operator More...
 
template<typename T_ , int n_, int sa_, int sb_>
CUDA_HOST_DEVICE Vector< T_, n_ > operator- (const Vector< T_, n_, sa_ > &a, const Vector< T_, n_, sb_ > &b)
 vector subtraction operator More...
 
template<typename T_ , int m_, int sm_, int sn_>
Vector< T_, m_ > orthogonal (const Matrix< T_, m_, m_-1, sm_, sn_ > &tau)
 Computes the positively oriented orthogonal vector to the columns of a m_ x (m_-1) Matrix. More...
 
template<typename T_ , int mx_, int smx_, int ma_, int na_, int sm_, int sn_>
CUDA_HOST_DEVICE void orthogonal_2x1 (Vector< T_, mx_, smx_ > &nu, const Matrix< T_, ma_, na_, sm_, sn_ > &tau)
 Computes the positively oriented orthogonal vector to the columns of a 2x1 matrix. More...
 
template<typename T_ , int mx_, int smx_, int ma_, int na_, int sm_, int sn_>
CUDA_HOST_DEVICE void orthogonal_3x2 (Vector< T_, mx_, smx_ > &nu, const Matrix< T_, ma_, na_, sm_, sn_ > &tau)
 Computes the positively oriented orthogonal vector to the columns of a 3x2 matrix. More...
 
template<typename T_ , int dim_>
CUDA_HOST Vector< T_, dim_ > project_onto (const Vector< T_, dim_ > &x, const Vector< T_, dim_ > &y)
 Calculates the projected vector. More...
 

Detailed Description

Tiny namespace.

This namespace encapsulates Vector, Matrix and third-order Tensor classes, whose dimensions are given at compile-time. These classes are commonly used by various other kernel components, most notably by the assembly.

Function Documentation

◆ add_id() [1/4]

template<typename T_ , int n_, int sm_, int sn_>
CUDA_HOST_DEVICE void FEAT::Tiny::add_id ( Matrix< T_, n_, n_, sm_, sn_ > &  x,
const typename Matrix< T_, n_, n_, sm_, sn_ >::DataType &  alpha 
)
inline

Adds a scaled identity onto a matrix.

Parameters
[in,out]xThe matrix onto which to add to
[in]alphaThe scalar to be added onto the main diagonal of x

Definition at line 3035 of file tiny_algebra.hpp.

References add_id().

◆ add_id() [2/4]

template<typename T_ >
CUDA_HOST_DEVICE void FEAT::Tiny::add_id ( T_ &  x,
const T_ &  alpha 
)
inline

Adds a scaled identity onto a scalar.

Parameters
[in,out]xThe scalar onto which to add to
[in]alphaThe scalar to be added onto x

Definition at line 3004 of file tiny_algebra.hpp.

Referenced by add_id().

◆ add_id() [3/4]

template<typename T_ , int n_, int sl_, int sm_, int sn_>
CUDA_HOST_DEVICE void FEAT::Tiny::add_id ( Tensor3< T_, n_, n_, n_, sl_, sm_, sn_ > &  x,
const typename Tensor3< T_, n_, n_, n_, sl_, sm_, sn_ >::DataType &  alpha 
)
inline

Adds a scaled identity onto a tensor3.

Parameters
[in,out]xThe tensor3 onto which to add to
[in]alphaThe scalar to be added onto the main diagonal of x

Definition at line 3051 of file tiny_algebra.hpp.

References add_id().

◆ add_id() [4/4]

template<typename T_ , int n_, int sn_>
CUDA_HOST_DEVICE void FEAT::Tiny::add_id ( Vector< T_, n_, sn_ > &  x,
const typename Vector< T_, n_, sn_ >::DataType &  alpha 
)
inline

Adds a scaled identity onto a vector.

Parameters
[in,out]xThe vector onto which to add to
[in]alphaThe scalar to be added onto x

Definition at line 3019 of file tiny_algebra.hpp.

References add_id().

◆ axpy() [1/4]

template<typename T_ , int m_, int n_, int sm_, int sn_>
CUDA_HOST_DEVICE void FEAT::Tiny::axpy ( Matrix< T_, m_, n_, sm_, sn_ > &  y,
const Matrix< T_, m_, n_, sm_, sn_ > &  x,
const typename Matrix< T_, m_, n_, sm_, sn_ >::DataType &  alpha 
)
inline

Performs an AXPY of two matrices.

This function performs: y += alpha*x

Parameters
[in,out]yThe object that receives the AXPY result
[in]xThe object that is to be added onto y
[in]alphaThe scaling factor for x

Definition at line 3116 of file tiny_algebra.hpp.

References axpy(), and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.

◆ axpy() [2/4]

template<typename T_ >
CUDA_HOST_DEVICE void FEAT::Tiny::axpy ( T_ &  y,
const T_ &  x,
const T_ &  alpha 
)
inline

Performs an AXPY of two scalars.

This function performs: y += alpha*x

Parameters
[in,out]yThe object that receives the AXPY result
[in]xThe object that is to be added onto y
[in]alphaThe scaling factor for x

Definition at line 3072 of file tiny_algebra.hpp.

Referenced by FEAT::LAFEM::SparseMatrixBCSR< DT_, IT_, BlockHeight_, BlockWidth_ >::add_double_mat_product(), FEAT::Assembly::BilinearOperatorAssembler::apply1(), FEAT::Assembly::BilinearOperatorAssembler::apply2(), FEAT::Assembly::BilinearOperatorAssembler::assemble_matrix1(), FEAT::Assembly::BilinearOperatorAssembler::assemble_matrix2(), FEAT::Assembly::LinearFunctionalAssembler::assemble_vector(), axpy(), FEAT::Assembly::DiscreteEvaluator::eval_fe_gradient(), FEAT::LAFEM::MatrixGatherScatterHelper< Space_, DT_, IT_, FEAT::Intern::MatrixGatherScatterPolicy::useLocalSortHelper >::gather_matrix_csr(), FEAT::LAFEM::MatrixGatherScatterHelper< Space_, DT_, IT_, FEAT::Intern::MatrixGatherScatterPolicy::useLocalOps >::gather_matrix_csr(), FEAT::LAFEM::VectorGatherScatterHelper< Space_, DT_, IT_ >::gather_vector_dense(), FEAT::Assembly::DiscreteVertexProjector::project(), FEAT::Assembly::DiscreteCellProjector::project(), FEAT::Assembly::DiscreteVertexProjector::project_gradient(), FEAT::Assembly::DiscreteCellProjector::project_gradient(), FEAT::Assembly::DiscreteCellProjector::project_refined(), FEAT::LAFEM::MatrixGatherScatterHelper< Space_, DT_, IT_, FEAT::Intern::MatrixGatherScatterPolicy::useLocalSortHelper >::scatter_matrix_csr(), FEAT::LAFEM::MatrixGatherScatterHelper< Space_, DT_, IT_, FEAT::Intern::MatrixGatherScatterPolicy::useLocalOps >::scatter_matrix_csr(), and FEAT::LAFEM::VectorGatherScatterHelper< Space_, DT_, IT_ >::scatter_vector_dense().

◆ axpy() [3/4]

template<typename T_ , int l_, int m_, int n_, int sl_, int sm_, int sn_>
CUDA_HOST_DEVICE void FEAT::Tiny::axpy ( Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ > &  y,
const Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ > &  x,
const typename Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::DataType &  alpha 
)
inline

Performs an AXPY of two tensor3.

This function performs: y += alpha*x

Parameters
[in,out]yThe object that receives the AXPY result
[in]xThe object that is to be added onto y
[in]alphaThe scaling factor for x

Definition at line 3140 of file tiny_algebra.hpp.

References axpy().

◆ axpy() [4/4]

template<typename T_ , int n_, int sn_>
CUDA_HOST_DEVICE void FEAT::Tiny::axpy ( Vector< T_, n_, sn_ > &  y,
const Vector< T_, n_, sn_ > &  x,
const typename Vector< T_, n_, sn_ >::DataType &  alpha 
)
inline

Performs an AXPY of two vectors.

This function performs: y += alpha*x

Parameters
[in,out]yThe object that receives the AXPY result
[in]xThe object that is to be added onto y
[in]alphaThe scaling factor for x

Definition at line 3092 of file tiny_algebra.hpp.

References axpy().

◆ calculate_opening_angle()

template<typename T_ >
CUDA_HOST T_ FEAT::Tiny::calculate_opening_angle ( const Vector< T_, 2 > &  x,
const Vector< T_, 2 > &  y 
)
inline

Calculates the counter-clockwise opening angle between two 2D vectors.

Parameters
[in]xVector x
[in]yVector y

Definition at line 1250 of file tiny_algebra.hpp.

References FEAT::Math::calc_opening_angle(), and XABORTM.

◆ component_product()

template<typename T_ , int n_, int sa_, int sb_>
CUDA_HOST_DEVICE Vector< T_, n_ > FEAT::Tiny::component_product ( const Vector< T_, n_, sa_ > &  a,
const Vector< T_, n_, sb_ > &  b 
)
inline

vector element-wise-product operator

Definition at line 1224 of file tiny_algebra.hpp.

◆ cross() [1/2]

template<typename T_ , int sx_, int sa_>
void FEAT::Tiny::cross ( Vector< T_, 2, sx_ > &  x,
const Vector< T_, 2, sa_ > &  a 
)
inline

Definition at line 1194 of file tiny_algebra.hpp.

◆ cross() [2/2]

template<typename T_ , int sx_, int sa_, int sb_>
void FEAT::Tiny::cross ( Vector< T_, 3, sx_ > &  x,
const Vector< T_, 3, sa_ > &  a,
const Vector< T_, 3, sb_ > &  b 
)
inline

Definition at line 1201 of file tiny_algebra.hpp.

◆ dot() [1/4]

template<typename T_ , int m_, int n_, int sma_, int sna_, int smb_, int snb_>
CUDA_HOST_DEVICE Matrix< T_, m_, n_ >::DataType FEAT::Tiny::dot ( const Matrix< T_, m_, n_, sma_, sna_ > &  a,
const Matrix< T_, m_, n_, smb_, snb_ > &  b 
)
inline

Computes the dot-product of two matrices.

This function returns the dot-product of A and B:

\[\sum_{i=0}^{m-1} \sum_{j=0}^{n-1} a_{ij} \cdot b_{ij}\]

Parameters
[in]a,bThe matrices whose dot-product is to be computed.
Returns
The dot-product of a and b.

Definition at line 2963 of file tiny_algebra.hpp.

References dot(), and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.

◆ dot() [2/4]

template<typename T_ , typename std::enable_if< Intern::DataTypeExtractor< T_ >::level==0, bool >::type = true>
CUDA_HOST_DEVICE T_ FEAT::Tiny::dot ( const T_ &  a,
const T_ &  b 
)
inline

Computes the dot-product of two scalars.

Parameters
[in]a,bThe scalar whose product is to be computed.
Returns
The product of a and b.
Note
This overload is disabled by SFINAE for Tiny::Vector, Tiny::Matrix and Tiny::Tensor3 types.

Definition at line 2923 of file tiny_algebra.hpp.

Referenced by FEAT::Assembly::BurgersBlockedAssemblyTaskBase< Job_, DataType_, block_size_ >::assemble_burgers_point(), FEAT::Assembly::BurgersScalarAssemblyTaskBase< Job_, DataType_ >::assemble_burgers_point(), FEAT::Assembly::BurgersCarreauBlockedAssemblyTaskBase< Job_, DataType_, block_size_ >::assemble_burgers_point(), FEAT::Assembly::BurgersCarreauScalarAssemblyTaskBase< Job_, DataType_ >::assemble_burgers_point(), FEAT::Assembly::BurgersAssembler< DataType_, IndexType_, dim_ >::assemble_matrix(), FEAT::Assembly::BurgersAssemblerCarreau< DataType_, IndexType_, dim_ >::assemble_matrix(), FEAT::Assembly::OldroydAssembler::assemble_matrix(), FEAT::Assembly::BurgersAssembler< DataType_, IndexType_, dim_ >::assemble_scalar_matrix(), FEAT::Assembly::BurgersAssembler< DataType_, IndexType_, dim_ >::assemble_vector(), FEAT::Assembly::BurgersAssemblerCarreau< DataType_, IndexType_, dim_ >::assemble_vector(), FEAT::VoxelAssembly::Kernel::burgers_defect_assembly_kernel(), FEAT::VoxelAssembly::Kernel::burgers_mat_assembly_kernel(), FEAT::VoxelAssembly::Kernel::burgers_velo_material_defect_assembly_kernel(), FEAT::VoxelAssembly::Kernel::burgers_velo_material_mat_assembly_kernel(), FEAT::Assembly::VelocityAnalyser::compute(), FEAT::Geometry::Atlas::Bezier< Mesh_ >::compute_signed_dist(), dot(), FEAT::Assembly::Common::LaplaceOperatorBlocked< dimension_ >::Evaluator< AsmTraits_ >::eval(), FEAT::Assembly::Common::DuDvOperatorBlocked< dimension_ >::Evaluator< AsmTraits_ >::eval(), FEAT::VoxelAssembly::Kernel::grouped_burgers_mat_alt_assembly_kernel(), FEAT::VoxelAssembly::Kernel::grouped_burgers_mat_assembly_kernel(), FEAT::Trafo::Standard::inverse_mapping(), FEAT::Assembly::BurgersAssemblyTaskBase< Job_, DataType_ >::prepare_point(), FEAT::Assembly::BurgersCarreauAssemblyTaskBase< Job_, DataType_ >::prepare_point(), FEAT::Geometry::Atlas::Bezier< Mesh_ >::project_on_segment(), project_onto(), FEAT::Geometry::Atlas::SurfaceMesh< Mesh_ >::project_point(), and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::scalar_product().

◆ dot() [3/4]

template<typename T_ , int l_, int m_, int n_, int sla_, int sma_, int sna_, int slb_, int smb_, int snb_>
CUDA_HOST_DEVICE Tensor3< T_, l_, m_, n_ >::DataType FEAT::Tiny::dot ( const Tensor3< T_, l_, m_, n_, sla_, sma_, sna_ > &  a,
const Tensor3< T_, l_, m_, n_, slb_, smb_, snb_ > &  b 
)
inline

Computes the dot-product of two tensor3 objects.

Parameters
[in]a,bThe tensor3 whose dot-product is to be computed.
Returns
The dot-product of a and b.

Definition at line 2982 of file tiny_algebra.hpp.

References dot().

◆ dot() [4/4]

template<typename T_ , int n_, int sa_, int sb_>
CUDA_HOST_DEVICE Vector< T_, n_ >::DataType FEAT::Tiny::dot ( const Vector< T_, n_, sa_ > &  a,
const Vector< T_, n_, sb_ > &  b 
)
inline

Computes the dot-product of two vectors.

This function returns the dot-product of a and b:

\[\sum_{k=0}^{n-1} a_k\cdot b_k\]

Parameters
[in]a,bThe vectors whose dot-product is to be computed.
Returns
The dot-product of a and b.

Definition at line 2940 of file tiny_algebra.hpp.

References dot().

◆ operator*() [1/9]

template<typename T_ , int m_, int n_, int l_, int sma_, int sna_, int smb_, int snb_>
CUDA_HOST_DEVICE Matrix< T_, m_, n_ > FEAT::Tiny::operator* ( const Matrix< T_, m_, l_, sma_, sna_ > &  a,
const Matrix< T_, l_, n_, smb_, snb_ > &  b 
)
inline

algebraic matrix-matrix-multiply operator

Definition at line 2445 of file tiny_algebra.hpp.

References FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::set_mat_mat_mult().

◆ operator*() [2/9]

template<typename T_ , int m_, int n_, int sm_, int sn_, int sx_>
CUDA_HOST_DEVICE Vector< T_, m_ > FEAT::Tiny::operator* ( const Matrix< T_, m_, n_, sm_, sn_ > &  a,
const Vector< T_, n_, sx_ > &  x 
)
inline

matrix-vector-multiply operator

Definition at line 2417 of file tiny_algebra.hpp.

References FEAT::Tiny::Vector< T_, n_, s_ >::set_mat_vec_mult().

◆ operator*() [3/9]

template<typename T_ , int m_, int n_, int sm_, int sn_>
CUDA_HOST_DEVICE Matrix< T_, m_, n_, sm_, sn_ > FEAT::Tiny::operator* ( const Matrix< T_, m_, n_, sm_, sn_ > &  a,
typename Matrix< T_, m_, n_ >::DataType  alpha 
)
inline

scalar-right-multiply operator

Definition at line 2438 of file tiny_algebra.hpp.

◆ operator*() [4/9]

template<typename T_ , int l_, int m_, int n_, int sl_, int sm_, int sn_>
CUDA_HOST_DEVICE Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ > FEAT::Tiny::operator* ( const Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ > &  a,
typename Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ >::DataType  alpha 
)
inline

scalar right-multiply operator

Definition at line 2900 of file tiny_algebra.hpp.

◆ operator*() [5/9]

template<typename T_ , int m_, int n_, int sm_, int sn_, int sx_>
CUDA_HOST_DEVICE Vector< T_, n_ > FEAT::Tiny::operator* ( const Vector< T_, m_, sx_ > &  x,
const Matrix< T_, m_, n_, sm_, sn_ > &  a 
)
inline

vector-matrix-multiply operator

Definition at line 2424 of file tiny_algebra.hpp.

References FEAT::Tiny::Vector< T_, n_, s_ >::set_vec_mat_mult().

◆ operator*() [6/9]

template<typename T_ , int n_, int s_>
CUDA_HOST_DEVICE Vector< T_, n_ > FEAT::Tiny::operator* ( const Vector< T_, n_, s_ > &  x,
typename Vector< T_, n_ >::DataType  alpha 
)
inline

scalar-right-multiplication operator

Definition at line 1217 of file tiny_algebra.hpp.

◆ operator*() [7/9]

template<typename T_ , int m_, int n_, int sm_, int sn_>
CUDA_HOST_DEVICE Matrix< T_, m_, n_ > FEAT::Tiny::operator* ( typename Matrix< T_, m_, n_ >::DataType  alpha,
const Matrix< T_, m_, n_, sm_, sn_ > &  a 
)
inline

scalar-left-multiply operator

Definition at line 2431 of file tiny_algebra.hpp.

◆ operator*() [8/9]

template<typename T_ , int l_, int m_, int n_, int sl_, int sm_, int sn_>
CUDA_HOST_DEVICE Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ > FEAT::Tiny::operator* ( typename Tensor3< T_, l_, m_, n_ >::DataType  alpha,
const Tensor3< T_, l_, m_, n_, sl_, sm_, sn_ > &  a 
)
inline

scalar left-multiply operator

Definition at line 2892 of file tiny_algebra.hpp.

◆ operator*() [9/9]

template<typename T_ , int n_, int s_>
CUDA_HOST_DEVICE Vector< T_, n_ > FEAT::Tiny::operator* ( typename Vector< T_, n_ >::DataType  alpha,
const Vector< T_, n_, s_ > &  x 
)
inline

scalar-left-multiplication operator

Definition at line 1210 of file tiny_algebra.hpp.

◆ operator+() [1/2]

template<typename T_ , int m_, int n_, int sma_, int sna_, int smb_, int snb_>
CUDA_HOST_DEVICE Matrix< T_, m_, n_ > FEAT::Tiny::operator+ ( const Matrix< T_, m_, n_, sma_, sna_ > &  a,
const Matrix< T_, m_, n_, smb_, snb_ > &  b 
)
inline

matrix addition operator

Definition at line 2452 of file tiny_algebra.hpp.

◆ operator+() [2/2]

template<typename T_ , int n_, int sa_, int sb_>
CUDA_HOST_DEVICE Vector< T_, n_ > FEAT::Tiny::operator+ ( const Vector< T_, n_, sa_ > &  a,
const Vector< T_, n_, sb_ > &  b 
)
inline

vector addition operator

Definition at line 1231 of file tiny_algebra.hpp.

◆ operator-() [1/2]

template<typename T_ , int m_, int n_, int sma_, int sna_, int smb_, int snb_>
CUDA_HOST_DEVICE Matrix< T_, m_, n_ > FEAT::Tiny::operator- ( const Matrix< T_, m_, n_, sma_, sna_ > &  a,
const Matrix< T_, m_, n_, smb_, snb_ > &  b 
)
inline

matrix subtraction operator

Definition at line 2459 of file tiny_algebra.hpp.

◆ operator-() [2/2]

template<typename T_ , int n_, int sa_, int sb_>
CUDA_HOST_DEVICE Vector< T_, n_ > FEAT::Tiny::operator- ( const Vector< T_, n_, sa_ > &  a,
const Vector< T_, n_, sb_ > &  b 
)
inline

vector subtraction operator

Definition at line 1238 of file tiny_algebra.hpp.

◆ orthogonal()

template<typename T_ , int m_, int sm_, int sn_>
Vector< T_, m_ > FEAT::Tiny::orthogonal ( const Matrix< T_, m_, m_-1, sm_, sn_ > &  tau)

Computes the positively oriented orthogonal vector to the columns of a m_ x (m_-1) Matrix.

Template Parameters
T_Data type.
m_Number of rows of the matrix.
sm_Row stride of the matrix.
sn_Column stride of the matrix.
Parameters
[in]tauThe m_ x (m_-1) matrix.
Returns
A vector that is orthogonal to the m_-1 columns of the input matrix, but not normalized.
Note
So far, this is only implemented for m_ = 2,3.

Referenced by FEAT::Assembly::OuterNormalComputer< Trafo_ >::compute_oriented_normals(), and FEAT::Geometry::Atlas::SurfaceMesh< Mesh_ >::get_normal_on_tria().

◆ orthogonal_2x1()

template<typename T_ , int mx_, int smx_, int ma_, int na_, int sm_, int sn_>
CUDA_HOST_DEVICE void FEAT::Tiny::orthogonal_2x1 ( Vector< T_, mx_, smx_ > &  nu,
const Matrix< T_, ma_, na_, sm_, sn_ > &  tau 
)

Computes the positively oriented orthogonal vector to the columns of a 2x1 matrix.

Parameters
[out]nuThe vector whose first 2 components should receive the normal vector
[in]tauThe matrix whose upper left 2x1 block to compute the orthogonal vector from

Definition at line 2336 of file tiny_algebra.hpp.

◆ orthogonal_3x2()

template<typename T_ , int mx_, int smx_, int ma_, int na_, int sm_, int sn_>
CUDA_HOST_DEVICE void FEAT::Tiny::orthogonal_3x2 ( Vector< T_, mx_, smx_ > &  nu,
const Matrix< T_, ma_, na_, sm_, sn_ > &  tau 
)

Computes the positively oriented orthogonal vector to the columns of a 3x2 matrix.

Parameters
[out]nuThe vector whose first 3 components should receive the normal vector
[in]tauThe matrix whose upper left 3x2 block to compute the orthogonal vector from

Definition at line 2357 of file tiny_algebra.hpp.

Referenced by FEAT::Trafo::Standard::inverse_mapping().

◆ project_onto()

template<typename T_ , int dim_>
CUDA_HOST Vector< T_, dim_ > FEAT::Tiny::project_onto ( const Vector< T_, dim_ > &  x,
const Vector< T_, dim_ > &  y 
)
inline

Calculates the projected vector.

Parameters
[in]xVector to be projected
[in]yVector to be projected on
Returns
The projected vector

Definition at line 1269 of file tiny_algebra.hpp.

References dot().

Referenced by FEAT::LAFEM::DenseVectorBlocked< DT_, IT_, BlockSize_ >::project_onto().