formula.hh
Definition: formula.hh:379
PiecewiseElementFormula(const F defaultV=0)
Definition: formula.hh:289
Combines two piecewise defined formulas with an operation, e.g.
Definition: formula.hh:462
virtual F operator()(const Connector &cell, const Real2d &p, const Real t=0.0) const
PiecewiseConstFormula(const F dflt_value=0)
Constructor with default value dflt_value.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
PiecewiseConstFormula(const HashMap< F > formula, const F dflt_value=0)
Constructor with given mapping formula and default value dflt_value.
Piecewise constant function defined by the attribute of a cell.
Definition: formula.hh:84
PiecewiseConstFormula< F > & operator*=(const H &factor)
Definition: formula.hh:139
Definition: formula.hh:368
Piecewise defined function defined by attributes.
Definition: formula.hh:287
HashMap< FormulaFactor > formula_
Mapping from the elements on to the formula.
Definition: formula.hh:258
virtual PiecewiseElementFormula< F, G > * clone() const
Virtual constructor.
Definition: formula.hh:296
Piecewise defined function on a number of cells.
Definition: piecewiseFormula.hh:43
std::unique_ptr< Formula< F > > formula_
Definition: formula.hh:251
virtual F operator()(const Connector &cell, const Real2d &p, const Real t=0.0) const
Definition: formula.hh:48
PiecewiseFormulaFun< F, G > & reciprocal()
virtual F operator()(const Connector &cell, const Real3d &p, const Real t=0.0) const
Definition: formula.hh:117
virtual F operator()(const Connector &cell, const Real2d &p, const Real t=0.0) const
PiecewiseFormulaCombine(const PiecewiseFormulaBase< G > &formula1, const PiecewiseFormulaBase< H > &formula2)
Constructor.
PiecewiseConstImportFormula(const std::string material, const uint idxStart=1, const F dflt_value=0)
void multiply(const uint attrib, const H &factor)
Multiply the formula with attribute attrib with this factor.
Definition: formula.hh:271
virtual F operator()(const F val) const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Definition: formula.hh:254
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
void set(const uint attrib, const F a)
virtual F operator()(const Connector &cell, const Real p, const Real t=0.0) const
Gives the value in an particular cell on a particular point.
PiecewiseFormulaFun< F, G > & operator+=(const F n)
Datatype< F >::type factor_
Definition: formula.hh:252
virtual F operator()(const Connector &cell, const Real p, const Real t=0.0) const
Gives the value in an particular cell on a particular point.
virtual PiecewiseConstFormula< F > * clone() const
Virtual constructor.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual ~PiecewiseConstFormula()
Formula for the curvature or their derivatives on edges in 2D.
Definition: formula.hh:494
virtual F operator()(const Connector &cell, const Real2d &p, const Real t=0.0) const
Definition: formula.hh:104
virtual F operator()(const Connector &cell, const Real p, const Real t=0.0) const
Gives the constant in an particular cell.
Definition: formula.hh:100
virtual F operator()(const Connector &cell, const Real2d &p, const Real t=0.0) const
Gives the constant in an particular cell.
Definition: formula.hh:193
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Definition: formula.hh:55
void set(const uint attrib, const Formula< F > &formula)
Set the constant in an particular cell.
FormulaFactor(const FormulaFactor &frm)
Definition: formula.hh:247
void set(const uint attrib, const ElementFormulaContainer< F, G > formula)
Set the ElementFormula for all cells with attribute attrib.
Definition: formula.hh:335
virtual ~PiecewiseFormulaFun()
PiecewiseFormulaFun(PiecewiseFormulaBase< G > &formula)
Piecewise constant function defined by attributes, imported from a file.
Definition: formula.hh:166
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual F operator()(const Connector &cell, const Real p, const Real t=0.0) const
Gives the value in an particular cell.
Interface for a formula defined element by element.
Definition: elementFormula.hh:35
virtual F operator()(const Connector &cell, const Real3d &p, const Real t=0.0) const
Definition: operations.hh:65
virtual PiecewiseFormulaFun< F, G > * clone() const
Virtual constructor.
Piecewise defined function defined by attributes.
Definition: formula.hh:218
virtual ~PiecewiseFormulaCombine()
Definition: formula.hh:467
Definition: formula.hh:393
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual ~PiecewiseElementFormula()
Definition: formula.hh:294
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Piecewise defined function, which consists of a formula and a default value.
Definition: formula.hh:36
virtual F operator()(const F val) const
const DynArray< F > * formula_
Definition: formula.hh:203
virtual F operator()(const Connector &cell, const Real p, const Real t=0.0) const
Gives the value in an particular cell.
Definition: formula.hh:45
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
std::unique_ptr< Formula< F > > formula_
Definition: formula.hh:58
PiecewiseConstFormula(const std::map< int, F > formula, const F dflt_value=0)
Constructor with given mapping formula and default value dflt_value.
virtual F operator()(const F val) const
Definition: hashMap.hh:19
virtual F operator()(const Connector &cell, const Real3d &p, const Real t=0.0) const
Gives the constant in an particular cell.
Definition: formula.hh:197
virtual ~PiecewiseFormula0()
Definition: formula.hh:40
PiecewiseFormulaFun< F, G > & operator*=(const F n)
Piecewise constant function defined by attributes, base on dynamic array.
Definition: formula.hh:183
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Definition: formula.hh:351
virtual const Cell & cell() const =0
Returns the cell on which the element is built.
virtual const F & operator[](const uint attrib) const
virtual PiecewiseConstDynArrayFormula< F > * clone() const
Virtual constructor.
virtual F operator()(const Connector &cell, const Real3d &p, const Real t=0.0) const
HashMap< ElementFormulaContainer< F, G > > ElemFormulaMap
Mapping from the elements on to the formula.
Definition: formula.hh:358
virtual F operator()(const Connector &cell, const Real3d &p, const Real t=0.0) const
virtual F & operator[](const uint attrib)
Set the constant in an particular cell.
virtual F operator()(const ElementWithCell< G > &elm, const Real3d &p, const Real t=0.0) const
Definition: formula.hh:300
virtual F operator()(const Connector &cell, const Real p, const Real t=0.0) const
Gives the constant in an particular cell.
Definition: formula.hh:189
void read_(std::istringstream &iss)
reads a line, needs special implementation for different types F
virtual ~PiecewiseFormula()
PiecewiseFormula(const F dflt_value=0)
PiecewiseConstDynArrayFormula(const DynArray< F > &formula)
Piecewise defined function as an analytical function of another piecewiese defined function.
Definition: formula.hh:425
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual F operator()(const Connector &cell, const Real2d &p, const Real t=0.0) const
std::unique_ptr< const PiecewiseFormulaBase< H > > formula2_
Definition: formula.hh:481
virtual PiecewiseFormulaCombine< F, G, H, I > * clone() const
Virtual constructor.
void set(concepts::Set< uint > attribs, const ElementFormulaContainer< F, G > formula)
Definition: formula.hh:341
virtual F operator()(const F val) const =0
~PiecewiseConstDynArrayFormula()
Definition: formula.hh:407
virtual Real operator()(const ElementWithCell< Real > &elm, const Real p, const Real t=0.0) const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual F operator()(const Connector &cell, const Real3d &p, const Real t=0.0) const
Definition: formula.hh:51