Reference documentation for deal.II version 8.4.1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MappingQ1Eulerian< dim, VectorType, spacedim > Class Template Reference

#include <deal.II/fe/mapping_q1_eulerian.h>

Inheritance diagram for MappingQ1Eulerian< dim, VectorType, spacedim >:
[legend]

Public Member Functions

 MappingQ1Eulerian (const VectorType &euler_transform_vectors, const DoFHandler< dim, spacedim > &shiftmap_dof_handler)
 
virtual std_cxx11::array< Point< spacedim >, GeometryInfo< dim >::vertices_per_cell > get_vertices (const typename Triangulation< dim, spacedim >::cell_iterator &cell) const
 
virtual MappingQ1Eulerian< dim, VectorType, spacedim > * clone () const
 
bool preserves_vertex_locations () const
 
 DeclException0 (ExcInactiveCell)
 
- Public Member Functions inherited from MappingQGeneric< dim, spacedim >
 MappingQGeneric (const unsigned int polynomial_degree)
 
 MappingQGeneric (const MappingQGeneric< dim, spacedim > &mapping)
 
unsigned int get_degree () const
 
virtual Point< spacedim > transform_unit_to_real_cell (const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< dim > &p) const
 
virtual Point< dim > transform_real_to_unit_cell (const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< spacedim > &p) const
 
virtual void transform (const ArrayView< const Tensor< 1, dim > > &input, const MappingType type, const typename Mapping< dim, spacedim >::InternalDataBase &internal, const ArrayView< Tensor< 1, spacedim > > &output) const
 
virtual void transform (const ArrayView< const DerivativeForm< 1, dim, spacedim > > &input, const MappingType type, const typename Mapping< dim, spacedim >::InternalDataBase &internal, const ArrayView< Tensor< 2, spacedim > > &output) const
 
virtual void transform (const ArrayView< const Tensor< 2, dim > > &input, const MappingType type, const typename Mapping< dim, spacedim >::InternalDataBase &internal, const ArrayView< Tensor< 2, spacedim > > &output) const
 
virtual void transform (const ArrayView< const DerivativeForm< 2, dim, spacedim > > &input, const MappingType type, const typename Mapping< dim, spacedim >::InternalDataBase &internal, const ArrayView< Tensor< 3, spacedim > > &output) const
 
virtual void transform (const ArrayView< const Tensor< 3, dim > > &input, const MappingType type, const typename Mapping< dim, spacedim >::InternalDataBase &internal, const ArrayView< Tensor< 3, spacedim > > &output) const
 
virtual UpdateFlags requires_update_flags (const UpdateFlags update_flags) const
 
virtual InternalDataget_data (const UpdateFlags, const Quadrature< dim > &quadrature) const
 
virtual InternalDataget_face_data (const UpdateFlags flags, const Quadrature< dim-1 > &quadrature) const
 
virtual InternalDataget_subface_data (const UpdateFlags flags, const Quadrature< dim-1 > &quadrature) 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
 
virtual void fill_fe_face_values (const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const Quadrature< dim-1 > &quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data,::internal::FEValues::MappingRelatedData< dim, spacedim > &output_data) const
 
virtual void fill_fe_subface_values (const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int subface_no, const Quadrature< dim-1 > &quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data,::internal::FEValues::MappingRelatedData< dim, spacedim > &output_data) const
 
- Public Member Functions inherited from Mapping< dim, spacedim >
virtual ~Mapping ()
 
Point< dim-1 > project_real_point_to_unit_point_on_face (const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int &face_no, const Point< spacedim > &p) const
 
 DeclException0 (ExcInvalidData)
 
 DeclExceptionMsg (ExcTransformationFailed,"Computing the mapping between a real space point and a point in reference ""space failed, typically because the given point lies outside the cell ""where the inverse mapping is not unique.")
 
 DeclException3 (ExcDistortedMappedCell, Point< spacedim >, double, int,<< "The image of the mapping applied to cell with center ["<< arg1<< "] is distorted. The cell geometry or the "<< "mapping are invalid, giving a non-positive volume "<< "fraction of "<< arg2<< " in quadrature point "<< arg3<< ".")
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
void subscribe (const char *identifier=0) const
 
void unsubscribe (const char *identifier=0) const
 
