Reference documentation for deal.II version Git 7baca85e57 2019-08-23 17:29:05 -0400
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Classes | Enumerations | Functions | Variables
Mappings between reference and real cell
Collaboration diagram for Mappings between reference and real cell:

Classes

class  Mapping< dim, spacedim >
 Abstract base class for mapping classes. More...
 
class  MappingC1< dim, spacedim >
 
class  MappingCartesian< dim, spacedim >
 
class  MappingFEField< dim, spacedim, VectorType, DoFHandlerType >
 
class  MappingManifold< dim, spacedim >
 
class  MappingQ< dim, spacedim >
 
class  MappingQ1< dim, spacedim >
 
struct  StaticMappingQ1< dim, spacedim >
 
class  MappingQ1Eulerian< dim, VectorType, spacedim >
 
class  MappingQCache< dim, spacedim >
 
class  MappingQEulerian< dim, VectorType, spacedim >
 
class  MappingQGeneric< dim, spacedim >
 

Enumerations

enum  MappingKind {
  mapping_none = 0x0000, mapping_covariant = 0x0001, mapping_contravariant = 0x0002, mapping_covariant_gradient = 0x0003,
  mapping_contravariant_gradient = 0x0004, mapping_piola = 0x0100, mapping_piola_gradient = 0x0101, mapping_nedelec = 0x0200,
  mapping_raviart_thomas = 0x0300, mapping_bdm = mapping_raviart_thomas, mapping_covariant_hessian, mapping_contravariant_hessian,
  mapping_piola_hessian
}
 

Functions

 MappingQCache< dim, spacedim >::MappingQCache (const unsigned int polynomial_degree)
 
 MappingQCache< dim, spacedim >::MappingQCache (const MappingQCache< dim, spacedim > &mapping)
 
 MappingQCache< dim, spacedim >::~MappingQCache ()
 
virtual std::unique_ptr< Mapping< dim, spacedim > > MappingQCache< dim, spacedim >::clone () const override
 
virtual bool MappingQCache< dim, spacedim >::preserves_vertex_locations () const override
 
void MappingQCache< dim, spacedim >::initialize (const Triangulation< dim, spacedim > &triangulation, const MappingQGeneric< dim, spacedim > &mapping)
 
std::size_t MappingQCache< dim, spacedim >::memory_consumption () const
 
virtual std::vector< Point< spacedim > > MappingQCache< dim, spacedim >::compute_mapping_support_points (const typename Triangulation< dim, spacedim >::cell_iterator &cell) const override
 

Variables

std::shared_ptr< std::vector< std::vector< std::vector< Point< spacedim > > > > > MappingQCache< dim, spacedim >::support_point_cache
 
boost::signals2::connection MappingQCache< dim, spacedim >::clear_signal
 

Detailed Description

The classes in this module are used to map from unit coordinates to the coordinates of a cell in real cell. Most commonly, one uses the MappingQ1 class that provides a Q1 (bi-/trilinear) mapping (i.e. a mapping that is isoparametric for the usual Q1 elements). However, there are other classes that implement higher-order mappings as well to provide for curvilinear elements. These are discussed in the step-11 and step-12 tutorial programs.

The MappingQ1Eulerian class is an extension to the MappingQ1 class in that it accepts a vector that describes a displacement field for each position of the domain. This is used in Eulerian computations without the need to actually move vertices after each time step.

In addition, the MappingC1 class provides for a boundary of the computational domain that is not only curved, but also has a continuous derivative at the interface between two cells on the boundary.

Finally, the MappingCartesian class is an optimization for elements that are brick-shaped and with edges parallel to the coordinate axes.

Enumeration Type Documentation

◆ MappingKind

The transformation kind used for the Mapping::transform() functions.

Special finite elements may need special Mapping from the reference cell to the actual mesh cell. In order to be most flexible, this enum provides an extensible interface for arbitrary transformations. Nevertheless, these must be implemented in the transform() functions of inheriting classes in order to work.

Enumerator
mapping_none 

No mapping, i.e., shape functions are not mapped from a reference cell but instead are defined right on the real-space cell.

mapping_covariant 

Covariant mapping (see Mapping::transform() for details).

mapping_contravariant 

Contravariant mapping (see Mapping::transform() for details).

mapping_covariant_gradient 

Mapping of the gradient of a covariant vector field (see Mapping::transform() for details).

mapping_contravariant_gradient 

Mapping of the gradient of a contravariant vector field (see Mapping::transform() for details).

mapping_piola 

