Reference documentation for deal.II version 9.0.0
mapping_q_eulerian.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2001 - 2018 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II 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 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 
17 #ifndef dealii_mapping_q_eulerian_h
18 #define dealii_mapping_q_eulerian_h
19 
20 #include <deal.II/base/config.h>
21 #include <deal.II/base/smartpointer.h>
22 #include <deal.II/base/thread_management.h>
23 #include <deal.II/grid/tria_iterator.h>
24 #include <deal.II/dofs/dof_handler.h>
25 #include <deal.II/dofs/dof_accessor.h>
26 #include <deal.II/fe/fe_values.h>
27 #include <deal.II/fe/mapping_q.h>
28 
29 
30 DEAL_II_NAMESPACE_OPEN
31 
32 template <typename> class Vector;
33 
34 
37 
89 template <int dim, typename VectorType = Vector<double>, int spacedim=dim >
90 class MappingQEulerian : public MappingQ<dim, spacedim>
91 {
92 public:
109  MappingQEulerian (const unsigned int degree,
111  const VectorType &euler_vector,
112  const unsigned int level = numbers::invalid_unsigned_int);
113 
120  virtual
121  std::array<Point<spacedim>, GeometryInfo<dim>::vertices_per_cell>
122  get_vertices (const typename Triangulation<dim,spacedim>::cell_iterator &cell) const override;
123 
128  virtual
129  std::unique_ptr<Mapping<dim,spacedim>> clone () const override;
130 
136  virtual
137  bool preserves_vertex_locations () const override;
138 
144 
145 protected:
154  virtual
157  const CellSimilarity::Similarity cell_similarity,
158  const Quadrature<dim> &quadrature,
159  const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
161 
166 
171 
172 
173 private:
174 
178  const unsigned int level;
179 
185  class MappingQEulerianGeneric : public MappingQGeneric<dim,spacedim>
186  {
187  public:
188 
192  MappingQEulerianGeneric (const unsigned int degree,
194 
201  virtual
202  std::array<Point<spacedim>, GeometryInfo<dim>::vertices_per_cell>
203  get_vertices (const typename Triangulation<dim,spacedim>::cell_iterator &cell) const override;
204 
210  virtual
211  std::vector<Point<spacedim> >
213 
219  virtual
220  bool preserves_vertex_locations () const override;
221 
222  private:
227 
228 
233  class SupportQuadrature : public Quadrature<dim>
234  {
235  public:
239  SupportQuadrature (const unsigned int map_degree);
240 
241  };
242 
247 
257 
262  };
263 
264 };
265 
269 /*----------------------------------------------------------------------*/
270 
271 #ifndef DOXYGEN
272 
273 template <int dim, typename VectorType, int spacedim>
274 inline
275 bool
277 {
278  return false;
279 }
280 
281 #endif // DOXYGEN
282 
283 
284 DEAL_II_NAMESPACE_CLOSE
285 
286 
287 #endif // dealii_mapping_q_eulerian_h
static const unsigned int invalid_unsigned_int
Definition: types.h:173
const unsigned int level
static ::ExceptionBase & ExcInactiveCell()
virtual CellSimilarity::Similarity fill_fe_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const override
MappingQEulerianGeneric(const unsigned int degree, const MappingQEulerian< dim, VectorType, spacedim > &mapping_q_eulerian)
virtual std::array< Point< spacedim >, GeometryInfo< dim >::vertices_per_cell > get_vertices(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const override
virtual std::vector< Point< spacedim > > compute_mapping_support_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const override
#define DeclException0(Exception0)
Definition: exceptions.h:323
MappingQEulerian(const unsigned int degree, const DoFHandler< dim, spacedim > &euler_dof_handler, const VectorType &euler_vector, const unsigned int level=numbers::invalid_unsigned_int)
SmartPointer< const VectorType, MappingQEulerian< dim, VectorType, spacedim > > euler_vector
virtual std::array< Point< spacedim >, GeometryInfo< dim >::vertices_per_cell > get_vertices(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const override
virtual bool preserves_vertex_locations() const override
virtual std::unique_ptr< Mapping< dim, spacedim > > clone() const override
SmartPointer< const DoFHandler< dim, spacedim >, MappingQEulerian< dim, VectorType, spacedim > > euler_dof_handler
Definition: fe.h:33
virtual bool preserves_vertex_locations() const override
const MappingQEulerian< dim, VectorType, spacedim > & mapping_q_eulerian