concepts::PiecewiseFormula< F > Class Template Referenceabstract

Piecewise defined function defined by attributes. More...

#include <formula.hh>

Inheritance diagram for concepts::PiecewiseFormula< F >:
concepts::PiecewiseFormulaBase< F > concepts::ElementFormula< F, concepts::Realtype< F >::type > concepts::Cloneable concepts::OutputOperator

Classes

class  FormulaFactor
 

Public Types

typedef concepts::Realtype< F >::type G
 
typedef F value_type
 

Public Member Functions

virtual PiecewiseFormula< F > * clone () const
 Virtual constructor. More...
 
virtual ElementFormula< F, concepts::Realtype< F >::type > * clone () const=0
 Virtual copy constructor. More...
 
virtual F & dflt_value ()
 Gives default value. More...
 
virtual const F & dflt_value () const
 Gives default value. More...
 
template<class H >
void multiply (const H &factor)
 Multiplies all values with this factor. More...
 
template<class H >
void multiply (const uint attrib, const H &factor)
 Multiply the formula with attribute attrib with this factor. More...
 
virtual F operator() (const Connector &cell, const Real p, const Real t=0.0) const
 Gives the value in an particular cell. More...
 
virtual F operator() (const Connector &cell, const Real2d &p, const Real t=0.0) const
 
virtual F operator() (const Connector &cell, const Real3d &p, const Real t=0.0) const
 
virtual F operator() (const ElementWithCell< concepts::Realtype< F >::type > &elm, const Real p, const Real t=0.0) const=0
 Evaluates the formula. More...
 
virtual F operator() (const ElementWithCell< concepts::Realtype< F >::type > &elm, const Real2d &p, const Real t=0.0) const=0
 Evaluates the formula. More...
 
virtual F operator() (const ElementWithCell< concepts::Realtype< F >::type > &elm, const Real3d &p, const Real t=0.0) const=0
 Evaluates the formula. More...
 
virtual F operator() (const ElementWithCell< G > &elm, const Real p, const Real t=0.0) const
 
virtual F operator() (const ElementWithCell< G > &elm, const Real2d &p, const Real t=0.0) const
 
virtual F operator() (const ElementWithCell< G > &elm, const Real3d &p, const Real t=0.0) const
 
 PiecewiseFormula (const F dflt_value=0)
 
void set (const uint attrib, const F a)
 
void set (const uint attrib, const Formula< F > &formula)
 Set the constant in an particular cell. More...
 
virtual ~PiecewiseFormula ()
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 

Protected Attributes

HashMap< FormulaFactorformula_
 Mapping from the elements on to the formula. More...
 

Private Attributes

dflt_value_
 default value More...
 

Detailed Description

template<typename F>
class concepts::PiecewiseFormula< F >

Piecewise defined function defined by attributes.

For an attribute and so an area a formula is given.

Author
Kersten Schmidt, 2005
Note
: a current limitation is that you cannot specify a formula for the attribute 0, it will be ignored.

Definition at line 218 of file formula.hh.

Member Typedef Documentation

◆ G

template<typename F >
typedef concepts::Realtype<F>::type concepts::PiecewiseFormulaBase< F >::G
inherited

Definition at line 45 of file piecewiseFormula.hh.

◆ value_type

typedef F concepts::ElementFormula< F, concepts::Realtype< F >::type >::value_type
inherited

Definition at line 37 of file elementFormula.hh.

Constructor & Destructor Documentation

◆ PiecewiseFormula()

template<typename F >
concepts::PiecewiseFormula< F >::PiecewiseFormula ( const F  dflt_value = 0)

◆ ~PiecewiseFormula()

template<typename F >
virtual concepts::PiecewiseFormula< F >::~PiecewiseFormula ( )
virtual

Member Function Documentation

◆ clone() [1/2]

template<typename F >
virtual PiecewiseFormula<F>* concepts::PiecewiseFormula< F >::clone ( ) const
virtual

Virtual constructor.

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

Implements concepts::PiecewiseFormulaBase< F >.

◆ clone() [2/2]

virtual ElementFormula<F,concepts::Realtype< F >::type >* concepts::ElementFormula< F, concepts::Realtype< F >::type >::clone ( ) const
pure virtualinherited