The Piola transform usually used for Hdiv elements. Piola transform is the standard transformation of vector valued elements in Hdiv. It amounts to a contravariant transformation scaled by the inverse of the volume element.

mapping_piola_gradient 

Transformation for the gradient of a vector field corresponding to a mapping_piola transformation (see Mapping::transform() for details).

mapping_nedelec 

The mapping used for Nedelec elements.

Curl-conforming elements are mapped as covariant vectors. Nevertheless, we introduce a separate mapping kind, such that we can use the same flag for the vector and its gradient (see Mapping::transform() for details).

mapping_raviart_thomas 

The mapping used for Raviart-Thomas elements.

mapping_bdm 

The mapping used for BDM elements.

mapping_covariant_hessian 

The mappings for 2-forms and third order tensors.

These are mappings typpically applied to hessians transformed to the reference cell.

Mapping of the hessian of a covariant vector field (see Mapping::transform() for details).

mapping_contravariant_hessian 

Mapping of the hessian of a contravariant vector field (see Mapping::transform() for details).

mapping_piola_hessian 

Mapping of the hessian of a piola vector field (see Mapping::transform() for details).

Definition at line 61 of file mapping.h.

Function Documentation

◆ MappingQCache() [1/2]

template<int dim, int spacedim>
MappingQCache< dim, spacedim >::MappingQCache ( const unsigned int  polynomial_degree)
explicit

Constructor. polynomial_degree denotes the polynomial degree of the polynomials that are used to map cells from the reference to the real cell.

Definition at line 26 of file mapping_q_cache.cc.

◆ MappingQCache() [2/2]

template<int dim, int spacedim>
MappingQCache< dim, spacedim >::MappingQCache ( const MappingQCache< dim, spacedim > &  mapping)
explicit

Copy constructor.

Definition at line 34 of file mapping_q_cache.cc.

◆ ~MappingQCache()

template<int dim, int spacedim>
MappingQCache< dim, spacedim >::~MappingQCache ( )

Destructor.

Definition at line 43 of file mapping_q_cache.cc.

◆ clone()

template<int dim, int spacedim>
std::unique_ptr< Mapping< dim, spacedim > > MappingQCache< dim, spacedim >::clone ( ) const
overridevirtual

clone() functionality. For documentation, see Mapping::clone().

Reimplemented from MappingQGeneric< dim, spacedim >.

Definition at line 57 of file mapping_q_cache.cc.

◆ preserves_vertex_locations()

template<int dim, int spacedim>
bool MappingQCache< dim, spacedim >::preserves_vertex_locations ( ) const
overridevirtual

Returns false because the preservation of vertex locations depends on the mapping handed to the reinit() function.

Reimplemented from MappingQGeneric< dim, spacedim >.

Definition at line 66 of file mapping_q_cache.cc.

◆ initialize()

template<int dim, int spacedim>
void MappingQCache< dim, spacedim >::initialize ( const Triangulation< dim, spacedim > &  triangulation,
const MappingQGeneric< dim, spacedim > &  mapping 
)

Initialize the data cache by computing the mapping support points for all cells (on all levels) of the given triangulation. Note that the cache is invalidated upon the signal Triangulation::Signals::any_change of the underlying triangulation.

Definition at line 75 of file mapping_q_cache.cc.

◆ memory_consumption()

template<int dim, int spacedim>
std::size_t MappingQCache< dim, spacedim >::memory_consumption ( ) const

Return the memory consumption (in bytes) of the cache.

Definition at line 110 of file mapping_q_cache.cc.

◆ compute_mapping_support_points()

template<int dim, int spacedim>
std::vector< Point< spacedim > > MappingQCache< dim, spacedim >::compute_mapping_support_points ( const typename Triangulation< dim, spacedim >::cell_iterator &  cell) const
overrideprotectedvirtual

This is the main function overriden from the base class MappingQGeneric.

Reimplemented from MappingQGeneric< dim, spacedim >.

Definition at line 123 of file mapping_q_cache.cc.

Variable Documentation

◆ support_point_cache

template<int dim, int spacedim = dim>
std::shared_ptr<std::vector<std::vector<std::vector<Point<spacedim> > > > > MappingQCache< dim, spacedim >::support_point_cache
private

The point cache filled upon calling initialize(). It is made a shared pointer to allow several instances (created via clone()) to share this cache.

Definition at line 111 of file mapping_q_cache.h.

◆ clear_signal

template<int dim, int spacedim = dim>
boost::signals2::connection MappingQCache< dim, spacedim >::clear_signal
private

The connection to Triangulation::signals::any that must be reset once this class goes out of scope.

Definition at line 117 of file mapping_q_cache.h.