|
FEAT 3
Finite Element Analysis Toolbox
|
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... | |
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.
|
inline |
Adds a scaled identity onto a matrix.
| [in,out] | x | The matrix onto which to add to |
| [in] | alpha | The scalar to be added onto the main diagonal of x |
Definition at line 3035 of file tiny_algebra.hpp.
References add_id().
|
inline |
Adds a scaled identity onto a scalar.
| [in,out] | x | The scalar onto which to add to |
| [in] | alpha | The scalar to be added onto x |
Definition at line 3004 of file tiny_algebra.hpp.
Referenced by add_id().
|
inline |
Adds a scaled identity onto a tensor3.
| [in,out] | x | The tensor3 onto which to add to |
| [in] | alpha | The scalar to be added onto the main diagonal of x |
Definition at line 3051 of file tiny_algebra.hpp.
References add_id().
|
inline |
Adds a scaled identity onto a vector.
| [in,out] | x | The vector onto which to add to |
| [in] | alpha | The scalar to be added onto x |
Definition at line 3019 of file tiny_algebra.hpp.
References add_id().
|
inline |
Performs an AXPY of two matrices.
This function performs: y += alpha*x
| [in,out] | y | The object that receives the AXPY result |
| [in] | x | The object that is to be added onto y |
| [in] | alpha | The 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.
|
inline |
Performs an AXPY of two scalars.
This function performs: y += alpha*x
| [in,out] | y | The object that receives the AXPY result |
| [in] | x | The object that is to be added onto y |
| [in] | alpha | The 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().
|
inline |
Performs an AXPY of two tensor3.
This function performs: y += alpha*x
| [in,out] | y | The object that receives the AXPY result |
| [in] | x | The object that is to be added onto y |
| [in] | alpha | The scaling factor for x |
Definition at line 3140 of file tiny_algebra.hpp.
References axpy().
|
inline |
Performs an AXPY of two vectors.
This function performs: y += alpha*x
| [in,out] | y | The object that receives the AXPY result |
| [in] | x | The object that is to be added onto y |
| [in] | alpha | The scaling factor for x |
Definition at line 3092 of file tiny_algebra.hpp.
References axpy().
|
inline |
Calculates the counter-clockwise opening angle between two 2D vectors.
Definition at line 1250 of file tiny_algebra.hpp.
References FEAT::Math::calc_opening_angle(), and XABORTM.
|
inline |
vector element-wise-product operator
Definition at line 1224 of file tiny_algebra.hpp.
|
inline |
Definition at line 1194 of file tiny_algebra.hpp.
|
inline |
Definition at line 1201 of file tiny_algebra.hpp.
|
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}\]
| [in] | a,b | The matrices whose dot-product is to be computed. |
a and b. Definition at line 2963 of file tiny_algebra.hpp.
References dot(), and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::v.
|
inline |
Computes the dot-product of two scalars.
| [in] | a,b | The scalar whose product is to be computed. |
a and b.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().
|
inline |
Computes the dot-product of two tensor3 objects.
| [in] | a,b | The tensor3 whose dot-product is to be computed. |
a and b. Definition at line 2982 of file tiny_algebra.hpp.
References dot().
|
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\]
| [in] | a,b | The vectors whose dot-product is to be computed. |
a and b. Definition at line 2940 of file tiny_algebra.hpp.
References dot().
|
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().
|
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().
|
inline |
scalar-right-multiply operator
Definition at line 2438 of file tiny_algebra.hpp.
|
inline |
scalar right-multiply operator
Definition at line 2900 of file tiny_algebra.hpp.
|
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().
|
inline |
scalar-right-multiplication operator
Definition at line 1217 of file tiny_algebra.hpp.
|
inline |
scalar-left-multiply operator
Definition at line 2431 of file tiny_algebra.hpp.
|
inline |
scalar left-multiply operator
Definition at line 2892 of file tiny_algebra.hpp.
|
inline |
scalar-left-multiplication operator
Definition at line 1210 of file tiny_algebra.hpp.
|
inline |
matrix addition operator
Definition at line 2452 of file tiny_algebra.hpp.
|
inline |
vector addition operator
Definition at line 1231 of file tiny_algebra.hpp.
|
inline |
matrix subtraction operator
Definition at line 2459 of file tiny_algebra.hpp.
|
inline |
vector subtraction operator
Definition at line 1238 of file tiny_algebra.hpp.
| 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.
| T_ | Data type. |
| m_ | Number of rows of the matrix. |
| sm_ | Row stride of the matrix. |
| sn_ | Column stride of the matrix. |
| [in] | tau | The m_ x (m_-1) matrix. |
Referenced by FEAT::Assembly::OuterNormalComputer< Trafo_ >::compute_oriented_normals(), and FEAT::Geometry::Atlas::SurfaceMesh< Mesh_ >::get_normal_on_tria().
| 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.
| [out] | nu | The vector whose first 2 components should receive the normal vector |
| [in] | tau | The matrix whose upper left 2x1 block to compute the orthogonal vector from |
Definition at line 2336 of file tiny_algebra.hpp.
| 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.
| [out] | nu | The vector whose first 3 components should receive the normal vector |
| [in] | tau | The 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().
|
inline |
Calculates the projected vector.
Definition at line 1269 of file tiny_algebra.hpp.
References dot().
Referenced by FEAT::LAFEM::DenseVectorBlocked< DT_, IT_, BlockSize_ >::project_onto().