concepts::PiecewiseConstImportFormula< F > Class Template Referenceabstract

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

#include <formula.hh>

Inheritance diagram for concepts::PiecewiseConstImportFormula< F >:
concepts::PiecewiseConstFormula< Real > concepts::PiecewiseFormulaBase< Real > concepts::ElementFormula< Real, concepts::Realtype< Real >::type > concepts::Cloneable concepts::OutputOperator

Public Types

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

Public Member Functions

virtual PiecewiseConstFormula< Real > * clone () const
 Virtual constructor. More...
 
virtual Cloneableclone () const =0
 Virtual constructor. More...
 
virtual Realdflt_value ()
 Gives default value. More...
 
virtual const Realdflt_value () const
 Gives default value. More...
 
virtual Real operator() (const Connector &cell, const Real p, const Real t=0.0) const
 Gives the constant in an particular cell. More...
 
virtual Real operator() (const Connector &cell, const Real2d &p, const Real t=0.0) const
 
virtual Real operator() (const Connector &cell, const Real3d &p, const Real t=0.0) const
 
virtual Real operator() (const ElementWithCell< concepts::Realtype< Real >::type > &elm, const Real p, const Real t=0.0) const=0
 Evaluates the formula. More...
 
virtual Real operator() (const ElementWithCell< concepts::Realtype< Real >::type > &elm, const Real2d &p, const Real t=0.0) const=0
 Evaluates the formula. More...
 
virtual Real operator() (const ElementWithCell< concepts::Realtype< Real >::type > &elm, const Real3d &p, const Real t=0.0) const=0
 Evaluates the formula. More...
 
virtual Real operator() (const ElementWithCell< G > &elm, const Real p, const Real t=0.0) const
 
virtual Real operator() (const ElementWithCell< G > &elm, const Real2d &p, const Real t=0.0) const
 
virtual Real operator() (const ElementWithCell< G > &elm, const Real3d &p, const Real t=0.0) const
 
PiecewiseConstFormula< Real > & operator*= (const H &factor)
 
virtual Realoperator[] (const uint attrib)
 Set the constant in an particular cell. More...
 
