17 #ifndef dealii_matrix_free_mapping_data_on_the_fly_h 18 #define dealii_matrix_free_mapping_data_on_the_fly_h 21 #include <deal.II/base/config.h> 23 #include <deal.II/base/aligned_vector.h> 24 #include <deal.II/base/exceptions.h> 25 #include <deal.II/base/subscriptor.h> 26 #include <deal.II/base/vectorization.h> 28 #include <deal.II/fe/fe_nothing.h> 29 #include <deal.II/fe/fe_values.h> 30 #include <deal.II/fe/mapping_q1.h> 32 #include <deal.II/matrix_free/mapping_info.h> 33 #include <deal.II/matrix_free/shape_info.h> 36 DEAL_II_NAMESPACE_OPEN
41 namespace MatrixFreeFunctions
61 template <
int dim,
typename Number =
double>
87 reinit(typename ::Triangulation<dim>::cell_iterator cell);
99 typename ::Triangulation<dim>::cell_iterator
108 const ::FEValues<dim> &
159 template <
int dim,
typename Number>
167 MappingInfo<dim, Number>::compute_update_flags(update_flags))
168 , quadrature_1d(quadrature)
194 template <
int dim,
typename Number>
205 template <
int dim,
typename Number>
208 typename ::Triangulation<dim>::cell_iterator cell)
210 if (present_cell == cell)
213 fe_values.reinit(present_cell);
214 for (
unsigned int q = 0; q < fe_values.get_quadrature().size(); ++q)
217 mapping_info_storage.JxW_values[q] = fe_values.JxW(q);
222 for (
unsigned int d = 0; d < dim; ++d)
223 for (
unsigned int e = 0; e < dim; ++e)
224 mapping_info_storage.jacobians[0][q][d][e] = jac[d][e];
227 for (
unsigned int d = 0; d < dim; ++d)
228 mapping_info_storage.quadrature_points[q][d] =
229 fe_values.quadrature_point(q)[d];
232 for (
unsigned int d = 0; d < dim; ++d)
233 mapping_info_storage.normal_vectors[q][d] =
234 fe_values.normal_vector(q)[d];
235 mapping_info_storage.normals_times_jacobians[0][q] =
236 mapping_info_storage.normal_vectors[q] *
237 mapping_info_storage.jacobians[0][q];
244 template <
int dim,
typename Number>
248 return present_cell !=
249 typename ::Triangulation<dim>::cell_iterator();
254 template <
int dim,
typename Number>
255 inline typename ::Triangulation<dim>::cell_iterator
258 return fe_values.get_cell();
263 template <
int dim,
typename Number>
264 inline const ::FEValues<dim> &
272 template <
int dim,
typename Number>
276 return mapping_info_storage;
281 template <
int dim,
typename Number>
285 return quadrature_1d;
293 DEAL_II_NAMESPACE_CLOSE
Transformed quadrature weights.
FE_Nothing< dim > fe_dummy
AlignedVector< Tensor< 1, spacedim, VectorizedArray< Number > > > normals_times_jacobians[2]
typename ::Triangulation< dim >::cell_iterator present_cell
AlignedVector< unsigned int > data_index_offsets
bool is_initialized() const
AlignedVector< unsigned int > quadrature_point_offsets
const MappingInfoStorage< dim, dim, Number > & get_data_storage() const
UpdateFlags get_update_flags() const
Transformed quadrature points.
::FEValues< dim > fe_values
void resize(const size_type size_in)
std::vector< QuadratureDescriptor > descriptor
SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)
typename ::Triangulation< dim >::cell_iterator get_cell() const
#define Assert(cond, exc)
const Quadrature< 1 > quadrature_1d
const Quadrature< 1 > & get_quadrature() const
const ::FEValues< dim > & get_fe_values() const
SymmetricTensor< rank_, dim, Number > transpose(const SymmetricTensor< rank_, dim, Number > &t)
AlignedVector< Point< spacedim, VectorizedArray< Number > > > quadrature_points
Gradient of volume element.
const unsigned int n_quadrature_points
MappingInfoStorage< dim, dim, Number > mapping_info_storage
AlignedVector< Tensor< 1, spacedim, VectorizedArray< Number > > > normal_vectors
static ::ExceptionBase & ExcNotImplemented()
AlignedVector< Tensor< 2, spacedim, VectorizedArray< Number > > > jacobians[2]
AlignedVector< VectorizedArray< Number > > JxW_values
void reinit(typename ::Triangulation< dim >::cell_iterator cell)
MappingDataOnTheFly(const Mapping< dim > &mapping, const Quadrature< 1 > &quadrature, const UpdateFlags update_flags)