Virtual copy constructor.

◆ dflt_value() [1/2]

template<typename F >
virtual F& concepts::PiecewiseFormulaBase< F >::dflt_value ( )
inlinevirtualinherited

Gives default value.

Definition at line 83 of file piecewiseFormula.hh.

◆ dflt_value() [2/2]

template<typename F >
virtual const F& concepts::PiecewiseFormulaBase< F >::dflt_value ( ) const
inlinevirtualinherited

Gives default value.

Definition at line 81 of file piecewiseFormula.hh.

◆ info()

template<typename F >
virtual std::ostream& concepts::PiecewiseFormula< F >::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::PiecewiseFormulaBase< F >.

◆ multiply() [1/2]

template<typename F >
template<class H >
void concepts::PiecewiseFormula< F >::multiply ( const H &  factor)

Multiplies all values with this factor.

Definition at line 263 of file formula.hh.

◆ multiply() [2/2]

template<typename F >
template<class H >
void concepts::PiecewiseFormula< F >::multiply ( const uint  attrib,
const H &  factor 
)

Multiply the formula with attribute attrib with this factor.

Definition at line 271 of file formula.hh.

◆ operator()() [1/9]

template<typename F >
virtual F concepts::PiecewiseFormula< F >::operator() ( const Connector cell,
const Real  p,
const Real  t = 0.0 
) const
virtual

Gives the value in an particular cell.

Implements concepts::PiecewiseFormulaBase< F >.

◆ operator()() [2/9]

template<typename F >
virtual F concepts::PiecewiseFormula< F >::operator() ( const Connector cell,
const Real2d p,
const Real  t = 0.0 
) const
virtual

◆ operator()() [3/9]

template<typename F >
virtual F concepts::PiecewiseFormula< F >::operator() ( const Connector cell,
const Real3d p,
const Real  t = 0.0 
) const
virtual

◆ operator()() [4/9]

virtual F concepts::ElementFormula< F, concepts::Realtype< F >::type >::operator() ( const ElementWithCell< G > &  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/9]

virtual F concepts::ElementFormula< F, concepts::Realtype< F >::type >::operator() ( const ElementWithCell< G > &  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/9]

virtual F concepts::ElementFormula< F, concepts::Realtype< F >::type >::operator() ( const ElementWithCell< G > &  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

◆ operator()() [7/9]

template<typename F >
virtual F concepts::PiecewiseFormulaBase< F >::operator() ( const ElementWithCell< G > &  elm,
const Real  p,
const Real  t = 0.0 
) const
inlinevirtualinherited

Definition at line 52 of file piecewiseFormula.hh.

◆ operator()() [8/9]

template<typename F >
virtual F concepts::PiecewiseFormulaBase< F >::operator() ( const ElementWithCell< G > &  elm,
const Real2d p,
const Real  t = 0.0 
) const
inlinevirtualinherited

Definition at line 57 of file piecewiseFormula.hh.

◆ operator()() [9/9]

template<typename F >
virtual F concepts::PiecewiseFormulaBase< F >::operator() ( const ElementWithCell< G > &  elm,
const Real3d p,
const Real  t = 0.0 
) const
inlinevirtualinherited

Definition at line 63 of file piecewiseFormula.hh.

◆ set() [1/2]

template<typename F >
void concepts::PiecewiseFormula< F >::set ( const uint  attrib,
const F  a 
)

◆ set() [2/2]

template<typename F >
void concepts::PiecewiseFormula< F >::set ( const uint  attrib,
const Formula< F > &  formula 
)

Set the constant in an particular cell.

Parameters
cellCell the value is to set
valueValue
recursiveIf flag is set all children get the same value.

Member Data Documentation

◆ dflt_value_

template<typename F >
F concepts::PiecewiseFormulaBase< F >::dflt_value_
privateinherited

default value

Definition at line 88 of file piecewiseFormula.hh.

◆ formula_

template<typename F >
HashMap<FormulaFactor> concepts::PiecewiseFormula< F >::formula_
protected

Mapping from the elements on to the formula.

Definition at line 258 of file formula.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