concepts::ElementFormulaVector< dim, F, G, H > Class Template Referenceabstract

Vectorial formula created from a FE function. More...

#include <elementFormula.hh>

Inheritance diagram for concepts::ElementFormulaVector< dim, F, G, H >:
concepts::ElementFormulaVectorBase< Real, typename Realtype< Real >::type, Point< Real, dim >, Real > concepts::ElementFormula< Point< Real, dim >, typename Realtype< Real >::type > concepts::Cloneable concepts::OutputOperator

Public Types

typedef Point< Real, dim > value_type
 

Public Member Functions

virtual ElementFormulaVector< dim, F, G, H > * clone () const
 Virtual constructor. More...
 
virtual ElementFormulaVectorBase< Real, typename Realtype< Real >::type, Point< Real, dim >, Real > * clone () const=0
 Virtual constructor. More...
 
 ElementFormulaVector (const Space< H > &spc, const Vector< F > &v, const ElementFunction< G, H > &f)
 Constructor. More...
 
virtual Point< G, dim > operator() (const ElementWithCell< H > &elm, const Real p, const Real t=0.0) const
 
virtual Point< G, dim > operator() (const ElementWithCell< H > &elm, const Real2d &p, const Real t=0.0) const
 
virtual Point< G, dim > operator() (const ElementWithCell< H > &elm, const Real3d &p, const Real t=0.0) const
 
virtual Point< Real, dim > operator() (const ElementWithCell< typename Realtype< Real >::type > &elm, const Real p, const Real t=0.0) const=0
 Evaluates the formula. More...
 
virtual Point< Real, dim > operator() (const ElementWithCell< typename Realtype< Real >::type > &elm, const Real2d &p, const Real t=0.0) const=0
 Evaluates the formula. More...
 
virtual Point< Real, dim > operator() (const ElementWithCell< typename Realtype< Real >::type > &elm, const Real3d &p, const Real t=0.0) const=0
 Evaluates the formula. More...
 

Protected Member Functions

void compute_ (const Element< typename Realtype< Real >::type > &elm, Array< J > &val, const P &p, const Real t=0.0) const
 Performs the computations. More...
 
virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 

Protected Attributes

Array< Realcoeff_
 
std::unique_ptr< const ElementFunction< Real, typename Realtype< Real >::type > > f_
 Element function. More...
 
const Element< typename Realtype< Real >::type > * lastElm_
 
const Element< typename Realtype< Real >::type > * lastElmOur_
 
const Space< typename Realtype< Real >::type > & spc_
 
const Vector< Realv_
 

Private Member Functions

void getElement_ (const Element< typename Realtype< Real >::type > &elm, const Element< typename Realtype< Real >::type > *&elmOur) const
 Computes elmOur from elm to be in the space of v_. More...
 
uint getKey_ (const Element< typename Realtype< Real >::type > &elm) const
 Returns the key of elm. More...
 

Private Attributes

std::unordered_map< uint, const Element< typename Realtype< Real >::type > * > elementPointer_
 Maps key of the cell to the element in the right space. More...
 

Detailed Description

template<uint dim, class F = Real, class G = F, class H = typename Realtype<F>::type>
class concepts::ElementFormulaVector< dim, F, G, H >

Vectorial formula created from a FE function.

The FE function is described by a vector of coefficients.

Parameters
dimDimension of output vector (e.g. gradient has two components)
Ftype of the coefficients
Gdata type of the element function
Htype of the space, i.e. that of the T matrices
Author
Philipp Frauenfelder, 2004
Examples
inhomDirichletBCs.cc, and parallelizationTutorial.cc.

Definition at line 144 of file elementFormula.hh.

Member Typedef Documentation

◆ value_type

typedef Point< Real, dim > concepts::ElementFormula< Point< Real, dim > , typename Realtype< Real >::type >::value_type
inherited

Definition at line 37 of file elementFormula.hh.

Constructor & Destructor Documentation

◆ ElementFormulaVector()

template<uint dim, class F , class G , class H >
concepts::ElementFormulaVector< dim, F, G, H >::ElementFormulaVector ( const Space< H > &  spc,
const Vector< F > &  v,
const ElementFunction< G, H > &  f 
)

Constructor.

Parameters
vVector of coefficients of the FE function
fFunction to be evaluated on the FE function, eg. hp2D::Value

Definition at line 168 of file elementFormula.hh.

Member Function Documentation

◆ clone() [1/2]

template<uint dim, class F = Real, class G = F, class H = typename Realtype<F>::type>
virtual ElementFormulaVector<dim,F,G,H>* concepts::ElementFormulaVector< dim, F, G, H >::clone ( ) const
inlinevirtual

Virtual constructor.

Returns a pointer to a copy of itself. The caller is responsible to destroy this copy.

Implements concepts::Cloneable.

Definition at line 160 of file elementFormula.hh.

◆ clone() [2/2]

virtual ElementFormulaVectorBase<Real ,typename Realtype< Real >::type ,Point< Real, dim > ,Real >* concepts::ElementFormulaVectorBase< Real , typename Realtype< Real >::type , Point< Real, dim > , Real >::clone
pure virtualinherited

Virtual constructor.

Returns a pointer to a copy of itself. The caller is responsible to destroy this copy.

Implements concepts::ElementFormula< Point< Real, dim >, typename Realtype< Real >::type >.

◆ compute_()

void concepts::ElementFormulaVectorBase< Real , typename Realtype< Real >::type , Point< Real, dim > , Real >::compute_ ( const Element< typename Realtype< Real >::type > &  elm,
Array< J > &  val,
const P &  p,
const Real  t = 0.0 
) const
protectedinherited

Performs the computations.

Definition at line 62 of file elementFormula.hh.

◆ getElement_()

void concepts::ElementFormulaVectorBase< Real , typename Realtype< Real >::type , Point< Real, dim > , Real >::getElement_ ( const Element< typename Realtype< Real >::type > &  elm,
const Element< typename Realtype< Real >::type > *&  elmOur 
) const
privateinherited

Computes elmOur from elm to be in the space of v_.

Definition at line 71 of file elementFormula.hh.

◆ getKey_()

uint concepts::ElementFormulaVectorBase< Real , typename Realtype< Real >::type , Point< Real, dim > , Real >::getKey_ ( const Element< typename Realtype< Real >::type > &  elm) const
privateinherited

Returns the key of elm.

Definition at line 69 of file elementFormula.hh.

◆ info()

template<uint dim, class F , class G , class H >
std::ostream & concepts::ElementFormulaVector< dim, F, G, H >::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::OutputOperator.

Definition at line 217 of file elementFormula.hh.

◆ operator()() [1/6]

template<uint dim, class F , class G , class H >
Point< G, dim > concepts::ElementFormulaVector< dim, F, G, H >::operator() ( const ElementWithCell< H > &  elm,
const Real  p,
const Real  t = 0.0 
) const
virtual

Definition at line 177 of file elementFormula.hh.

◆ operator()() [2/6]

template<uint dim, class F , class G , class H >
Point< G, dim > concepts::ElementFormulaVector< dim, F, G, H >::operator() ( const ElementWithCell< H > &  elm,
const Real2d p,
const Real  t = 0.0 
) const
virtual

Definition at line 190 of file elementFormula.hh.

◆ operator()() [3/6]

template<uint dim, class F , class G , class H >
Point< G, dim > concepts::ElementFormulaVector< dim, F, G, H >::operator() ( const ElementWithCell< H > &  elm,
const Real3d p,
const Real  t = 0.0 
) const
virtual

Definition at line 204 of file elementFormula.hh.

◆ operator()() [4/6]

virtual Point< Real, dim > concepts::ElementFormula< Point< Real, dim > , typename Realtype< Real >::type >::operator() ( const ElementWithCell< typename Realtype< Real >::type > &  elm,
const Real  p,
const Real  t = 0.0 
) const
pure virtualinherited

Evaluates the formula.

Parameters
elmElement
pPoint in space in local element coordinates
tPoint in time

◆ operator()() [5/6]

virtual Point< Real, dim > concepts::ElementFormula< Point< Real, dim > , typename Realtype< Real >::type >::operator() ( const ElementWithCell< typename Realtype< Real >::type > &  elm,
const Real2d p,
const Real  t = 0.0 
) const
pure virtualinherited

Evaluates the formula.

Parameters
elmElement
pPoint in space in local element coordinates
tPoint in time

◆ operator()() [6/6]

virtual Point< Real, dim > concepts::ElementFormula< Point< Real, dim > , typename Realtype< Real >::type >::operator() ( const ElementWithCell< typename Realtype< Real >::type > &  elm,
const Real3d p,
const Real  t = 0.0 
) const
pure virtualinherited

Evaluates the formula.

Parameters
elmElement
pPoint in space in local element coordinates
tPoint in time

Member Data Documentation

◆ coeff_

Array<Real > concepts::ElementFormulaVectorBase< Real , typename Realtype< Real >::type , Point< Real, dim > , Real >::coeff_
mutableprotectedinherited

Definition at line 58 of file elementFormula.hh.

◆ elementPointer_

std::unordered_map<uint, const Element<typename Realtype< Real >::type >*> concepts::ElementFormulaVectorBase< Real , typename Realtype< Real >::type , Point< Real, dim > , Real >::elementPointer_
privateinherited

Maps key of the cell to the element in the right space.

Definition at line 66 of file elementFormula.hh.

◆ f_

std::unique_ptr<const ElementFunction<Real ,typename Realtype< Real >::type > > concepts::ElementFormulaVectorBase< Real , typename Realtype< Real >::type , Point< Real, dim > , Real >::f_
protectedinherited

Element function.

Definition at line 54 of file elementFormula.hh.

◆ lastElm_

const Element<typename Realtype< Real >::type >* concepts::ElementFormulaVectorBase< Real , typename Realtype< Real >::type , Point< Real, dim > , Real >::lastElm_
mutableprotectedinherited

Definition at line 56 of file elementFormula.hh.

◆ lastElmOur_

const Element<typename Realtype< Real >::type > * concepts::ElementFormulaVectorBase< Real , typename Realtype< Real >::type , Point< Real, dim > , Real >::lastElmOur_
protectedinherited

Definition at line 56 of file elementFormula.hh.

◆ spc_

const Space<typename Realtype< Real >::type >& concepts::ElementFormulaVectorBase< Real , typename Realtype< Real >::type , Point< Real, dim > , Real >::spc_
protectedinherited

Definition at line 51 of file elementFormula.hh.

◆ v_

const Vector<Real > concepts::ElementFormulaVectorBase< Real , typename Realtype< Real >::type , Point< Real, dim > , Real >::v_
protectedinherited

Definition at line 52 of file elementFormula.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich