![]() |
Reference documentation for deal.II version 9.3.3
|
#include <deal.II/matrix_free/tensor_product_kernels.h>
Public Member Functions | |
EvaluatorTensorProduct () | |
EvaluatorTensorProduct (const AlignedVector< Number2 > &shape_values, const AlignedVector< Number2 > &shape_gradients, const AlignedVector< Number2 > &shape_hessians, const unsigned int dummy1=0, const unsigned int dummy2=0) | |
template<int direction, bool contract_over_rows, bool add> | |
void | values (const Number in[], Number out[]) const |
template<int direction, bool contract_over_rows, bool add> | |
void | gradients (const Number in[], Number out[]) const |
template<int direction, bool contract_over_rows, bool add> | |
void | hessians (const Number in[], Number out[]) const |
template<int direction, bool contract_over_rows, bool add> | |
void | values_one_line (const Number in[], Number out[]) const |
template<int direction, bool contract_over_rows, bool add> | |
void | gradients_one_line (const Number in[], Number out[]) const |
template<int direction, bool contract_over_rows, bool add> | |
void | hessians_one_line (const Number in[], Number out[]) const |
template<int face_direction, bool contract_onto_face, bool add, int max_derivative, bool lex_faces = false> | |
void | apply_face (const Number *DEAL_II_RESTRICT in, Number *DEAL_II_RESTRICT out) const |
Static Public Member Functions | |
template<int direction, bool contract_over_rows, bool add, bool one_line = false> | |
static void | apply (const Number2 *DEAL_II_RESTRICT shape_data, const Number *in, Number *out) |
Public Attributes | |
const Number2 * | shape_values |
const Number2 * | shape_gradients |
const Number2 * | shape_hessians |
Static Public Attributes | |
static constexpr unsigned int | n_rows_of_product |
static constexpr unsigned int | n_columns_of_product |
Internal evaluator for shape function in arbitrary dimension using the tensor product form of the basis functions.
dim | Space dimension in which this class is applied |
n_rows | Number of rows in the transformation matrix, which corresponds to the number of 1d shape functions in the usual tensor contraction setting |
n_columns | Number of columns in the transformation matrix, which corresponds to the number of 1d shape functions in the usual tensor contraction setting |
Number | Abstract number type for input and output arrays |
Number2 | Abstract number type for coefficient arrays (defaults to same type as the input/output arrays); must implement operator* with Number and produce Number as an output to be a valid type |
Definition at line 145 of file tensor_product_kernels.h.
|
inline |
Empty constructor. Does nothing. Be careful when using 'values' and related methods because they need to be filled with the other pointer
Definition at line 161 of file tensor_product_kernels.h.
|
inline |
Constructor, taking the data from ShapeInfo
Definition at line 170 of file tensor_product_kernels.h.
|
inline |
Definition at line 199 of file tensor_product_kernels.h.
|
inline |
Definition at line 206 of file tensor_product_kernels.h.
|
inline |
Definition at line 213 of file tensor_product_kernels.h.
|
inline |
Definition at line 220 of file tensor_product_kernels.h.
|
inline |
Definition at line 228 of file tensor_product_kernels.h.
|
inline |
Definition at line 236 of file tensor_product_kernels.h.
|
inlinestatic |
This function applies the tensor product kernel, corresponding to a multiplication of 1D stripes, along the given direction
of the tensor data in the input array. This function allows the in
and out
arrays to alias for the case n_rows == n_columns, i.e., it is safe to perform the contraction in place where in
and out
point to the same address. For the case n_rows != n_columns, the output is in general not correct.
direction | Direction that is evaluated |
contract_over_rows | If true, the tensor contraction sums over the rows in the given shape_data array, otherwise it sums over the columns |
add | If true, the result is added to the output vector, else the computed values overwrite the content in the output |
one_line | If true, the kernel is only applied along a single 1D stripe within a dim-dimensional tensor, not the full n_rows^dim points as in the false case. |
shape_data | Transformation matrix with n_rows rows and n_columns columns, stored in row-major format |
in | Pointer to the start of the input data vector |
out | Pointer to the start of the output data vector |
Definition at line 337 of file tensor_product_kernels.h.
|
inline |
This function applies the tensor product operation to produce face values from cell values. As opposed to the apply method, this method assumes that the directions orthogonal to the face have n_rows degrees of freedom per direction and not n_columns for those directions lower than the one currently applied. In other words, apply_face() must be called before calling any interpolation within the face.
face_direction | Direction of the normal vector (0=x, 1=y, etc) |
contract_onto_face | If true, the input vector is of size n_rows^dim and interpolation into n_rows^(dim-1) points is performed. This is a typical scenario in FEFaceEvaluation::evaluate() calls. If false, data from n_rows^(dim-1) points is expanded into the n_rows^dim points of the higher- dimensional data array. Derivatives in the case contract_onto_face==false are summed together |
add | If true, the result is added to the output vector, else the computed values overwrite the content in the output |
max_derivative | Sets the number of derivatives that should be computed. 0 means only values, 1 means values and first derivatives, 2 second derivates. Note that all the derivatives access the data in shape_values passed to the constructor of the class |
lex_faces | Sets how the evaluation points on the faces should be sorted: lexicographically or right-hand-system number (special treatment of orientation 1 in 3D). Per default right-hand-system number is enabled, which is only working for dimensions up to 3. |
in | address of the input data vector |
out | address of the output data vector |
Definition at line 421 of file tensor_product_kernels.h.
|
staticconstexpr |
Definition at line 152 of file tensor_product_kernels.h.
|
staticconstexpr |
Definition at line 154 of file tensor_product_kernels.h.
const Number2* internal::EvaluatorTensorProduct< evaluate_general, dim, n_rows, n_columns, Number, Number2 >::shape_values |
Definition at line 318 of file tensor_product_kernels.h.
const Number2* internal::EvaluatorTensorProduct< evaluate_general, dim, n_rows, n_columns, Number, Number2 >::shape_gradients |
Definition at line 319 of file tensor_product_kernels.h.
const Number2* internal::EvaluatorTensorProduct< evaluate_general, dim, n_rows, n_columns, Number, Number2 >::shape_hessians |
Definition at line 320 of file tensor_product_kernels.h.