|
FEAT 3
Finite Element Analysis Toolbox
|
Tiny Vector class template. More...
#include <tiny_algebra.hpp>
Public Types | |
| typedef Intern::DataTypeExtractor< ValueType >::MyDataType | DataType |
| The basic data type buried in the lowest level of the vector. More... | |
| typedef T_ | ValueType |
| the value type of the vector More... | |
Public Member Functions | |
| CUDA_HOST_DEVICE | Vector () |
| default constructor More... | |
| template<typename Tx_ > | |
| CUDA_HOST_DEVICE | Vector (const std::array< Tx_, n_ > &x) |
| copy constructor More... | |
| template<typename Tx_ > | |
| CUDA_HOST_DEVICE | Vector (const std::initializer_list< Tx_ > &x) |
| Initializer list constructor. More... | |
| template<int sx_> | |
| CUDA_HOST_DEVICE | Vector (const Vector< T_, n_, sx_ > &x) |
| copy constructor More... | |
| template<typename Tx_ , int sx_> | |
| CUDA_HOST_DEVICE | Vector (const Vector< Tx_, n_, sx_ > &x) |
| copy constructor More... | |
| CUDA_HOST_DEVICE | Vector (DataType value) |
| value-assignment constructor More... | |
| template<int m_, int sma_, int sna_, int sx_> | |
| CUDA_HOST_DEVICE Vector & | add_mat_vec_mult (const Matrix< T_, n_, m_, sma_, sna_ > &a, const Vector< T_, m_, sx_ > &x, DataType alpha=DataType(1)) |
| Adds the result of a matrix-vector product onto this vector. More... | |
| template<int mm_, int nn_, int ma_, int na_, int sna_, int sma_, int nx_, int sx_> | |
| CUDA_HOST_DEVICE Vector & | add_mat_vec_mult_n (const Matrix< T_, ma_, na_, sma_, sna_ > &a, const Vector< T_, nx_, sx_ > &x, DataType alpha=DataType(1)) |
| Adds the result of a matrix-vector product onto this vector. More... | |
| template<int m_, int sma_, int sna_, int sx_> | |
| CUDA_HOST_DEVICE Vector & | add_vec_mat_mult (const Vector< T_, m_, sx_ > &x, const Matrix< T_, m_, n_, sma_, sna_ > &a, DataType alpha=DataType(1)) |
| Adds the result of a vector-matrix product onto this vector. More... | |
| template<int nn_, int mm_, int mx_, int smx_, int ma_, int na_, int sma_, int sna_> | |
| CUDA_HOST_DEVICE Vector & | add_vec_mat_mult_n (const Vector< T_, mx_, smx_ > &x, const Matrix< T_, ma_, na_, sma_, sna_ > &a, DataType alpha=DataType(1)) |
| Adds the result of a vector-matrix product onto this vector. More... | |
| template<int snx_> | |
| CUDA_HOST_DEVICE Vector & | axpy (DataType alpha, const Vector< T_, n_, snx_ > &x) |
| Adds another scaled vector onto this vector. More... | |
| template<int nn_, int nx_, int snx_> | |
| CUDA_HOST_DEVICE Vector & | axpy_n (DataType alpha, const Vector< T_, nx_, snx_ > &x) |
| Adds the first nn_ entries of another scaled vector onto this vector. More... | |
| template<typename Tx_ , int sx_> | |
| CUDA_HOST_DEVICE void | convert (const Vector< Tx_, n_, sx_ > &x) |
| conversion operator More... | |
| template<int snx_> | |
| CUDA_HOST_DEVICE void | copy (const Vector< T_, n_, snx_ > &x) |
| Copies a vector. More... | |
| template<int nn_, int nx_, int snx_> | |
| CUDA_HOST_DEVICE void | copy_n (const Vector< T_, nx_, snx_ > &x) |
| Copies the first nn_ entries of a vector. More... | |
| CUDA_HOST_DEVICE void | format (DataType alpha=DataType(0)) |
| Formats the vector. More... | |
| template<int nn_> | |
| CUDA_HOST_DEVICE void | format_n (DataType alpha=DataType(0)) |
| Formats the first nn_ entries of the vector. More... | |
| CUDA_HOST_DEVICE Vector & | negate () |
| Negates the vector, i.e. effectively multiplies all components by -1. More... | |
| template<int nn_> | |
| CUDA_HOST_DEVICE Vector & | negate_n () |
| Negates the first nn_ entries of this vector. More... | |
| CUDA_HOST_DEVICE DataType | norm_euclid () const |
| Computes the euclid norm of this vector. More... | |
| template<int nn_> | |
| CUDA_HOST_DEVICE DataType | norm_euclid_n () const |
| Computes the euclid norm of first nn_ entries of this vector. More... | |
| CUDA_HOST_DEVICE DataType | norm_euclid_sqr () const |
| Computes the squared euclid norm of this vector. More... | |
| template<int nn_> | |
| CUDA_HOST_DEVICE DataType | norm_euclid_sqr_n () const |
| Computes the squared euclid norm of first nn_ entries of this vector. More... | |
| CUDA_HOST_DEVICE DataType | norm_l1 () const |
| Computes the l1-norm of this vector. More... | |
| template<int nn_> | |
| CUDA_HOST_DEVICE DataType | norm_l1_n () const |
| Computes the l1-norm of the first nn_ entries of this vector. More... | |
| CUDA_HOST_DEVICE DataType | norm_max () const |
| Computes the max-norm of this vector. More... | |
| template<int nn_> | |
| CUDA_HOST_DEVICE DataType | norm_max_n () const |
| Computes the max-norm of the vector. More... | |
| CUDA_HOST_DEVICE Vector & | normalize () |
| Normalizes this vector. More... | |
| template<int nn_> | |
| CUDA_HOST_DEVICE Vector & | normalize_n () |
| Normalizes the first nn_ entries of this vector. More... | |
| CUDA_HOST_DEVICE bool | normalized () const |
| Return if the vector is normalized. More... | |
| CUDA_HOST_DEVICE T_ & | operator() (int i) |
| Access operator. More... | |
| CUDA_HOST_DEVICE const T_ & | operator() (int i) const |
| Access operator. More... | |
| template<int sx_> | |
| CUDA_HOST_DEVICE Vector & | operator*= (const Vector< T_, n_, sx_ > &x) |
| element-wise-multiply operator More... | |
| CUDA_HOST_DEVICE Vector & | operator*= (DataType alpha) |
| scalar-multiply operator More... | |
| template<int sx_> | |
| CUDA_HOST_DEVICE Vector & | operator+= (const Vector< T_, n_, sx_ > &x) |
| vector-add operator More... | |
| template<int sx_> | |
| CUDA_HOST_DEVICE Vector & | operator-= (const Vector< T_, n_, sx_ > &x) |
| vector-subtract operator More... | |
| template<typename Tx_ > | |
| CUDA_HOST_DEVICE Vector & | operator= (const std::array< Tx_, n_ > &x) |
| copy-assignment operator More... | |
| template<typename Tx_ > | |
| CUDA_HOST_DEVICE Vector & | operator= (const std::initializer_list< Tx_ > &x) |
| Initializer list assignment operator. More... | |
| template<int sx_> | |
| CUDA_HOST_DEVICE Vector & | operator= (const Vector< T_, n_, sx_ > &x) |
| copy-assignment operator More... | |
| template<typename Tx_ , int sx_> | |
| CUDA_HOST_DEVICE Vector & | operator= (const Vector< Tx_, n_, sx_ > &x) |
| copy-assignment operator More... | |
| CUDA_HOST_DEVICE Vector & | operator= (DataType value) |
| value-assignment operator More... | |
| CUDA_HOST_DEVICE T_ & | operator[] (int i) |
| Access operator. More... | |
| CUDA_HOST_DEVICE const T_ & | operator[] (int i) const |
| Access operator. More... | |
| CUDA_HOST_DEVICE void | scale (DataType alpha) |
| Scales the vector. More... | |
| template<int nn_> | |
| CUDA_HOST_DEVICE void | scale_n (DataType alpha) |
| Scales the first nn_ entries of the vector. More... | |
| template<int sna_, int snb_> | |
| CUDA_HOST_DEVICE Vector & | set_convex (DataType alpha, const Vector< T_, n_, sna_ > &a, const Vector< T_, n_, snb_ > &b) |
| Sets this vector to the convex combination of two other vectors. More... | |
| template<int nn_, int na_, int nb_, int sna_, int snb_> | |
| CUDA_HOST_DEVICE Vector & | set_convex_n (DataType alpha, const Vector< T_, na_, sna_ > &a, const Vector< T_, nb_, snb_ > &b) |
| Sets the first nn_ entries of this vector to the convex combination of two other vectors. More... | |
| template<int m_, int sma_, int sna_, int sx_> | |
| CUDA_HOST_DEVICE Vector & | set_mat_vec_mult (const Matrix< T_, n_, m_, sma_, sna_ > &a, const Vector< T_, m_, sx_ > &x) |
| Sets this vector to the result of a matrix-vector product. More... | |
| template<int mm_, int nn_, int ma_, int na_, int sna_, int sma_, int nx_, int sx_> | |
| CUDA_HOST_DEVICE Vector & | set_mat_vec_mult_n (const Matrix< T_, ma_, na_, sma_, sna_ > &a, const Vector< T_, nx_, sx_ > &x) |
| Sets the first nn_ entries of this vector to the result of a matrix-vector product with the first mm_ entries of another vector. More... | |
| template<int m_, int sma_, int sna_, int sx_> | |
| CUDA_HOST_DEVICE Vector & | set_vec_mat_mult (const Vector< T_, m_, sx_ > &x, const Matrix< T_, m_, n_, sma_, sna_ > &a) |
| Sets this vector to the result of a vector-matrix product. More... | |
| template<int nn_, int mm_, int mx_, int smx_, int ma_, int na_, int sma_, int sna_> | |
| CUDA_HOST_DEVICE Vector & | set_vec_mat_mult_n (const Vector< T_, mx_, smx_ > &x, const Matrix< T_, ma_, na_, sma_, sna_ > &a) |
| Sets the first mm_ entries of this vector to the result of a vector-matrix product with the first mm_ entries of another vector. More... | |
Static Public Member Functions | |
| template<typename Tx_ , int sx_> | |
| static CUDA_HOST_DEVICE Vector | convert_new (const Vector< Tx_, n_, sx_ > &x) |
| convert function, not callable with non convertable inner type More... | |
| static CUDA_HOST_DEVICE Vector | convert_new (Vector &&x) |
| overload for moveable rvalue type More... | |
| static CUDA_HOST_DEVICE Vector | null () |
| Returns a null-vector. More... | |
Public Attributes | |
| T_ | v [s_] |
| actual vector data More... | |
Static Public Attributes | |
| static constexpr int | n = n_ |
| the length of the vector More... | |
| static constexpr int | s = s_ |
| the stride of the vector More... | |
Friends | |
| CUDA_HOST friend std::ostream & | operator<< (std::ostream &lhs, const Vector &b) |
| Tiny::Vector streaming operator. More... | |
| CUDA_HOST friend std::istream & | operator>> (std::istream &in, Vector &vector) |
This class template implements a vector whose value type and size is given at compile-time. The value type can be a primitive type, or some other object like (again) a Vector.
| T_ | The value-type that the vector shall contain. |
| n_ | The length of the vector. Must be > 0. |
| s_ | The stride of the vector. Must be >= n_. |
Definition at line 56 of file tiny_algebra.hpp.
| typedef Intern::DataTypeExtractor<ValueType>::MyDataType FEAT::Tiny::Vector< T_, n_, s_ >::DataType |
The basic data type buried in the lowest level of the vector.
Definition at line 226 of file tiny_algebra.hpp.
| typedef T_ FEAT::Tiny::Vector< T_, n_, s_ >::ValueType |
the value type of the vector
Definition at line 224 of file tiny_algebra.hpp.
|
inline |
default constructor
Definition at line 232 of file tiny_algebra.hpp.
Referenced by FEAT::Tiny::Vector< T_, n_, s_ >::null().
|
inlineexplicit |
value-assignment constructor
Definition at line 237 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v, and FEAT::value.
|
inline |
copy constructor
Definition at line 247 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inlineexplicit |
copy constructor
Definition at line 257 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inlineexplicit |
copy constructor
Definition at line 267 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Initializer list constructor.
This operator allows to assign values to a new vector in a simple manner:
| [in] | x | The initializer list whose elements are to be assigned. |
Definition at line 309 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v, and XASSERTM.
|
inline |
Adds the result of a matrix-vector product onto this vector.
Let y denote this vector, and let A denote the input matrix and x in the input vector, then this function computes:
\[ y \leftarrow y + \alpha\cdot A\cdot x \]
| [in] | a | The matrix for the product. |
| [in] | x | The (right) multiplicand vector for the product. |
| [in] | alpha | The scaling parameter for the product. |
*this Definition at line 907 of file tiny_algebra.hpp.
References ASSERTM, FEAT::Tiny::Vector< T_, n_, s_ >::v, and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.
|
inline |
Adds the result of a matrix-vector product onto this vector.
Let y denote this vector, and let A denote the input matrix and x in the input vector, then this function computes:
\[ y \leftarrow y + \alpha\cdot A\cdot x \]
| mm_ | The number of matrix rows to multiply; must be mm_ <= min(n_, ma_) |
| nn_ | The number of matrix columns to multiply; must be nn_ <= min(nx_, na_) |
| [in] | a | The matrix for the product. |
| [in] | x | The (right) multiplicand vector for the product. |
| [in] | alpha | The scaling parameter for the product. |
*this Definition at line 947 of file tiny_algebra.hpp.
References ASSERTM, FEAT::Tiny::Vector< T_, n_, s_ >::v, and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.
|
inline |
Adds the result of a vector-matrix product onto this vector.
Let y denote this vector, and let x in the input vector and A denote the input matrix, then this function computes:
\[ y^\top \leftarrow y^\top + \alpha\cdot x^\top \cdot A \Longleftrightarrow y \leftarrow y + \alpha\cdot A^\top\cdot x \]
| [in] | x | The (left) multiplicand vector for the product. |
| [in] | a | The matrix for the product. |
| [in] | alpha | The scaling parameter for the product. |
*this Definition at line 986 of file tiny_algebra.hpp.
References ASSERTM, FEAT::Tiny::Vector< T_, n_, s_ >::v, and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.
|
inline |
Adds the result of a vector-matrix product onto this vector.
Let y denote this vector, and let x in the input vector and A denote the input matrix, then this function computes:
\[ y^\top \leftarrow y^\top + \alpha\cdot x^\top \cdot A \Longleftrightarrow y \leftarrow y + \alpha\cdot A^\top\cdot x \]
| nn_ | The number of matrix columns to multiply; must be nn_ <= min(nx_, na_) |
| mm_ | The number of matrix rows to multiply; must be mm_ <= min(n_, ma_) |
| [in] | x | The (left) multiplicand vector for the product. |
| [in] | a | The matrix for the product. |
| [in] | alpha | The scaling parameter for the product. |
*this Definition at line 1026 of file tiny_algebra.hpp.
References ASSERTM, FEAT::Tiny::Vector< T_, n_, s_ >::v, and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.
|
inline |
Adds another scaled vector onto this vector.
| [in] | x | The vector to be added onto this vector. |
| [in] | alpha | The scaling parameter for the axpy. |
*this Definition at line 655 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
Referenced by FEAT::Assembly::BurgersAssembler< 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::Assembly::VelocityAnalyser::compute(), FEAT::Assembly::VectorErrorComputer< max_norm_ >::compute(), FEAT::Assembly::BurgersAssemblyTaskBase< Job_, DataType_ >::prepare(), FEAT::Assembly::BurgersCarreauAssemblyTaskBase< Job_, DataType_ >::prepare(), FEAT::Assembly::BurgersAssemblyTaskBase< Job_, DataType_ >::prepare_point(), and FEAT::Assembly::BurgersCarreauAssemblyTaskBase< Job_, DataType_ >::prepare_point().
|
inline |
Adds the first nn_ entries of another scaled vector onto this vector.
| nn_ | The number of elements to axpy; must be nn_ <= min(n_, nx_) |
| [in] | x | The vector to be added onto this vector. |
| [in] | alpha | The scaling parameter for the axpy. |
*this Definition at line 677 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
conversion operator
Definition at line 386 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
Referenced by FEAT::Trafo::Isoparam::Evaluator< Trafo_, EvalPolicy_, degree_, Shape::Hypercube< 2 > >::prepare(), and FEAT::Trafo::Isoparam::Evaluator< Trafo_, EvalPolicy_, degree_, Shape::Hypercube< 3 > >::prepare().
|
inlinestatic |
convert function, not callable with non convertable inner type
Definition at line 277 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inlinestatic |
overload for moveable rvalue type
Definition at line 291 of file tiny_algebra.hpp.
|
inline |
Copies a vector.
| [in] | x | The source vector to copy |
Definition at line 434 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Copies the first nn_ entries of a vector.
| nn_ | The number of elements to copy; must be nn_ <= min(n_, nx_) |
| [in] | x | The source vector to copy the elements from |
Definition at line 452 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Formats the vector.
| [in] | alpha | The value that the vector is to be set to. |
Definition at line 511 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
Referenced by FEAT::Analytic::Distance::DistanceFunction< dim_, DataType_ >::DistanceFunction(), FEAT::Analytic::Common::HarmonicShellFunction< dim_, DataType_ >::HarmonicShellFunction(), FEAT::Analytic::Distance::InverseDistanceFunction< dim_, DataType_ >::InverseDistanceFunction(), FEAT::Assembly::GradOperatorAssembler::assemble(), FEAT::Assembly::GridTransfer::assemble_intermesh_transfer(), FEAT::Assembly::BurgersAssembler< DataType_, IndexType_, dim_ >::assemble_matrix(), FEAT::Assembly::BurgersAssemblerCarreau< DataType_, IndexType_, dim_ >::assemble_matrix(), FEAT::Assembly::OldroydAssembler::assemble_matrix(), FEAT::Assembly::GridTransfer::assemble_prolongation(), FEAT::Assembly::BurgersAssembler< DataType_, IndexType_, dim_ >::assemble_scalar_matrix(), FEAT::Assembly::SpaceTransfer::assemble_transfer(), FEAT::Assembly::GridTransfer::assemble_truncation(), FEAT::Assembly::BurgersAssembler< DataType_, IndexType_, dim_ >::assemble_vector(), FEAT::Assembly::BurgersAssemblerCarreau< DataType_, IndexType_, dim_ >::assemble_vector(), FEAT::Assembly::VelocityAnalyser::compute(), FEAT::Meshopt::ChartDistanceFunction< ElementalFunction_, Trafo_, RefCellTrafo_ >::compute_dist_add(), FEAT::Meshopt::ChartDistanceFunction< ElementalFunction_, Trafo_, RefCellTrafo_ >::compute_dist_max(), FEAT::Meshopt::ChartDistanceFunction< ElementalFunction_, Trafo_, RefCellTrafo_ >::compute_dist_min(), FEAT::Assembly::BurgersBlockedVectorAssemblyJob< Vector_, Space_, ConvVector_ >::Task::compute_local_vector(), FEAT::Assembly::BurgersScalarVectorAssemblyJob< Vector_, Space_, ConvVector_ >::Task::compute_local_vector(), FEAT::Assembly::BurgersCarreauBlockedVectorAssemblyJob< Vector_, Space_, ConvVector_ >::Task::compute_local_vector(), FEAT::Assembly::BurgersCarreauScalarVectorAssemblyJob< Vector_, Space_, ConvVector_ >::Task::compute_local_vector(), FEAT::Assembly::DiscreteEvaluator::eval_fe_gradient(), FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::format(), FEAT::Assembly::VectorDiscreteEvalData< DT_, dim_ >::mean_value(), FEAT::Assembly::VectorDiscreteEvalData< DT_, dim_ >::mean_value_dist(), FEAT::Assembly::BurgersAssemblyTaskBase< Job_, DataType_ >::prepare(), FEAT::Assembly::BurgersCarreauAssemblyTaskBase< Job_, DataType_ >::prepare(), FEAT::Assembly::BurgersAssemblyTaskBase< Job_, DataType_ >::prepare_point(), FEAT::Assembly::BurgersCarreauAssemblyTaskBase< Job_, DataType_ >::prepare_point(), FEAT::Assembly::GridTransfer::prolongate_vector(), FEAT::Assembly::SpaceTransfer::transfer_vector(), and FEAT::Geometry::ExportVTK< Mesh_, cell_dim_ >::write_vtu().
|
inline |
Formats the first nn_ entries of the vector.
| nn_ | The number of elements to format; must be nn_ <= n_ |
| [in] | alpha | The value that the vector is to be set to. |
Definition at line 529 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Negates the vector, i.e. effectively multiplies all components by -1.
*this Definition at line 619 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Negates the first nn_ entries of this vector.
| nn_ | The number of elements to negate; must be nn_ <= n_ |
*this Definition at line 635 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Computes the euclid norm of this vector.
Definition at line 1094 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::norm_euclid_sqr(), and FEAT::Math::sqrt().
Referenced by FEAT::Assembly::BurgersAssembler< DataType_, IndexType_, dim_ >::assemble_matrix(), FEAT::Assembly::BurgersAssembler< DataType_, IndexType_, dim_ >::assemble_scalar_matrix(), FEAT::Meshopt::ChartDistanceFunction< ElementalFunction_, Trafo_, RefCellTrafo_ >::compute_dist_add(), FEAT::Trafo::Standard::inverse_mapping(), FEAT::Tiny::Vector< T_, n_, s_ >::normalize(), FEAT::Tiny::Vector< T_, n_, s_ >::normalized(), FEAT::Assembly::BurgersAssemblyTaskBase< Job_, DataType_ >::prepare(), FEAT::Assembly::BurgersCarreauAssemblyTaskBase< Job_, DataType_ >::prepare(), and FEAT::Geometry::Atlas::SurfaceMesh< Mesh_ >::project_point().
|
inline |
Computes the euclid norm of first nn_ entries of this vector.
Definition at line 1110 of file tiny_algebra.hpp.
References FEAT::Math::sqrt().
|
inline |
Computes the squared euclid norm of this vector.
Definition at line 1052 of file tiny_algebra.hpp.
References FEAT::Math::sqr(), and FEAT::Tiny::Vector< T_, n_, s_ >::v.
Referenced by FEAT::LAFEM::MeanFilterBlocked< DT_, IT_, BlockSize_ >::MeanFilterBlocked(), FEAT::Assembly::FunctionIntegralInfo< DataType_, ValueType_, GradientType_, HessianType_ >::add_grad(), FEAT::LAFEM::MeanFilterBlocked< DT_, IT_, BlockSize_ >::convert(), FEAT::Tiny::Vector< T_, n_, s_ >::norm_euclid(), FEAT::Tiny::Vector< T_, n_, s_ >::normalize(), FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::unmap_point_by_newton(), and FEAT::Geometry::Atlas::Extrude< Mesh_, SubChart_ >::write().
|
inline |
Computes the squared euclid norm of first nn_ entries of this vector.
Definition at line 1073 of file tiny_algebra.hpp.
References FEAT::Math::sqr(), and FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Computes the l1-norm of this vector.
Definition at line 1126 of file tiny_algebra.hpp.
References FEAT::Math::abs(), and FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Computes the l1-norm of the first nn_ entries of this vector.
Definition at line 1147 of file tiny_algebra.hpp.
References FEAT::Math::abs(), and FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Computes the max-norm of this vector.
Definition at line 1168 of file tiny_algebra.hpp.
References FEAT::Math::abs(), FEAT::Math::max(), and FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Computes the max-norm of the vector.
Definition at line 1189 of file tiny_algebra.hpp.
References FEAT::Math::abs(), FEAT::Math::max(), and FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Normalizes this vector.
*this Definition at line 576 of file tiny_algebra.hpp.
References ASSERTM, FEAT::Tiny::Vector< T_, n_, s_ >::norm_euclid(), and FEAT::Tiny::Vector< T_, n_, s_ >::norm_euclid_sqr().
Referenced by FEAT::Trafo::Standard::inverse_mapping(), and FEAT::Trafo::IsoSphere::Evaluator< Trafo_, EvalPolicy_, Shape::Vertex >::prepare().
|
inline |
Normalizes the first nn_ entries of this vector.
| nn_ | The number of elements to normalize; must be nn_ <= n_ |
*this Definition at line 598 of file tiny_algebra.hpp.
References ASSERTM.
|
inline |
Return if the vector is normalized.
Definition at line 1215 of file tiny_algebra.hpp.
References FEAT::Math::abs(), FEAT::Tiny::Vector< T_, n_, s_ >::norm_euclid(), and FEAT::Math::pow().
|
inlinestatic |
Returns a null-vector.
Definition at line 1207 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::Vector().
|
inline |
Access operator.
| [in] | i | The index of the vector component to be returned. |
i-th entry of the vector. Definition at line 400 of file tiny_algebra.hpp.
References ASSERTM, and FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Access operator.
| [in] | i | The index of the vector component to be returned. |
i-th entry of the vector. Definition at line 407 of file tiny_algebra.hpp.
References ASSERTM, and FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
element-wise-multiply operator
Definition at line 474 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
scalar-multiply operator
Definition at line 463 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
vector-add operator
Definition at line 485 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
vector-subtract operator
Definition at line 496 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
copy-assignment operator
Definition at line 351 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Initializer list assignment operator.
This operator allows to assign values to the vector in a simple manner:
| [in] | x | The initializer list whose elements are to be assigned. |
Definition at line 375 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v, and XASSERTM.
|
inline |
copy-assignment operator
Definition at line 329 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
copy-assignment operator
Definition at line 340 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
value-assignment operator
Definition at line 318 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v, and FEAT::value.
|
inline |
Access operator.
| [in] | i | The index of the vector component to be returned. |
i-th entry of the vector. Definition at line 414 of file tiny_algebra.hpp.
References ASSERTM, and FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Access operator.
| [in] | i | The index of the vector component to be returned. |
i-th entry of the vector. Definition at line 421 of file tiny_algebra.hpp.
References ASSERTM, and FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Scales the vector.
| [in] | alpha | The value that the vector is to be scaled by |
Definition at line 544 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Scales the first nn_ entries of the vector.
| nn_ | The number of elements to scale; must be nn_ <= n_ |
| [in] | alpha | The value that the vector is to be scaled by |
Definition at line 562 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Sets this vector to the convex combination of two other vectors.
Let y denote this vector, then this function computes:
\[ y \leftarrow (1-\alpha)\cdot a + \alpha\cdot b \]
| [in] | alpha | The interpolation parameter for the convex combination. Should be 0 <= alpha <= 1 |
| [in] | a | The first vector for the convex combination. |
| [in] | b | The second vector for the convex combination. |
*this Definition at line 704 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
Referenced by FEAT::Trafo::Isoparam::Evaluator< Trafo_, EvalPolicy_, degree_, Shape::Hypercube< 2 > >::prepare().
|
inline |
Sets the first nn_ entries of this vector to the convex combination of two other vectors.
Let y denote this vector, then this function computes:
\[ y \leftarrow (1-\alpha)\cdot a + \alpha\cdot b \]
| nn_ | The number of elements to combine; must be nn_ <= min(n_, na_, nb_) |
| [in] | alpha | The interpolation parameter for the convex combination. Should be 0 <= alpha <= 1 |
| [in] | a | The first vector for the convex combination. |
| [in] | b | The second vector for the convex combination. |
*this Definition at line 732 of file tiny_algebra.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::v.
|
inline |
Sets this vector to the result of a matrix-vector product.
Let y denote this vector, and let A denote the input matrix and x in the input vector, then this function computes:
\[ y \leftarrow A\cdot x \]
| [in] | a | The matrix for the product. |
| [in] | x | The (right) multiplicand vector for the product. |
*this Definition at line 758 of file tiny_algebra.hpp.
References ASSERTM, FEAT::Tiny::Vector< T_, n_, s_ >::v, and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.
Referenced by FEAT::VoxelAssembly::Kernel::burgers_velo_material_mat_assembly_kernel(), FEAT::Geometry::MeshExtruder< ConformalMesh< Shape::Hypercube< 2 >, 2, Coord_ > >::extrude_vertex_set(), and FEAT::Tiny::operator*().
|
inline |
Sets the first nn_ entries of this vector to the result of a matrix-vector product with the first mm_ entries of another vector.
This function effectively multiplies the upper left mm_ x nn_ block of the matrix a.
| mm_ | The number of matrix rows to multiply; must be mm_ <= min(n_, ma_) |
| nn_ | The number of matrix columns to multiply; must be nn_ <= min(nx_, na_) |
| [in] | a | The matrix for the product. |
| [in] | x | The (right) multiplicand vector for the product. |
*this Definition at line 794 of file tiny_algebra.hpp.
References ASSERTM, FEAT::Tiny::Vector< T_, n_, s_ >::v, and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.
|
inline |
Sets this vector to the result of a vector-matrix product.
Let y denote this vector, and let x in the input vector and A denote the input matrix, then this function computes:
\[ y^\top \leftarrow x^\top \cdot A \Longleftrightarrow y \leftarrow A^\top\cdot x \]
| [in] | x | The (left) multiplicand vector for the product. |
| [in] | a | The matrix for the product. |
*this Definition at line 831 of file tiny_algebra.hpp.
References ASSERTM, FEAT::Tiny::Vector< T_, n_, s_ >::v, and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.
Referenced by FEAT::Tiny::operator*().
|
inline |
Sets the first mm_ entries of this vector to the result of a vector-matrix product with the first mm_ entries of another vector.
This function effectively multiplies the upper left mm_ x nn_ block of the matrix a.
| nn_ | The number of matrix columns to multiply; must be nn_ <= min(nx_, na_) |
| mm_ | The number of matrix rows to multiply; must be mm_ <= min(n_, ma_) |
| [in] | x | The (left) multiplicand vector for the product. |
| [in] | a | The matrix for the product. |
*this Definition at line 867 of file tiny_algebra.hpp.
References ASSERTM, FEAT::Tiny::Vector< T_, n_, s_ >::v, and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.
|
friend |
Tiny::Vector streaming operator.
| [in] | lhs | The target stream. |
| [in] | b | The vector to be streamed. |
Definition at line 1226 of file tiny_algebra.hpp.
|
friend |
Definition at line 1238 of file tiny_algebra.hpp.
|
staticconstexpr |
the length of the vector
Definition at line 219 of file tiny_algebra.hpp.
Referenced by FEAT::LAFEM::MeanFilterBlocked< DT_, IT_, BlockSize_ >::filter_cor(), FEAT::LAFEM::MeanFilterBlocked< DT_, IT_, BlockSize_ >::filter_rhs(), and FEAT::LAFEM::MeanFilterBlocked< DT_, IT_, BlockSize_ >::filter_sol().
|
staticconstexpr |
the stride of the vector
Definition at line 221 of file tiny_algebra.hpp.
| T_ FEAT::Tiny::Vector< T_, n_, s_ >::v[s_] |
actual vector data
Definition at line 229 of file tiny_algebra.hpp.
Referenced by FEAT::Tiny::Vector< T_, n_, s_ >::Vector(), FEAT::Tiny::Vector< T_, n_, s_ >::add_mat_vec_mult(), FEAT::Tiny::Vector< T_, n_, s_ >::add_mat_vec_mult_n(), FEAT::Tiny::Vector< T_, n_, s_ >::add_vec_mat_mult(), FEAT::Tiny::Vector< T_, n_, s_ >::add_vec_mat_mult_n(), FEAT::Tiny::Vector< T_, n_, s_ >::axpy(), FEAT::Tiny::Vector< T_, n_, s_ >::axpy_n(), FEAT::Tiny::Vector< T_, n_, s_ >::convert(), FEAT::Tiny::Vector< T_, n_, s_ >::convert_new(), FEAT::Tiny::Vector< T_, n_, s_ >::copy(), FEAT::Tiny::Vector< T_, n_, s_ >::copy_n(), FEAT::Tiny::Vector< T_, n_, s_ >::format(), FEAT::Tiny::Vector< T_, n_, s_ >::format_n(), FEAT::Geometry::VoxelFormulaMasker< dim_ >::mask_line(), FEAT::Tiny::Vector< T_, n_, s_ >::negate(), FEAT::Tiny::Vector< T_, n_, s_ >::negate_n(), FEAT::Tiny::Vector< T_, n_, s_ >::norm_euclid_sqr(), FEAT::Tiny::Vector< T_, n_, s_ >::norm_euclid_sqr_n(), FEAT::Tiny::Vector< T_, n_, s_ >::norm_l1(), FEAT::Tiny::Vector< T_, n_, s_ >::norm_l1_n(), FEAT::Tiny::Vector< T_, n_, s_ >::norm_max(), FEAT::Tiny::Vector< T_, n_, s_ >::norm_max_n(), FEAT::LAFEM::SparseVectorBlocked< DT_, IT_, BlockSize_ >::operator()(), FEAT::Tiny::Vector< T_, n_, s_ >::operator()(), FEAT::Tiny::Vector< T_, n_, s_ >::operator*=(), FEAT::Tiny::Vector< T_, n_, s_ >::operator+=(), FEAT::Tiny::Vector< T_, n_, s_ >::operator-=(), FEAT::Tiny::Vector< T_, n_, s_ >::operator=(), FEAT::Tiny::Vector< T_, n_, s_ >::operator[](), FEAT::Tiny::Vector< T_, n_, s_ >::scale(), FEAT::Tiny::Vector< T_, n_, s_ >::scale_n(), FEAT::Tiny::Vector< T_, n_, s_ >::set_convex(), FEAT::Tiny::Vector< T_, n_, s_ >::set_convex_n(), FEAT::Tiny::Vector< T_, n_, s_ >::set_mat_vec_mult(), FEAT::Tiny::Vector< T_, n_, s_ >::set_mat_vec_mult_n(), FEAT::Tiny::Vector< T_, n_, s_ >::set_vec_mat_mult(), and FEAT::Tiny::Vector< T_, n_, s_ >::set_vec_mat_mult_n().