16 #include <deal.II/base/std_cxx14/memory.h> 18 #include <deal.II/fe/mapping_q1_eulerian.h> 19 #include <deal.II/lac/vector.h> 20 #include <deal.II/lac/block_vector.h> 21 #include <deal.II/lac/la_vector.h> 22 #include <deal.II/lac/la_parallel_vector.h> 23 #include <deal.II/lac/la_parallel_block_vector.h> 24 #include <deal.II/lac/petsc_parallel_vector.h> 25 #include <deal.II/lac/petsc_parallel_block_vector.h> 26 #include <deal.II/lac/trilinos_vector.h> 27 #include <deal.II/lac/trilinos_parallel_block_vector.h> 28 #include <deal.II/lac/trilinos_parallel_block_vector.h> 29 #include <deal.II/grid/tria_iterator.h> 30 #include <deal.II/dofs/dof_handler.h> 31 #include <deal.II/dofs/dof_accessor.h> 32 #include <deal.II/fe/fe.h> 37 DEAL_II_NAMESPACE_OPEN
40 template <
int dim,
class VectorType,
int spacedim>
43 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>
64 AssertDimension (spacedim, shiftmap_dof_handler->get_fe().n_dofs_per_vertex());
65 AssertDimension (shiftmap_dof_handler->get_fe(0).n_components(), spacedim);
67 AssertDimension (shiftmap_dof_handler->n_dofs(), euler_transform_vectors->size());
76 Assert (dof_cell->active() ==
true, ExcInactiveCell());
79 Vector<double> mapping_values (shiftmap_dof_handler->get_fe().dofs_per_cell);
80 dof_cell->get_dof_values (*euler_transform_vectors, mapping_values);
82 for (
unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
89 for (
unsigned int j=0; j<spacedim; ++j)
90 shift_vector[j] = mapping_values(i*spacedim+j);
94 vertices[i] = cell->vertex(i) + shift_vector;
101 template <
int dim,
class VectorType,
int spacedim>
102 std::vector<Point<spacedim> >
107 vertices = this->get_vertices(cell);
110 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>>(*this);
129 template <
int dim,
class VectorType,
int spacedim>
155 #include "mapping_q1_eulerian.inst" 158 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
ActiveSelector::cell_iterator cell_iterator
#define Assert(cond, exc)
virtual std::unique_ptr< Mapping< dim, spacedim > > clone() const override
virtual std::array< Point< spacedim >, GeometryInfo< dim >::vertices_per_cell > get_vertices(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const override