MappingQ1Eulerian< dim, EulerVectorType, spacedim > Class Template Reference
[Mappings between reference and real cell]

Inheritance diagram for MappingQ1Eulerian< dim, EulerVectorType, spacedim >:

Inheritance graph
[legend]

List of all members.

Classes

class  ExcInactiveCell
class  ExcWrongNoOfComponents
class  ExcWrongVectorSize

Public Member Functions

 MappingQ1Eulerian (const EulerVectorType &euler_transform_vectors, const DoFHandler< dim > &shiftmap_dof_handler)
virtual Mapping< dim, spacedim > * clone () const

Protected Member Functions

virtual void fill_fe_values (const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Quadrature< dim > &quadrature, typename Mapping< dim, spacedim >::InternalDataBase &mapping_data, typename std::vector< Point< spacedim > > &quadrature_points, std::vector< double > &JxW_values, std::vector< Tensor< 2, spacedim > > &jacobians, std::vector< Tensor< 3, spacedim > > &jacobian_grads, std::vector< Tensor< 2, spacedim > > &inverse_jacobians, std::vector< Point< spacedim > > &cell_normal_vectors, enum CellSimilarity::Similarity &cell_similarity) const

Protected Attributes

const EulerVectorType & euler_transform_vectors
const SmartPointer< const
DoFHandler< dim > > 
shiftmap_dof_handler

Private Member Functions

virtual void compute_mapping_support_points (const typename Triangulation< dim >::cell_iterator &cell, std::vector< Point< dim > > &a) const


Detailed Description

template<int dim, class EulerVectorType = Vector<double>, int spacedim = dim>
class MappingQ1Eulerian< dim, EulerVectorType, 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:

 *    FESystem<dim> fe(FE_Q<dim>(1), dim);
 *    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

Constructor & Destructor Documentation

template<int dim, class EulerVectorType = Vector<double>, int spacedim = dim>
MappingQ1Eulerian< dim, EulerVectorType, spacedim >::MappingQ1Eulerian ( const EulerVectorType &  euler_transform_vectors,
const DoFHandler< dim > &  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().


Member Function Documentation

template<int dim, class EulerVectorType = Vector<double>, int spacedim = dim>
virtual Mapping<dim,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 MappingQ1< dim, spacedim >.

template<int dim, class EulerVectorType = Vector<double>, int spacedim = dim>
virtual void MappingQ1Eulerian< dim, EulerVectorType, spacedim >::fill_fe_values ( const typename Triangulation< dim, spacedim >::cell_iterator &  cell,
const Quadrature< dim > &  quadrature,
typename Mapping< dim, spacedim >::InternalDataBase &  mapping_data,
typename std::vector< Point< spacedim > > &  quadrature_points,
std::vector< double > &  JxW_values,
std::vector< Tensor< 2, spacedim > > &  jacobians,
std::vector< Tensor< 3, spacedim > > &  jacobian_grads,
std::vector< Tensor< 2, spacedim > > &  inverse_jacobians,
std::vector< Point< spacedim > > &  cell_normal_vectors,
enum CellSimilarity::Similarity cell_similarity 
) const [protected, virtual]

Implementation of the interface in MappingQ1. Overrides the function in the base class, since we cannot use any cell similarity for this class.

Reimplemented from MappingQ1< dim, spacedim >.

template<int dim, class EulerVectorType = Vector<double>, int spacedim = dim>
virtual void MappingQ1Eulerian< dim, EulerVectorType, spacedim >::compute_mapping_support_points ( const typename Triangulation< dim >::cell_iterator &  cell,
std::vector< Point< dim > > &  a 
) const [private, virtual]

Computes the support points of the mapping. For MappingQ1Eulerian these are the vertices.


Member Data Documentation

template<int dim, class EulerVectorType = Vector<double>, int spacedim = dim>
const EulerVectorType& MappingQ1Eulerian< dim, EulerVectorType, spacedim >::euler_transform_vectors [protected]

Reference to the vector of shifts.

template<int dim, class EulerVectorType = Vector<double>, int spacedim = dim>
const SmartPointer<const DoFHandler<dim> > MappingQ1Eulerian< dim, EulerVectorType, spacedim >::shiftmap_dof_handler [protected]

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


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

deal.II documentation generated on Sat Aug 15 16:52:06 2009 by doxygen 1.5.9