16 #include <deal.II/base/quadrature_lib.h> 17 #include <deal.II/base/std_cxx14/memory.h> 18 #include <deal.II/base/utilities.h> 20 #include <deal.II/dofs/dof_accessor.h> 21 #include <deal.II/dofs/dof_handler.h> 23 #include <deal.II/fe/fe.h> 24 #include <deal.II/fe/fe_tools.h> 25 #include <deal.II/fe/mapping_q1_eulerian.h> 26 #include <deal.II/fe/mapping_q_eulerian.h> 28 #include <deal.II/grid/tria_iterator.h> 30 #include <deal.II/lac/block_vector.h> 31 #include <deal.II/lac/la_parallel_block_vector.h> 32 #include <deal.II/lac/la_parallel_vector.h> 33 #include <deal.II/lac/la_vector.h> 34 #include <deal.II/lac/petsc_block_vector.h> 35 #include <deal.II/lac/petsc_vector.h> 36 #include <deal.II/lac/trilinos_parallel_block_vector.h> 37 #include <deal.II/lac/trilinos_vector.h> 38 #include <deal.II/lac/vector.h> 40 DEAL_II_NAMESPACE_OPEN
46 template <
int dim,
class VectorType,
int spacedim>
49 const unsigned int degree,
52 , mapping_q_eulerian(mapping_q_eulerian)
53 , support_quadrature(degree)
54 , fe_values(mapping_q_eulerian.euler_dof_handler->get_fe(),
61 template <
int dim,
class VectorType,
int spacedim>
63 const unsigned int degree,
66 const unsigned int level)
67 :
MappingQ<dim, spacedim>(degree, true)
76 std::make_shared<MappingQ1Eulerian<dim, VectorType, spacedim>>(
80 this->
qp_mapping = std::make_shared<MappingQEulerianGeneric>(degree, *
this);
85 template <
int dim,
class VectorType,
int spacedim>
86 std::unique_ptr<Mapping<dim, spacedim>>
89 return std_cxx14::make_unique<MappingQEulerian<dim, VectorType, spacedim>>(
90 this->get_degree(), *euler_dof_handler, *euler_vector);
97 template <
int dim,
class VectorType,
int spacedim>
106 const unsigned int n_q_points = q_iterated.
size();
111 std::vector<unsigned int> renumber(n_q_points);
112 std::vector<unsigned int> dpo(dim + 1, 1U);
113 for (
unsigned int i = 1; i < dpo.size(); ++i)
114 dpo[i] = dpo[i - 1] * (map_degree - 1);
120 for (
unsigned int q = 0; q < n_q_points; ++q)
128 template <
int dim,
class VectorType,
int spacedim>
134 const std::vector<Point<spacedim>> a =
142 vertex_locations.begin());
144 return vertex_locations;
149 template <
int dim,
class VectorType,
int spacedim>
160 template <
int dim,
class VectorType,
int spacedim>
170 template <
int dim,
class VectorType,
int spacedim>
171 std::vector<Point<spacedim>>
176 const bool mg_vector =
210 const unsigned int n_components =
213 Assert(n_components >= spacedim,
216 std::vector<Vector<typename VectorType::value_type>> shift_vector(
219 std::vector<types::global_dof_index> dof_indices(
228 dof_cell->get_mg_dof_indices(dof_indices);
239 std::vector<Point<spacedim>> a(n_support_pts);
240 for (
unsigned int q = 0; q < n_support_pts; ++q)
243 for (
unsigned int d = 0; d < spacedim; ++d)
244 a[q](d) += shift_vector[q](d);
252 template <
int dim,
class VectorType,
int spacedim>
279 #include "mapping_q_eulerian.inst" 282 DEAL_II_NAMESPACE_CLOSE
static const unsigned int invalid_unsigned_int
#define AssertDimension(dim1, dim2)
SmartPointer< const DoFHandler< dim, spacedim >, MappingQEulerian< dim, VectorType, spacedim > > euler_dof_handler
std::shared_ptr< const MappingQGeneric< dim, spacedim > > qp_mapping
FEValues< dim, spacedim > fe_values
Threads::Mutex fe_values_mutex
static ::ExceptionBase & ExcInactiveCell()
const Point< dim > & point(const unsigned int i) const
Transformed quadrature points.
const SupportQuadrature support_quadrature
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
#define Assert(cond, exc)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
virtual std::vector< Point< spacedim > > compute_mapping_support_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const override
MappingQEulerian(const unsigned int degree, const DoFHandler< dim, spacedim > &euler_dof_handler, const VectorType &euler_vector, const unsigned int level=numbers::invalid_unsigned_int)
virtual std::array< Point< spacedim >, GeometryInfo< dim >::vertices_per_cell > get_vertices(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const override
std::vector< Point< dim > > quadrature_points
unsigned int size() const
unsigned int global_dof_index
virtual std::unique_ptr< Mapping< dim, spacedim > > clone() const override
const MappingQEulerian< dim, VectorType, spacedim > & mapping_q_eulerian
typename ActiveSelector::cell_iterator cell_iterator
virtual bool preserves_vertex_locations() const override
SmartPointer< const VectorType, MappingQEulerian< dim, VectorType, spacedim > > euler_vector
SupportQuadrature(const unsigned int map_degree)
std::shared_ptr< const MappingQGeneric< dim, spacedim > > q1_mapping