unsigned int n_subscriptions () const
 
void list_subscribers () const
 
 DeclException3 (ExcInUse, int, char *, std::string &,<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects."<< "\n\n"<< "(Additional information: "<< arg3<< ")\n\n"<< "See the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "a lot more information on what this error means and "<< "how to fix programs in which it happens.")
 
 DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier <"<< arg2<< "> subscribes to this object of class "<< arg1<< ". Consequently, it cannot be unsubscribed.")
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Protected Member Functions

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
 
virtual std::vector< Point< spacedim > > compute_mapping_support_points (const typename Triangulation< dim, spacedim >::cell_iterator &cell) const
 
- Protected Member Functions inherited from MappingQGeneric< dim, spacedim >
Point< dim > transform_real_to_unit_cell_internal (const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< spacedim > &p, const Point< dim > &initial_p_unit) const
 
virtual void add_line_support_points (const typename Triangulation< dim, spacedim >::cell_iterator &cell, std::vector< Point< spacedim > > &a) const
 
virtual void add_quad_support_points (const typename Triangulation< dim, spacedim >::cell_iterator &cell, std::vector< Point< spacedim > > &a) const
 
Interface with FEValues

Protected Attributes

SmartPointer< const VectorType, MappingQ1Eulerian< dim, VectorType, spacedim > > euler_transform_vectors
 
SmartPointer< const DoFHandler< dim, spacedim >, MappingQ1Eulerian< dim, VectorType, spacedim > > shiftmap_dof_handler
 
- Protected Attributes inherited from MappingQGeneric< dim, spacedim >
const unsigned int polynomial_degree
 
const std_cxx11::unique_ptr< FE_Q< dim > > fe_q
 
Table< 2, double > support_point_weights_on_quad
 
Table< 2, double > support_point_weights_on_hex
 

Detailed Description

template<int dim, typename VectorType = Vector<double>, int spacedim = dim>
class MappingQ1Eulerian< dim, VectorType, spacedim >

Eulerian mapping of general unit cells by \(d\)-linear shape functions. Each cell is thus shifted in space by values given to the mapping through a finite element field.

Usage

The constructor of this class takes two arguments: a reference to the vector that defines the mapping from the reference configuration to the current configuration and a reference to the DoFHandler. The vector should then represent a (flattened out version of a) vector valued field defined at nodes defined by the the DoFHandler, where the number of components of the vector field equals the number of space dimensions. Thus, the DoFHandler shall operate on a finite element that has as many components as space dimensions. As an additional requirement, we impose that it have as many degree of freedom per vertex as there are space dimensions; since this object only evaluates the finite element field at the vertices, the values of all other degrees of freedom (not associated to vertices) are ignored. These requirements are met if the finite element which the given DoFHandler operates on is constructed as a system element (FESystem) from dim continuous FE_Q() objects.

In many cases, the shift vector will also be the solution vector of the problem under investigation. If this is not the case (i.e. the number of components of the solution variable is not equal to the space dimension, e.g. for scalar problems in dim>1 where the Eulerian coordinates only give a background field) or for coupled problems where more variables are computed than just the flow field), then a different DoFHandler has to be set up on the given triangulation, and the shift vector has then to be associated to it.

An example is shown below:

DoFHandler<dim> flowfield_dof_handler(triangulation);
flowfield_dof_handler.distribute_dofs(fe);
Vector<double> map_points(flowfield_dof_handler.n_dofs());
MappingQ1Eulerian<dim> mymapping(map_points, flowfield_dof_handler);

Note that since the vector of shift values and the dof handler are only associated to this object at construction time, you have to make sure that whenever you use this object, the given objects still represent valid data.

To enable the use of the MappingQ1Eulerian class also in the context of parallel codes using the PETSc wrapper classes, the type of the vector can be specified as template parameter EulerVectorType Not specifying this template argument in applications using the PETSc vector classes leads to the construction of a copy of the vector which is not acccessible afterwards!

For more information about the spacedim template parameter check the documentation of FiniteElement or the one of Triangulation.

Author
Michael Stadler, 2001

Definition at line 86 of file mapping_q1_eulerian.h.

Constructor & Destructor Documentation

