Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
concepts::PiecewiseConstImportFormula< F > Class Template Reference

Piecewise constant function defined by attributes, imported from a file. More...

#include <formula.hh>

Inheritance diagram for concepts::PiecewiseConstImportFormula< F >:
Inheritance graph
[legend]
Collaboration diagram for concepts::PiecewiseConstImportFormula< F >:
Collaboration graph
[legend]

List of all members.

Public Types

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

Public Member Functions

virtual PiecewiseConstFormula
< F > * 
clone () const
 Virtual copy constructor.
virtual F & dflt_value ()
 Gives default value.
virtual const F & dflt_value () const
 Gives default value.
virtual F operator() (const Connector &cell, 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
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< concepts::Realtype< F >::type > &elm, const Real3d &p, const Real t=0.0) const =0
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 Real2d &p, const Real t=0.0) const =0
virtual F operator() (const ElementWithCell< G > &elm, const Real2d &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
template<class H >
PiecewiseConstFormula< F > & operator*= (const H &factor)
virtual F & operator[] (const uint attrib)
 Set the constant in an particular cell.
virtual const F & operator[] (const uint attrib) const
 PiecewiseConstImportFormula (const std::string material, const uint idxStart=1, const F dflt_value=0)

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.

Private Member Functions

void read_ (std::istringstream &iss)
 reads a line, needs special implementation for different types F

Detailed Description

template<typename F = Real>
class concepts::PiecewiseConstImportFormula< F >

Piecewise constant function defined by attributes, imported from a file.

Format is

      1 3 1.4
      2 4 1.5
      3 5 1.6 

, where in the first column is the consecutive numbering, in the second the attribute, and in the following the contribution to the constants.

Format for the constants:

bool:   0 = false, else true
           Real:   1.4 or 1.4e7
           Cmplx:  (1.0,0.0)
Author:
Kersten Schmidt, 2004

Definition at line 164 of file formula.hh.


Member Typedef Documentation

template<typename F>
typedef concepts::Realtype<F>::type concepts::PiecewiseFormulaBase< F >::G [inherited]
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.


Constructor & Destructor Documentation

template<typename F = Real>
concepts::PiecewiseConstImportFormula< F >::PiecewiseConstImportFormula ( const std::string  material,
const uint  idxStart = 1,
const F  dflt_value = 0 
)

Member Function Documentation

template<typename F = Real>
virtual PiecewiseConstFormula<F>* concepts::PiecewiseConstFormula< F >::clone ( ) const [virtual, inherited]

Virtual copy constructor.

Implements concepts::PiecewiseFormulaBase< F >.

template<typename F>
virtual const F& concepts::PiecewiseFormulaBase< F >::dflt_value ( ) const [inline, virtual, inherited]

Gives default value.

Definition at line 76 of file piecewiseFormula.hh.

template<typename F>
virtual F& concepts::PiecewiseFormulaBase< F >::dflt_value ( ) [inline, virtual, inherited]

Gives default value.

Definition at line 78 of file piecewiseFormula.hh.

template<typename F = Real>
virtual std::ostream& concepts::PiecewiseConstFormula< F >::info ( std::ostream &  os) const [protected, virtual, inherited]

Returns information in an output stream.

Reimplemented from concepts::PiecewiseFormulaBase< F >.

template<typename F>
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.

template<typename F = Real>
virtual F concepts::PiecewiseConstFormula< F >::operator() ( const Connector cell,
const Real2d p,
const Real  t = 0.0 
) const [inline, virtual, inherited]

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.

Parameters:
elmElement
pPoint in space in local element coordinates
tPoint 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]
template<typename F = Real>
virtual F concepts::PiecewiseConstFormula< F >::operator() ( const Connector cell,
const Real3d p,
const Real  t = 0.0 
) const [inline, virtual, inherited]

Implements concepts::PiecewiseFormulaBase< F >.

Definition at line 115 of file formula.hh.

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]
template<typename F>
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.

template<typename F = Real>
virtual F concepts::PiecewiseConstFormula< F >::operator() ( const Connector cell,
const Real  p,
const Real  t = 0.0 
) const [inline, virtual, inherited]

Gives the constant in an particular cell.

Implements concepts::PiecewiseFormulaBase< F >.

Definition at line 98 of file formula.hh.

template<typename F>
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.

template<typename F >
template<class H >
PiecewiseConstFormula< F > & concepts::PiecewiseConstFormula< F >::operator*= ( const H &  factor) [inherited]

Definition at line 137 of file formula.hh.

template<typename F = Real>
virtual F& concepts::PiecewiseConstFormula< F >::operator[] ( const uint  attrib) [virtual, inherited]

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.
template<typename F = Real>
virtual const F& concepts::PiecewiseConstFormula< F >::operator[] ( const uint  attrib) const [virtual, inherited]
template<typename F = Real>
void concepts::PiecewiseConstImportFormula< F >::read_ ( std::istringstream &  iss) [private]

reads a line, needs special implementation for different types F


Member Data Documentation

template<typename F = Real>
HashMap<F> concepts::PiecewiseConstFormula< F >::formula_ [protected, inherited]

Mapping from the elements on to the constants.

Definition at line 131 of file formula.hh.


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

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)