16 #include <deal.II/base/std_cxx14/memory.h> 18 #include <deal.II/dofs/dof_accessor.h> 19 #include <deal.II/dofs/dof_handler.h> 21 #include <deal.II/fe/fe.h> 22 #include <deal.II/fe/mapping_q1_eulerian.h> 24 #include <deal.II/grid/tria_iterator.h> 26 #include <deal.II/lac/block_vector.h> 27 #include <deal.II/lac/la_parallel_block_vector.h> 28 #include <deal.II/lac/la_parallel_vector.h> 29 #include <deal.II/lac/la_vector.h> 30 #include <deal.II/lac/petsc_block_vector.h> 31 #include <deal.II/lac/petsc_vector.h> 32 #include <deal.II/lac/trilinos_parallel_block_vector.h> 33 #include <deal.II/lac/trilinos_vector.h> 34 #include <deal.II/lac/vector.h> 38 DEAL_II_NAMESPACE_OPEN
41 template <
int dim,
class VectorType,
int spacedim>
44 const VectorType & euler_transform_vectors)
46 , euler_transform_vectors(&euler_transform_vectors)
47 , shiftmap_dof_handler(&shiftmap_dof_handler)
52 template <
int dim,
class VectorType,
int spacedim>
63 AssertDimension(spacedim, shiftmap_dof_handler->get_fe().n_dofs_per_vertex());
64 AssertDimension(shiftmap_dof_handler->get_fe(0).n_components(), spacedim);
67 euler_transform_vectors->size());
73 *cell, shiftmap_dof_handler);
77 Assert(dof_cell->active() ==
true, ExcInactiveCell());
81 shiftmap_dof_handler->get_fe().dofs_per_cell);
82 dof_cell->get_dof_values(*euler_transform_vectors, mapping_values);
84 for (
unsigned int i = 0; i < GeometryInfo<dim>::vertices_per_cell; ++i)
91 for (
unsigned int j = 0; j < spacedim; ++j)
92 shift_vector[j] = mapping_values(i * spacedim + j);
96 vertices[i] = cell->vertex(i) + shift_vector;
103 template <
int dim,
class VectorType,
int spacedim>
104 std::vector<Point<spacedim>>
109 vertices = this->get_vertices(cell);
112 for (
unsigned int i = 0; i < GeometryInfo<dim>::vertices_per_cell; ++i)
120 template <
int dim,
class VectorType,
int spacedim>
121 std::unique_ptr<Mapping<dim, spacedim>>
124 return std_cxx14::make_unique<MappingQ1Eulerian<dim, VectorType, spacedim>>(
130 template <
int dim,
class VectorType,
int spacedim>
158 #include "mapping_q1_eulerian.inst" 161 DEAL_II_NAMESPACE_CLOSE
MappingQ1Eulerian(const DoFHandler< dim, spacedim > &euler_dof_handler, const VectorType &euler_vector)
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
#define AssertDimension(dim1, dim2)
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
virtual std::vector< Point< spacedim > > compute_mapping_support_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const override
#define Assert(cond, exc)
virtual std::unique_ptr< Mapping< dim, spacedim > > clone() const override
typename ActiveSelector::cell_iterator cell_iterator
virtual std::array< Point< spacedim >, GeometryInfo< dim >::vertices_per_cell > get_vertices(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const override