Flow123d  release_3.0.0-1193-g9220a69
Public Types | Public Member Functions | Private Attributes | List of all members
MappingP1< dim, spacedim > Class Template Reference

Affine mapping between reference and actual cell. More...

#include <mapping_p1.hh>

Inheritance diagram for MappingP1< dim, spacedim >:
Inheritance graph
[legend]
Collaboration diagram for MappingP1< dim, spacedim >:
Collaboration graph
[legend]

Public Types

typedef arma::vec::fixed< dim+1 > BaryPoint
 
typedef arma::vec::fixed< spacedim > RealPoint
 
typedef arma::mat::fixed< spacedim, dim+1 > ElementMap
 

Public Member Functions

 MappingP1 ()
 Constructor. More...
 
MappingInternalDatainitialize (const Quadrature &q, UpdateFlags flags)
 Initializes the structures and computes static data. More...
 
UpdateFlags update_each (UpdateFlags flags)
 Determines which additional quantities have to be computed. More...
 
void fill_fe_values (const ElementAccessor< 3 > &cell, const Quadrature &q, MappingInternalData &data, FEValuesData< dim, spacedim > &fv_data)
 Calculates the mapping data on the actual cell. More...
 
void fill_fe_side_values (const ElementAccessor< 3 > &cell, unsigned int sid, const Quadrature &q, MappingInternalData &data, FEValuesData< dim, spacedim > &fv_data)
 Calculates the mapping data on a side of a cell. More...
 
ElementMap element_map (ElementAccessor< 3 > elm) const
 
BaryPoint project_real_to_unit (const RealPoint &point, const ElementMap &map) const
 
RealPoint project_unit_to_real (const BaryPoint &point, const ElementMap &map) const
 
BaryPoint clip_to_element (BaryPoint &barycentric)
 
bool contains_point (arma::vec point, ElementAccessor< 3 > elm)
 Test if element contains given point. More...
 
- Public Member Functions inherited from Mapping< dim, spacedim >
virtual ~Mapping ()
 Destructor. More...
 

Private Attributes

arma::mat::fixed< dim+1, dim > grad
 Auxiliary matrix of gradients of shape functions (used for computation of the Jacobian). More...
 

Detailed Description

template<unsigned int dim, unsigned int spacedim>
class MappingP1< dim, spacedim >

Affine mapping between reference and actual cell.

Class MappingP1 implements the affine transformation of the reference cell onto the actual cell.

Parameters
dimDimension of the cells.
spacedimDimension of the Euclidean space.

Definition at line 65 of file mapping_p1.hh.

Member Typedef Documentation

template<unsigned int dim, unsigned int spacedim>
typedef arma::vec::fixed<dim+1> MappingP1< dim, spacedim >::BaryPoint

Definition at line 69 of file mapping_p1.hh.

template<unsigned int dim, unsigned int spacedim>
typedef arma::mat::fixed<spacedim, dim+1> MappingP1< dim, spacedim >::ElementMap

Definition at line 71 of file mapping_p1.hh.

template<unsigned int dim, unsigned int spacedim>
typedef arma::vec::fixed<spacedim> MappingP1< dim, spacedim >::RealPoint

Definition at line 70 of file mapping_p1.hh.

Constructor & Destructor Documentation

template<unsigned int dim, unsigned int spacedim>
MappingP1< dim, spacedim >::MappingP1 ( )

Constructor.

Definition at line 31 of file mapping_p1.cc.

Member Function Documentation

template<unsigned int dim, unsigned int spacedim>
auto MappingP1< dim, spacedim >::clip_to_element ( BaryPoint barycentric)

Clip a point given by barycentric cocordinates to the element. If the point is out of the element the closest point projection to the element surface is used.

Definition at line 300 of file mapping_p1.cc.

Here is the caller graph for this function:

template<unsigned int dim, unsigned int spacedim>
bool MappingP1< dim, spacedim >::contains_point ( arma::vec  point,
ElementAccessor< 3 >  elm 
)

Test if element contains given point.

Definition at line 305 of file mapping_p1.cc.

Here is the caller graph for this function:

template<unsigned int dim, unsigned int spacedim>
auto MappingP1< dim, spacedim >::element_map ( ElementAccessor< 3 >  elm) const

Map from reference element (barycentric coords) to global coord system. Matrix(3, dim+1) M: x_real = M * x_bary; M columns are real coordinates of nodes.

Definition at line 268 of file mapping_p1.cc.

Here is the caller graph for this function:

template<unsigned int dim, unsigned int spacedim>
void MappingP1< dim, spacedim >::fill_fe_side_values ( const ElementAccessor< 3 > &  cell,
unsigned int  sid,
const Quadrature q,
MappingInternalData data,
FEValuesData< dim, spacedim > &  fv_data 
)
virtual

Calculates the mapping data on a side of a cell.

Parameters
cellThe actual cell.
sidNumber of the side.
qThe quadrature rule with points on the side.
dataPrecomputed mapping data.
fv_dataData to be computed.

Implements Mapping< dim, spacedim >.

Definition at line 164 of file mapping_p1.cc.

template<unsigned int dim, unsigned int spacedim>
void MappingP1< dim, spacedim >::fill_fe_values ( const ElementAccessor< 3 > &  cell,
const Quadrature q,
MappingInternalData data,
FEValuesData< dim, spacedim > &  fv_data 
)
virtual

Calculates the mapping data on the actual cell.

Parameters
cellThe actual cell.
qQuadrature rule.
dataPrecomputed mapping data.
fv_dataData to be computed.

Implements Mapping< dim, spacedim >.

Definition at line 90 of file mapping_p1.cc.

template<unsigned int dim, unsigned int spacedim>
MappingInternalData * MappingP1< dim, spacedim >::initialize ( const Quadrature q,
UpdateFlags  flags 
)
virtual

Initializes the structures and computes static data.

Parameters
qQuadrature rule.
flagsUpdate flags.
Returns
The computed mapping data.

Implements Mapping< dim, spacedim >.

Definition at line 36 of file mapping_p1.cc.

template<unsigned int dim, unsigned int spacedim>
auto MappingP1< dim, spacedim >::project_real_to_unit ( const RealPoint point,
const ElementMap map 
) const

Project given point in real coordinates to reference element (barycentic coordinates). Result vector have dimension dim()+1. Use RefElement<dim>::bary_to_local() to get local coordinates.

Definition at line 278 of file mapping_p1.cc.

Here is the caller graph for this function:

template<unsigned int dim, unsigned int spacedim>
auto MappingP1< dim, spacedim >::project_unit_to_real ( const BaryPoint point,
const ElementMap map 
) const

Project given point from reference element (barycentic coordinates) to real coordinates. Use RefElement<dim>::local_to_bary() to get barycentric coordinates in input.

Definition at line 294 of file mapping_p1.cc.

Here is the caller graph for this function:

template<unsigned int dim, unsigned int spacedim>
UpdateFlags MappingP1< dim, spacedim >::update_each ( UpdateFlags  flags)
virtual

Determines which additional quantities have to be computed.

Parameters
flagsUpdate flags for required quantities.
Returns
All necessary flags.

Implements Mapping< dim, spacedim >.

Definition at line 73 of file mapping_p1.cc.

Member Data Documentation

template<unsigned int dim, unsigned int spacedim>
arma::mat::fixed<dim+1,dim> MappingP1< dim, spacedim >::grad
private

Auxiliary matrix of gradients of shape functions (used for computation of the Jacobian).

Definition at line 160 of file mapping_p1.hh.


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