Piecewise constant function defined by the attribute of a cell. More...
#include <formula.hh>


Public Types | |
| typedef concepts::Realtype< F > ::type | G |
| typedef F | value_type |
Public Member Functions | |
| virtual PiecewiseConstFormula < F > * | clone () const |
| Virtual copy constructor. | |
| virtual const F & | dflt_value () const |
| Gives default value. | |
| virtual F & | dflt_value () |
| Gives default value. | |
| virtual F | operator() (const ElementWithCell< concepts::Realtype< F >::type > &elm, const Real2d &p, const Real t=0.0) const =0 |
| virtual F | operator() (const ElementWithCell< concepts::Realtype< F >::type > &elm, const Real3d &p, const Real t=0.0) const =0 |
| virtual F | operator() (const ElementWithCell< concepts::Realtype< F >::type > &elm, const Real p, const Real t=0.0) const =0 |
| Evaluates the formula. | |
| virtual F | operator() (const ElementWithCell< G > &elm, const Real3d &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 Connector &cell, const Real3d &p, const Real t=0.0) const |
| virtual F | operator() (const Connector &cell, const Real p, const Real t=0.0) const |
| Gives the constant in an particular cell. | |
| virtual F | operator() (const ElementWithCell< G > &elm, const Real p, const Real t=0.0) const |
| virtual F | operator() (const Connector &cell, const Real2d &p, const Real t=0.0) const |
| template<class H > | |
| PiecewiseConstFormula< F > & | operator*= (const H &factor) |
| virtual const F & | operator[] (const uint attrib) const |
| virtual F & | operator[] (const uint attrib) |
| Set the constant in an particular cell. | |
| PiecewiseConstFormula (const HashMap< F > formula, const F dflt_value=0) | |
Constructor with given mapping formula and default value dflt_value. | |
| PiecewiseConstFormula (const std::map< int, F > formula, const F dflt_value=0) | |
Constructor with given mapping formula and default value dflt_value. | |
| PiecewiseConstFormula (const F dflt_value=0) | |
Constructor with default value dflt_value. | |
| virtual | ~PiecewiseConstFormula () |
Protected Member Functions | |
| virtual std::ostream & | info (std::ostream &os) const |
| Returns information in an output stream. | |
Protected Attributes | |
| HashMap< F > | formula_ |
| Mapping from the elements on to the constants. | |
Piecewise constant function defined by the attribute of a cell.
This is a proper function for piecewise constant material coefficients, which are most needed in linear and bilinear forms.
Because in linear and bilinear forms are loops over the elements, the appropiate topological cell (connector), respectively the attribute, is known and so it's possible to avoid the searching und to use operator() with attrib as input.
In refined meshes the children of a cell gets the same constant due to the handing down the attributes.
If the constant is asked for an element, which can't be find in the list, the default value set in the constructor, is taken. If the default value is not given, it is created by the constructor of the type F, this is mostly 0.
Definition at line 82 of file formula.hh.
typedef concepts::Realtype<F>::type concepts::PiecewiseFormulaBase< F >::G [inherited] |
Reimplemented in concepts::Formula< F >, concepts::Formula< concepts::Point< Cmplx, 2 > >, concepts::Formula< Point< F, dim > >, concepts::Formula< Cmplx >, concepts::Formula< Real >, and concepts::Formula< Real2d >.
Definition at line 40 of file piecewiseFormula.hh.
typedef F concepts::ElementFormula< F, concepts::Realtype< F >::type >::value_type [inherited] |
Reimplemented in concepts::Formula< F >.
Definition at line 31 of file elementFormula.hh.
| concepts::PiecewiseConstFormula< F >::PiecewiseConstFormula | ( | const F | dflt_value = 0 | ) |
Constructor with default value dflt_value.
| concepts::PiecewiseConstFormula< F >::PiecewiseConstFormula | ( | const HashMap< F > | formula, |
| const F | dflt_value = 0 |
||
| ) |
Constructor with given mapping formula and default value dflt_value.
| concepts::PiecewiseConstFormula< F >::PiecewiseConstFormula | ( | const std::map< int, F > | formula, |
| const F | dflt_value = 0 |
||
| ) |
Constructor with given mapping formula and default value dflt_value.
| virtual concepts::PiecewiseConstFormula< F >::~PiecewiseConstFormula | ( | ) | [virtual] |
| virtual PiecewiseConstFormula<F>* concepts::PiecewiseConstFormula< F >::clone | ( | ) | const [virtual] |
Virtual copy constructor.
Implements concepts::PiecewiseFormulaBase< F >.
| virtual F& concepts::PiecewiseFormulaBase< F >::dflt_value | ( | ) | [inline, virtual, inherited] |
Gives default value.
Definition at line 78 of file piecewiseFormula.hh.
| virtual const F& concepts::PiecewiseFormulaBase< F >::dflt_value | ( | ) | const [inline, virtual, inherited] |
Gives default value.
Definition at line 76 of file piecewiseFormula.hh.
| virtual std::ostream& concepts::PiecewiseConstFormula< F >::info | ( | std::ostream & | os | ) | const [protected, virtual] |
Returns information in an output stream.
Reimplemented from concepts::PiecewiseFormulaBase< F >.
| virtual F concepts::ElementFormula< F, concepts::Realtype< F >::type >::operator() | ( | const ElementWithCell< concepts::Realtype< F >::type > & | elm, |
| const Real2d & | p, | ||
| const Real | t = 0.0 |
||
| ) | const [pure virtual, inherited] |
| virtual F concepts::PiecewiseConstFormula< F >::operator() | ( | const Connector & | cell, |
| const Real3d & | p, | ||
| const Real | t = 0.0 |
||
| ) | const [inline, virtual] |
Implements concepts::PiecewiseFormulaBase< F >.
Definition at line 115 of file formula.hh.
| virtual F concepts::PiecewiseFormulaBase< F >::operator() | ( | const ElementWithCell< G > & | elm, |
| const Real3d & | p, | ||
| const Real | t = 0.0 |
||
| ) | const [inline, virtual, inherited] |
Definition at line 58 of file piecewiseFormula.hh.
| virtual F concepts::PiecewiseConstFormula< F >::operator() | ( | const Connector & | cell, |
| const Real | p, | ||
| const Real | t = 0.0 |
||
| ) | const [inline, virtual] |
Gives the constant in an particular cell.
Implements concepts::PiecewiseFormulaBase< F >.
Definition at line 98 of file formula.hh.
| virtual F concepts::PiecewiseFormulaBase< F >::operator() | ( | const ElementWithCell< G > & | elm, |
| const Real | p, | ||
| const Real | t = 0.0 |
||
| ) | const [inline, virtual, inherited] |
Definition at line 47 of file piecewiseFormula.hh.
| virtual F concepts::PiecewiseFormulaBase< F >::operator() | ( | const ElementWithCell< G > & | elm, |
| const Real2d & | p, | ||
| const Real | t = 0.0 |
||
| ) | const [inline, virtual, inherited] |
Definition at line 52 of file piecewiseFormula.hh.
| virtual F concepts::PiecewiseConstFormula< F >::operator() | ( | const Connector & | cell, |
| const Real2d & | p, | ||
| const Real | t = 0.0 |
||
| ) | const [inline, virtual] |
Implements concepts::PiecewiseFormulaBase< F >.
Definition at line 102 of file formula.hh.
| virtual F concepts::ElementFormula< F, concepts::Realtype< F >::type >::operator() | ( | const ElementWithCell< concepts::Realtype< F >::type > & | elm, |
| const Real | p, | ||
| const Real | t = 0.0 |
||
| ) | const [pure virtual, inherited] |
Evaluates the formula.
| elm | Element |
| p | Point in space in local element coordinates |
| t | Point in time |
| virtual F concepts::ElementFormula< F, concepts::Realtype< F >::type >::operator() | ( | const ElementWithCell< concepts::Realtype< F >::type > & | elm, |
| const Real3d & | p, | ||
| const Real | t = 0.0 |
||
| ) | const [pure virtual, inherited] |
| PiecewiseConstFormula< F > & concepts::PiecewiseConstFormula< F >::operator*= | ( | const H & | factor | ) |
Definition at line 137 of file formula.hh.
| virtual F& concepts::PiecewiseConstFormula< F >::operator[] | ( | const uint | attrib | ) | [virtual] |
| virtual const F& concepts::PiecewiseConstFormula< F >::operator[] | ( | const uint | attrib | ) | const [virtual] |
HashMap<F> concepts::PiecewiseConstFormula< F >::formula_ [protected] |
Mapping from the elements on to the constants.
Definition at line 131 of file formula.hh.