Go to the documentation of this file. 1 #pragma once // Ensure that file is included only once in a single compilation.
17 template <
unsigned int hyEdge_dimT,
unsigned int space_dimT,
typename map_
float_t>
26 static constexpr
unsigned int hyEdge_dim() {
return hyEdge_dimT; }
32 static constexpr
unsigned int space_dim() {
return space_dimT; }
96 for (
unsigned int i = 0; i < hyEdge_dimT; ++i)
110 if constexpr (hyEdge_dimT == 1)
114 SmallMat<space_dimT, hyEdge_dimT - 1, map_float_t> mat_face;
115 for (
unsigned int i = 0; i < hyEdge_dimT; ++i)
137 template <
unsigned int n_vec>
149 template <
unsigned int n_vec>
175 "The index of the searched normal must not be bigger than their amount.");
176 if constexpr (hyEdge_dimT == 1)
185 SmallMat<hyEdge_dimT, hyEdge_dimT - 1, map_float_t> other_vectors;
186 for (
unsigned int i = 0; i < hyEdge_dimT; ++i)
191 qr_decomp_q(other_vectors).get_column(hyEdge_dimT - 1);
193 hy_assert(scalar_pdct != 0.,
"Scalar product must not be zero!");
194 if (scalar_pdct > 0.)
212 "The index of the inner normal must not be bigger than their amount.");
213 if constexpr (space_dimT == 1)
216 SmallMat<space_dimT, space_dimT - 1, map_float_t> other_vectors;
217 for (
unsigned int i = 0; i < space_dimT - hyEdge_dimT; ++i)
219 for (
unsigned int i = 0; i < hyEdge_dimT; ++i)
224 qr_decomp_q(other_vectors).get_column(space_dimT - 1);
226 hy_assert(scalar_pdct != 0.,
"Scalar product must not be zero.");
241 "The index of the outer normal must not be bigger than their amount.");
This file provides the function hy_assert.
void qr_decomp(SmallMat< n_rows, n_cols, mat_entry_t > &mat, SmallSquareMat< n_rows, mat_entry_t > &mat_q, SmallSquareMat< n_cols, mat_entry_t > &mat_r)
Normalized QR decomposition.
Definition: dense_la.hxx:1039
index
Definition: check_push_test.py:10
SmallVec< hyEdge_dimT, map_float_t > local_normal(const unsigned int index) const
Return local normal of given index.
Definition: linear.hxx:172
SmallVec< space_dimT, map_float_t > inner_normal(const unsigned int index) const
Return inner normal of given index.
Definition: linear.hxx:209
SmallMat< hyEdge_dimT, n_vec, map_float_t > map_physical_to_reference(const SmallMat< space_dimT, n_vec, map_float_t > &phy_points) const
Map n_vec points from physical to element.
Definition: linear.hxx:150
const SmallMat< space_dimT, hyEdge_dimT, map_float_t > & matrix() const
Return matrix associated to affine-linear transformation.
Definition: linear.hxx:248
map_float_t functional_determinant_hyEdge() const
The functional determinant of the affine-linear mappring.
Definition: linear.hxx:93
SmallMat< space_dimT, hyEdge_dimT, map_float_t > matrix_
The matrix of the affine mapping from reference to physical element.
Definition: linear.hxx:42
static constexpr unsigned int hyEdge_dim()
Returns the template parameter representing the dimension of a hyperedge.
Definition: linear.hxx:26
const SmallSquareMat< hyEdge_dimT, map_float_t > & mat_r() const
Return matrix R of the QR decomposition.
Definition: linear.hxx:162
Linear(const Point< space_dimT, map_float_t > &translation, const SmallMat< space_dimT, hyEdge_dimT, map_float_t > &matrix)
Construct affine-linear mapping.
Definition: linear.hxx:73
SmallVec< space_dimT, map_float_t > matrix_column(const unsigned int col) const
Return vector representing matrix column of specified index.
Definition: linear.hxx:126
const SmallVec< space_dimT, map_float_t > & translation() const
Return shifting vector associated to affine-linear transformation.
Definition: linear.hxx:252
const SmallSquareMat< space_dimT, map_float_t > & mat_q() const
Return matrix Q of the QR decomposition.
Definition: linear.hxx:158
SmallVec< space_dimT, map_float_t > outer_normal(const unsigned int index) const
Return outer normal of given index.
Definition: linear.hxx:238
Linear()=default
Construct affine-linear mapping.
map_float_t functional_determinant_hyNode(const unsigned int index) const
The functional determinant of the affine-linear mapping of a hypernode.
Definition: linear.hxx:108
Mapping of a unit hypercube to a parallelotope — can also be used for simplices.
Definition: linear.hxx:18
SmallMat< space_dimT, n_vec, map_float_t > map_reference_to_physical(const SmallMat< hyEdge_dimT, n_vec, map_float_t > &points) const
Map n_vec points from reference to physical element.
Definition: linear.hxx:138
static constexpr unsigned int space_dim()
Returns the template parameter representing the dimension of the space.
Definition: linear.hxx:32
SmallSquareMat< space_dimT, map_float_t > matrix_q_
Matrix Q of QR decomposition of the matrix of the affine transformation.
Definition: linear.hxx:48
mat_entry_t scalar_product(const SmallMat< n_rows, n_cols, mat_entry_t > &left, const SmallMat< n_rows, n_cols, mat_entry_t > &right)
Euclidean scalar product of two SmallVecs / Frobenius scalar product for two SmallMats.
Definition: dense_la.hxx:571
SmallVec< space_dimT, map_float_t > translation_
The translation of the affine mapping from reference to physical element.
Definition: linear.hxx:38
Namespace for mappings from reference elements to physical elements, etc.
Definition: linear.hxx:6
SmallSquareMat< hyEdge_dimT, map_float_t > matrix_r_
Matrix R of QR decomposition of the matrix of the affine transformation.
Definition: linear.hxx:60
#define hy_assert(Expr, Msg)
The assertion to be used within HyperHDG — deactivate using -DNDEBUG compile flag.
Definition: hy_assert.hxx:38
SmallMat< n_rows, n_rows, mat_entry_t > qr_decomp_q(SmallMat< n_rows, n_cols, mat_entry_t > &mat)
Matrix Q of Householder QR decomposition.
Definition: dense_la.hxx:1009
SmallMat< n_rowsT, 1, mat_entry_t > get_column(const unsigned int col) const
Return a column of a SmallMat.
Definition: dense_la.hxx:206
mat_entry_t determinant(SmallMat< n_rows, n_cols, mat_entry_t > &mat)
Determinant of a rectangular system.
Definition: dense_la.hxx:1121
void set_column(const unsigned int col, const SmallMat< n_rowsT, 1, mat_entry_t > col_vec)
Set column of a SmallMat.
Definition: dense_la.hxx:220
This class implements a small/dense matrix.
Definition: dense_la.hxx:34