virtual const Realoperator[] (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. More...
 

Protected Attributes

HashMap< Realformula_
 Mapping from the elements on to the constants. More...
 

Private Member Functions

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

Private Attributes

Real dflt_value_
 default value More...
 

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 166 of file formula.hh.

Member Typedef Documentation

◆ G

Definition at line 45 of file piecewiseFormula.hh.

◆ value_type

Definition at line 37 of file elementFormula.hh.

Constructor & Destructor Documentation

◆ PiecewiseConstImportFormula()

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

Member Function Documentation

◆ clone() [1/2]

virtual PiecewiseConstFormula<Real >* concepts::PiecewiseConstFormula< Real >::clone
virtualinherited

Virtual constructor.

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

Implements concepts::PiecewiseFormulaBase< Real >.

◆ clone() [2/2]

virtual Cloneable* concepts::Cloneable::clone ( ) const
pure virtualinherited

Virtual constructor.

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

Implemented in concepts::BilinearForm< F, G >, hp2D::PolyEdgeRule, concepts::Operation< F >, concepts::MappingEdge2d, concepts::ElementFormulaVectorBase< F, G, H, I >, concepts::PiecewiseFormulaBase< F >, concepts::ElementFormula< F, G >, concepts::ExplicitResidual< F >, concepts::LocalEstimator< F >, concepts::FormulaIncPlaneWaveSource, concepts::ComposeFormulaVecEntry< F, DIM, G >, concepts::ComposeFormulaMatVec< F, DIM, G >, concepts::FormulaNormalOuterSP2D< F >, concepts::FrmE_PMLTransformation< dim >, concepts::FormulaPMLHamburger, concepts::FormulaPMLCartNew, concepts::FormulaPMLRadia, concepts::FormulaPMLBoxRestriction< F, G >, concepts::FormulaPMLCart, concepts::FormulaPMLEdgeRadia, concepts::SourceFunctionF0_y, concepts::SourceFunctionF0_x, concepts::FrmE_ScalarProductNormalEdge2d< F >, concepts::ElementFormulaRotate2D< F >, concepts::ElementFormulaBoundary, concepts::ElementFormulaCompose< F, G, H >, concepts::ElementFormulaLiCo< F, G, H, J >, concepts::BilinearF_W< F, H, J, G >, concepts::BilinearF_Sum< F, H, J, G >, concepts::BilinearFormContainer< F, G >, concepts::BilinearFormLiCo< F, G >, linearFEM::Identity2d, linearFEM::Laplace2d, linearFEM::CIdentity1d, linearFEM::Identity1d, linearFEM::Laplace1d, linDG3D::LaplaceVolBF, linDG3D::Identity, linDG2D::LaplaceStabBf, linDG2D::LaplaceFluxBf, linDG2D::LaplaceVolBf, linDG2D::IdentityBf, linDG1D::BoundaryIntStab, linDG1D::BoundaryInt, hp3D::ElementFormulaVectorOnTrace< dim, F, G >, hp3D::RotRot, hp3D::MaxwellSharedData, hp3D::FormulaFromWeight< Weight >, hp3D::DivDiv< Weight >, hp3D::Advection< F >, hp3D::Identity< F >, hp3D::Laplace< F >, hp3D::BilinearFormTwoPartDeriv< F >, hp3D::LinearElasticity< F >, hp2Dedge::EdgeIdentity, hp2Dedge::Rotuv, hp2Dedge::RotRot< F >, hp2Dedge::IdentityMatrix< F >, hp2Dedge::Identity< F >, hp2Dedge::GraduvMatrix< F >, hp2Dedge::Graduv< F >, concepts::DirichletElementFormula< F, G >, hp2D::RotRot, hp2D::MaxwellSharedData, hp2D::FormulaFromWeight< Weight >, hp2D::ElementFormulaSignNormalVector, hp2D::ElementFormulaEdgeJump< F >, hp2D::ElementFormulaEdgeMean< F >, hp2D::ElementFormulaInterpGradN< F, 2 >, hp2D::ElementFormulaInterpGrad< F, 2 >, hp2D::H1Extension< F >, hp2D::PolyEdgeMinNeighMaxChild, hp2D::PolyEdgeMin, hp2D::PolyEdgeMax, hp2D::DivDiv< Weight >, hp2D::BilinearFormTwoPartDeriv< F >, hp2D::BilinearFormOnePartDeriv< F >, hp2D::LaplaceMatrix< F >, hp2D::Laplace< F >, hp2D::Identity< F >, hp2D::Advection< F >, hp1D::ElementFormulaInterpGrad< F >, hp1D::Mean2Jump1< F >, hp1D::Jump1Jump1< F >, hp1D::BiLaplace< F >, hp1D::IdentityParallel< F >, hp1D::Identity< F >, hp1D::Laplace< F >, concepts::SharedJacobianAdj< dim >, concepts::SharedJacobianDet, concepts::FrmE_NormalVector3d, concepts::FrmE_TangentialVector, concepts::FrmE_NormalVector, concepts::CurvatureElementFormula, concepts::PiecewiseFormulaCombine< F, G, H, I >, concepts::PiecewiseFormulaFun< F, G >, concepts::OpRecipr< F >, concepts::OpAdd< F >, concepts::OpMult< F >, concepts::PiecewiseElementFormula< F, G >, concepts::PiecewiseFormula< F >, concepts::PiecewiseConstDynArrayFormula< F >, concepts::PiecewiseConstFormula< F >, concepts::PiecewiseFormula0< F >, concepts::MappingQuadEdge2d, concepts::MappingParallelEdge2d, concepts::ParabelMappingEdge2d, concepts::EllipseMappingEdge2d, concepts::CircleMappingEdge2d, concepts::MappingStraightEdge2d, concepts::InverseMappingEdge2d, concepts::PartMappingEdge2d, concepts::PiecewiseFormulaVector< 1, F, G, H >, concepts::PiecewiseFormulaVector< dim, F, G, H >, concepts::ElementFormulaVector< 1, F, G, H >, concepts::ElementFormulaVector< dim, F, G, H >, concepts::VectorElementFormulaBase< F, dim, G >, concepts::MatrixElementFormula< F, dim, G >, concepts::FrmE_Sum< F, H, J, G >, concepts::FrmE_Product< F, H, J, G >, concepts::FrmE_Trace< dim, F, G >, concepts::FrmE_PointsToMapping< 2, F, G >, concepts::FrmE_PointToMapping< dim, F, G >, concepts::FrmE_Inverse< F, G >, concepts::FrmE_Conjugate< F, G >, concepts::FrmE_Component_Matrix< F, G, H >, concepts::FrmE_Component< F, G, H >, concepts::ElementFormulaContainer< F, G >, estimator::KeysInfo< F >, estimator::PolynomialDegrees< dim >, hp2D::ImplicitEquilibratedA0< F >, hp2D::LocalFluxes, hp2D::Fluxes, hp2D::ExplicitResidual2D< F >, hp2D::ExplicitResidual2D< F >::EdgeWeight, hp2D::ExplicitResidual2D< F >::Distance, estimator::LocalProjections_P< dim, F, H >, estimator::LocalProjections_S< F, H >, constraints::ConstraintsList< F >, bem::AdaptLaplaceSL01< F >, bem::AdaptLaplaceDL01< F >, bem::AdaptLaplaceDL00< F >, bem::ArbKrnl000< F, K >, bem::Identity< F >, bem::LaplaceHyp< F >, bem::LaplacePLD< F >, bem::LaplaceDL< F >, bem::LaplaceSL< F >, concepts::FormulaPMLRadia, concepts::FormulaPMLBoxRestriction< F, G >, concepts::FormulaPMLCart, concepts::FormulaIncPlaneWaveSource, concepts::ComposeFormulaVecEntry< F, DIM, G >, concepts::ComposeFormulaMatVec< F, DIM, G >, concepts::FormulaNormalOuterSP2D< F >, aglowav2::WavIdentity< F >, and aglowav2::AglowavBF00< F >.

◆ dflt_value() [1/2]

virtual Real & concepts::PiecewiseFormulaBase< Real >::dflt_value ( )
inlinevirtualinherited

Gives default value.

Definition at line 83 of file piecewiseFormula.hh.

◆ dflt_value() [2/2]

virtual const Real & concepts::PiecewiseFormulaBase< Real >::dflt_value ( ) const
inlinevirtualinherited

Gives default value.

Definition at line 81 of file piecewiseFormula.hh.

◆ info()

virtual std::ostream& concepts::PiecewiseConstFormula< Real >::info ( std::ostream &  os) const
protectedvirtualinherited

Returns information in an output stream.

Reimplemented from concepts::PiecewiseFormulaBase< Real >.

◆ operator()() [1/9]

virtual Real concepts::PiecewiseConstFormula< Real >::operator() ( const Connector cell,
const Real  p,
const Real  t = 0.0 
) const
inlinevirtualinherited

Gives the constant in an particular cell.

Implements concepts::PiecewiseFormulaBase< Real >.

Definition at line 100 of file formula.hh.

◆ operator()() [2/9]

virtual Real concepts::PiecewiseConstFormula< Real >::operator() ( const Connector cell,
const Real2d p,
const Real  t = 0.0 
) const
inlinevirtualinherited

Implements concepts::PiecewiseFormulaBase< Real >.

Definition at line 104 of file formula.hh.

◆ operator()() [3/9]

virtual Real concepts::PiecewiseConstFormula< Real >::operator() ( const Connector cell,
const Real3d p,
const Real  t = 0.0 
) const
inlinevirtualinherited

Implements concepts::PiecewiseFormulaBase< Real >.

Definition at line 117 of file formula.hh.

◆ operator()() [4/9]

virtual Real concepts::ElementFormula< Real , concepts::Realtype< Real >::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 Real concepts::ElementFormula< Real , concepts::Realtype< Real >::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 Real concepts::ElementFormula< Real , concepts::Realtype< Real >::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]

virtual Real concepts::PiecewiseFormulaBase< Real >::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]

virtual Real concepts::PiecewiseFormulaBase< Real >::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]

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

Definition at line 63 of file piecewiseFormula.hh.

◆ operator*=()

PiecewiseConstFormula< Real > & concepts::PiecewiseConstFormula< Real >::operator*= ( const H &  factor)
inherited

Definition at line 129 of file formula.hh.

◆ operator[]() [1/2]

virtual Real & concepts::PiecewiseConstFormula< Real >::operator[] ( const uint  attrib)
virtualinherited

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.

◆ operator[]() [2/2]

virtual const Real & concepts::PiecewiseConstFormula< Real >::operator[] ( const uint  attrib) const
virtualinherited

◆ read_()

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

◆ dflt_value_

Real concepts::PiecewiseFormulaBase< Real >::dflt_value_
privateinherited

default value

Definition at line 88 of file piecewiseFormula.hh.

◆ formula_

HashMap<Real > concepts::PiecewiseConstFormula< Real >::formula_
protectedinherited

Mapping from the elements on to the constants.

Definition at line 133 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