16 #include <deal.II/base/std_cxx11/array.h> 17 #include <deal.II/fe/mapping_q1_eulerian.h> 18 #include <deal.II/lac/vector.h> 19 #include <deal.II/lac/block_vector.h> 20 #include <deal.II/lac/la_vector.h> 21 #include <deal.II/lac/la_parallel_vector.h> 22 #include <deal.II/lac/la_parallel_block_vector.h> 23 #include <deal.II/lac/petsc_vector.h> 24 #include <deal.II/lac/petsc_block_vector.h> 25 #include <deal.II/lac/trilinos_vector.h> 26 #include <deal.II/lac/trilinos_block_vector.h> 27 #include <deal.II/lac/trilinos_parallel_block_vector.h> 28 #include <deal.II/grid/tria_iterator.h> 29 #include <deal.II/dofs/dof_handler.h> 30 #include <deal.II/dofs/dof_accessor.h> 31 #include <deal.II/fe/fe.h> 33 DEAL_II_NAMESPACE_OPEN
36 template <
int dim,
class VectorType,
int spacedim>
39 const VectorType &euler_transform_vectors)
42 euler_transform_vectors(&euler_transform_vectors),
43 shiftmap_dof_handler(&shiftmap_dof_handler)
47 template <
int dim,
class VectorType,
int spacedim>
53 euler_transform_vectors(&euler_transform_vectors),
54 shiftmap_dof_handler(&shiftmap_dof_handler)
59 template <
int dim,
class VectorType,
int spacedim>
71 AssertDimension (spacedim, shiftmap_dof_handler->get_fe().n_dofs_per_vertex());
72 AssertDimension (shiftmap_dof_handler->get_fe().n_components(), spacedim);
74 AssertDimension (shiftmap_dof_handler->n_dofs(), euler_transform_vectors->size());
83 Assert (dof_cell->active() ==
true, ExcInactiveCell());
86 Vector<double> mapping_values (shiftmap_dof_handler->get_fe().dofs_per_cell);
87 dof_cell->get_dof_values (*euler_transform_vectors, mapping_values);
89 for (
unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
96 for (
unsigned int j=0; j<spacedim; ++j)
97 shift_vector[j] = mapping_values(i*spacedim+j);
101 vertices[i] = cell->vertex(i) + shift_vector;
108 template<
int dim,
class VectorType,
int spacedim>
109 std::vector<Point<spacedim> >
114 vertices = this->get_vertices(cell);
117 for (
unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
127 template <
int dim,
class VectorType,
int spacedim>
136 template<
int dim,
class VectorType,
int spacedim>
162 #include "mapping_q1_eulerian.inst" 165 DEAL_II_NAMESPACE_CLOSE
MappingQ1Eulerian(const DoFHandler< dim, spacedim > &euler_dof_handler, const VectorType &euler_vector)
#define AssertDimension(dim1, dim2)
virtual std::vector< Point< spacedim > > compute_mapping_support_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const
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::FEValues::MappingRelatedData< dim, spacedim > &output_data) const
ActiveSelector::cell_iterator cell_iterator
#define Assert(cond, exc)
virtual MappingQ1Eulerian< dim, VectorType, spacedim > * clone() const
virtual std_cxx11::array< Point< spacedim >, GeometryInfo< dim >::vertices_per_cell > get_vertices(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const
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::FEValues::MappingRelatedData< dim, spacedim > &output_data) const