hyper.deal
Loading...
Searching...
No Matches
fe_evaluation_cell_inverse.h
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2020 by the hyper.deal authors
4//
5// This file is part of the hyper.deal library.
6//
7// The hyper.deal library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 3.0 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.MD at
12// the top level directory of hyper.deal.
13//
14// ---------------------------------------------------------------------
15
16#ifndef HYPERDEAL_NDIM_FEEVALUATION_CELL_INVERSE
17#define HYPERDEAL_NDIM_FEEVALUATION_CELL_INVERSE
18
19#include <hyper.deal/base/config.h>
20
21#include <hyper.deal/matrix_free/fe_evaluation_cell.h>
22
23namespace hyperdeal
24{
30 template <int dim_x,
31 int dim_v,
32 int degree,
33 int n_points,
34 typename Number,
35 typename VectorizedArrayType>
36 class FEEvaluationInverse : public FEEvaluation<dim_x,
37 dim_v,
38 degree,
39 n_points,
40 Number,
41 VectorizedArrayType>
42 {
43 public:
44 using PARENT =
46
52 const unsigned int dof_no_x,
53 const unsigned int dof_no_v,
54 const unsigned int quad_no_x,
55 const unsigned int quad_no_v);
56
60 const dealii::AlignedVector<Number> *
61 get_inverse_shape() const;
62
66 inline DEAL_II_ALWAYS_INLINE //
67 void
68 submit_inv(VectorizedArrayType *__restrict data_ptr,
69 const unsigned int q,
70 const unsigned int q1,
71 const unsigned int q2);
72
73 private:
77 const dealii::AlignedVector<Number> &inverse_shape;
78 };
79
80
81
82 template <int dim_x,
83 int dim_v,
84 int degree,
85 int n_points,
86 typename Number,
87 typename VNumber>
91 const unsigned int dof_no_x,
92 const unsigned int dof_no_v,
93 const unsigned int quad_no_x,
94 const unsigned int quad_no_v)
95 : PARENT(matrix_free, dof_no_x, dof_no_v, quad_no_x, quad_no_v)
96 , inverse_shape(
97 this->phi_x.get_shape_info().data[0].inverse_shape_values_eo)
98 {}
99
100
101
102 template <int dim_x,
103 int dim_v,
104 int degree,
105 int n_points,
106 typename Number,
107 typename VNumber>
108 const dealii::AlignedVector<Number> *
114
115
116
117 template <int dim_x,
118 int dim_v,
119 int degree,
120 int n_points,
121 typename Number,
122 typename VNumber>
123 inline DEAL_II_ALWAYS_INLINE //
124 void
126 submit_inv(VNumber *__restrict data_ptr,
127 const unsigned int q,
128 const unsigned int q1,
129 const unsigned int q2)
130 {
131 data_ptr[q] /=
132 this->phi_x.JxW(q1) *
133 this->phi_v.JxW(q2)[PARENT::n_vectors_v == 1 ? 0 : this->lane_y];
134 }
135
136} // namespace hyperdeal
137
138#endif
const MF & matrix_free
Definition fe_evaluation_base.h:98
Definition fe_evaluation_cell_inverse.h:42
const dealii::AlignedVector< Number > * get_inverse_shape() const
Definition fe_evaluation_cell_inverse.h:110
FEEvaluationInverse(const MatrixFree< dim_x, dim_v, Number, VectorizedArrayType > &matrix_free, const unsigned int dof_no_x, const unsigned int dof_no_v, const unsigned int quad_no_x, const unsigned int quad_no_v)
Definition fe_evaluation_cell_inverse.h:89
DEAL_II_ALWAYS_INLINE void submit_inv(VectorizedArrayType *__restrict data_ptr, const unsigned int q, const unsigned int q1, const unsigned int q2)
Definition fe_evaluation_cell_inverse.h:126
Definition fe_evaluation_cell.h:47
Definition matrix_free.h:40