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> 22 #include <deal.II/base/exceptions.h> 23 #include <deal.II/base/subscriptor.h> 24 #include <deal.II/base/vectorization.h> 25 #include <deal.II/base/aligned_vector.h> 26 #include <deal.II/matrix_free/shape_info.h> 27 #include <deal.II/matrix_free/mapping_info.h> 28 #include <deal.II/fe/fe_values.h> 29 #include <deal.II/fe/fe_nothing.h> 30 #include <deal.II/fe/mapping_q1.h> 33 DEAL_II_NAMESPACE_OPEN
38 namespace MatrixFreeFunctions
58 template <
int dim,
typename Number=
double>
83 void reinit(typename ::Triangulation<dim>::cell_iterator cell);
94 typename ::Triangulation<dim>::cell_iterator
get_cell ()
const;
152 template <
int dim,
typename Number>
158 fe_values(mapping, fe_dummy,
Quadrature<dim>(quadrature),
159 MappingInfo<dim,Number>::compute_update_flags(update_flags)),
160 quadrature_1d(quadrature)
183 template <
int dim,
typename Number>
189 quadrature, update_flags)
194 template <
int dim,
typename Number>
199 if (present_cell == cell)
202 fe_values.reinit(present_cell);
203 for (
unsigned int q=0; q<fe_values.get_quadrature().size(); ++q)
206 mapping_info_storage.JxW_values[q] = fe_values.JxW(q);
211 for (
unsigned int d=0; d<dim; ++d)
212 for (
unsigned int e=0; e<dim; ++e)
213 mapping_info_storage.jacobians[0][q][d][e] = jac[d][e];
216 for (
unsigned int d=0; d<dim; ++d)
217 mapping_info_storage.quadrature_points[q][d] = fe_values.quadrature_point(q)[d];
220 for (
unsigned int d=0; d<dim; ++d)
221 mapping_info_storage.normal_vectors[q][d] = fe_values.normal_vector(q)[d];
222 mapping_info_storage.normals_times_jacobians[0][q] =
223 mapping_info_storage.normal_vectors[q] *
224 mapping_info_storage.jacobians[0][q];
231 template <
int dim,
typename Number>
236 return present_cell != typename ::Triangulation<dim>::cell_iterator();
241 template <
int dim,
typename Number>
243 typename ::Triangulation<dim>::cell_iterator
246 return fe_values.get_cell();
251 template <
int dim,
typename Number>
253 const ::FEValues<dim> &
261 template <
int dim,
typename Number>
266 return mapping_info_storage;
271 template <
int dim,
typename Number>
276 return quadrature_1d;
284 DEAL_II_NAMESPACE_CLOSE
Transformed quadrature weights.
FE_Nothing< dim > fe_dummy
typename ::Triangulation< dim >::cell_iterator present_cell
AlignedVector< unsigned int > data_index_offsets
MappingInfoStorage< dim, dim, Number > mapping_info_storage
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.
AlignedVector< Tensor< 1, spacedim, VectorizedArray< Number > > > normals_times_jacobians[2]
::FEValues< dim > fe_values
void resize(const size_type size_in)
std::vector< QuadratureDescriptor > descriptor
AlignedVector< Tensor< 2, spacedim, VectorizedArray< Number > > > jacobians[2]
SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)
typename ::Triangulation< dim >::cell_iterator get_cell() const
AlignedVector< Tensor< 1, spacedim, VectorizedArray< Number > > > normal_vectors
#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)
Gradient of volume element.
const unsigned int n_quadrature_points
AlignedVector< Point< spacedim, VectorizedArray< Number > > > quadrature_points
static ::ExceptionBase & ExcNotImplemented()
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)