template<int dim, typename VectorType = Vector<double>, int spacedim = dim>
MappingQ1Eulerian< dim, EulerVectorType, spacedim >::MappingQ1Eulerian ( const VectorType &  euler_transform_vectors,
const DoFHandler< dim, spacedim > &  shiftmap_dof_handler 
)

Constructor. It takes a Vector<double> & as its first argument to specify the transformation of the whole problem from the reference to the current configuration. The organization of the elements in the Vector must follow the concept how deal.II stores solutions that are associated to a triangulation. This is automatically the case if the Vector represents the solution of the previous step of a nonlinear problem. Alternatively, the Vector can be initialized by DoFAccessor::set_dof_values().

Definition at line 33 of file mapping_q1_eulerian.cc.

Member Function Documentation

template<int dim, class EulerVectorType , int spacedim>
std_cxx11::array< Point< spacedim >, GeometryInfo< dim >::vertices_per_cell > MappingQ1Eulerian< dim, EulerVectorType, spacedim >::get_vertices ( const typename Triangulation< dim, spacedim >::cell_iterator &  cell) const
virtual

Return the mapped vertices of the cell. For the current class, this function does not use the support points from the geometry of the current cell but instead evaluates an externally given displacement field in addition to the geometry of the cell.

Reimplemented from Mapping< dim, spacedim >.

Definition at line 47 of file mapping_q1_eulerian.cc.

template<int dim, class EulerVectorType , int spacedim>
MappingQ1Eulerian< dim, EulerVectorType, spacedim > * MappingQ1Eulerian< dim, EulerVectorType, spacedim >::clone ( ) const
virtual

Return a pointer to a copy of the present object. The caller of this copy then assumes ownership of it.

Reimplemented from MappingQGeneric< dim, spacedim >.

Definition at line 113 of file mapping_q1_eulerian.cc.

template<int dim, typename VectorType = Vector<double>, int spacedim = dim>
bool MappingQ1Eulerian< dim, VectorType, spacedim >::preserves_vertex_locations ( ) const
virtual

Always returns false because MappingQ1Eulerian does not in general preserve vertex locations (unless the translation vector happens to provide for zero displacements at vertex locations).

Reimplemented from MappingQGeneric< dim, spacedim >.

template<int dim, typename VectorType = Vector<double>, int spacedim = dim>
MappingQ1Eulerian< dim, VectorType, spacedim >::DeclException0 ( ExcInactiveCell  )

Exception.

template<int dim, class EulerVectorType , int spacedim>
CellSimilarity::Similarity MappingQ1Eulerian< dim, EulerVectorType, spacedim >::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
protectedvirtual

Compute mapping-related information for a cell. See the documentation of Mapping::fill_fe_values() for a discussion of purpose, arguments, and return value of this function.

This function overrides the function in the base class since we cannot use any cell similarity for this class.

Definition at line 123 of file mapping_q1_eulerian.cc.

template<int dim, class EulerVectorType , int spacedim>
std::vector< Point< spacedim > > MappingQ1Eulerian< dim, EulerVectorType, spacedim >::compute_mapping_support_points ( const typename Triangulation< dim, spacedim >::cell_iterator &  cell) const
protectedvirtual

Compute the support points of the mapping. For the current class, these are the vertices, as obtained by calling Mapping::get_vertices(). See the documentation of MappingQGeneric::compute_mapping_support_points() for more information.

Reimplemented from MappingQGeneric< dim, spacedim >.

Definition at line 95 of file mapping_q1_eulerian.cc.

Member Data Documentation

template<int dim, typename VectorType = Vector<double>, int spacedim = dim>
SmartPointer<const VectorType, MappingQ1Eulerian<dim,VectorType,spacedim> > MappingQ1Eulerian< dim, VectorType, spacedim >::euler_transform_vectors
protected

Reference to the vector of shifts.

Definition at line 164 of file mapping_q1_eulerian.h.

template<int dim, typename VectorType = Vector<double>, int spacedim = dim>
SmartPointer<const DoFHandler<dim,spacedim>,MappingQ1Eulerian<dim,VectorType,spacedim> > MappingQ1Eulerian< dim, VectorType, spacedim >::shiftmap_dof_handler
protected

Pointer to the DoFHandler to which the mapping vector is associated.

Definition at line 169 of file mapping_q1_eulerian.h.


The documentation for this class was generated from the following files: