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

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

#include <elementFormula.hh>

Inheritance diagram for concepts::ElementFormulaVector< 1, F, G, H >:
concepts::ElementFormulaVectorBase< F, H, G, G > concepts::ElementFormula< G, H > concepts::Cloneable concepts::OutputOperator

Public Types

typedef G value_type
 

Public Member Functions

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

Protected Member Functions

void compute_ (const Element< H > &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< F > coeff_
 
std::unique_ptr< const ElementFunction< G, H > > f_
 Element function. More...
 
const Element< H > * lastElm_
 
const Element< H > * lastElmOur_
 
const Space< H > & spc_
 
const Vector< F > v_
 

Private Member Functions

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

Private Attributes

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

Detailed Description

template<class F, class G, class H>
class concepts::ElementFormulaVector< 1, F, G, H >

Scalar formula created from a FE function.

The FE function is described by a vector of coefficients.

Author
Philipp Frauenfelder, 2004

Definition at line 230 of file elementFormula.hh.

Member Typedef Documentation

◆ value_type

typedef G concepts::ElementFormula< G , H >::value_type
inherited

Definition at line 37 of file elementFormula.hh.

Constructor & Destructor Documentation

◆ ElementFormulaVector()

template<class F , class G , class H >
concepts::ElementFormulaVector< 1, 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 255 of file elementFormula.hh.

Member Function Documentation

◆ clone() [1/2]

template<class F , class G , class H >
virtual ElementFormulaVector<1,F,G,H>* concepts::ElementFormulaVector< 1, 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 247 of file elementFormula.hh.

◆ clone() [2/2]

virtual ElementFormulaVectorBase<F,H ,G ,G >* concepts::ElementFormulaVectorBase< F, H , G , G >::clone
pure virtualinherited

Virtual constructor.

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

Implements concepts::ElementFormula< G, H >.

◆ compute_()

void concepts::ElementFormulaVectorBase< F, H , G , G >::compute_ ( const Element< H > &  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< F, H , G , G >::getElement_ ( const Element< H > &  elm,
const Element< H > *&  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< F, H , G , G >::getKey_ ( const Element< H > &  elm) const
privateinherited

Returns the key of elm.

Definition at line 69 of file elementFormula.hh.

◆ info()

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

Returns information in an output stream.

Reimplemented from concepts::OutputOperator.

Definition at line 288 of file elementFormula.hh.

◆ operator()() [1/3]

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

Evaluates the formula.

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

Implements concepts::ElementFormula< G, H >.

Definition at line 263 of file elementFormula.hh.

◆ operator()() [2/3]

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

Evaluates the formula.

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

Implements concepts::ElementFormula< G, H >.

Definition at line 271 of file elementFormula.hh.

◆ operator()() [3/3]

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

Evaluates the formula.

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

Implements concepts::ElementFormula< G, H >.

Definition at line 280 of file elementFormula.hh.

Member Data Documentation

◆ coeff_

Array<F> concepts::ElementFormulaVectorBase< F, H , G , G >::coeff_
mutableprotectedinherited

Definition at line 58 of file elementFormula.hh.

◆ elementPointer_

std::unordered_map<uint, const Element<H >*> concepts::ElementFormulaVectorBase< F, H , G , G >::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<G ,H > > concepts::ElementFormulaVectorBase< F, H , G , G >::f_
protectedinherited

Element function.

Definition at line 54 of file elementFormula.hh.

◆ lastElm_

const Element<H >* concepts::ElementFormulaVectorBase< F, H , G , G >::lastElm_
mutableprotectedinherited

Definition at line 56 of file elementFormula.hh.

◆ lastElmOur_

const Element<H > * concepts::ElementFormulaVectorBase< F, H , G , G >::lastElmOur_
protectedinherited

Definition at line 56 of file elementFormula.hh.

◆ spc_

const Space<H >& concepts::ElementFormulaVectorBase< F, H , G , G >::spc_
protectedinherited

Definition at line 51 of file elementFormula.hh.

◆ v_

const Vector<F> concepts::ElementFormulaVectorBase< F, H , G , G >::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