Go to the documentation of this file.
23 template<class F, class G = typename Realtype<F>::type>
24 class ElementFunction :
public virtual OutputOperator {
27 virtual uint
n()
const = 0;
35 Array<F>& val,
const uint *i)
const = 0;
44 Array<F>& val,
const uint* i)
const = 0;
56 const Real t = 0.0)
const = 0;
59 const Real t = 0.0)
const = 0;
62 const Real t = 0.0)
const = 0;
67 virtual std::ostream&
info(std::ostream& os)
const {
77 template<class F, class G = typename Realtype<F>::type>
83 virtual uint
n()
const {
return fun_.n(); }
91 const Real t = 0.0)
const;
94 const Real t = 0.0)
const;
97 const Real t = 0.0)
const;
101 virtual std::ostream&
info(std::ostream& os)
const;
109 for(uint j=0; j <
n(); ++j)
110 val[j] = val[j]*val[j];
124 template<class F, class G = typename Realtype<F>::type>
130 virtual uint
n()
const {
return fun_.n(); }
133 Array<F>& val,
const uint *i)
const;
135 Array<F>& val,
const uint* i)
const;
138 const Real t = 0.0)
const;
141 const Real t = 0.0)
const;
144 const Real t = 0.0)
const;
147 virtual std::ostream&
info(std::ostream& os)
const;
165 template<class F, class G = typename Realtype<F>::type>
171 virtual uint
n()
const {
return 1; }
174 Array<F>& val,
const uint *i)
const;
176 Array<F>& val,
const uint* i)
const;
179 const Real t = 0.0)
const;
182 const Real t = 0.0)
const;
185 const Real t = 0.0)
const;
188 virtual std::ostream&
info(std::ostream& os)
const;
198 #endif // spcFunction_hh
uint size() const
Returns the requested size of the array.
The square of a element function (componentwise)
An abstract class for a function in a FE space.
void square_(Array< H > &val) const
Method for the square.
virtual void operator()(const Element< G > &elm, const Array< F > &coeff, Array< F > &val, const uint *i) const =0
Evaluates the function on precalculated quadrature points.
Absolute(ElementFunction< F, G > &fun)
Constructor.
virtual Squared< F, G > * clone() const
ElementFunction< F, G > & fun_
FE Function for which the square is to taken.
Squared(ElementFunction< F, G > &fun)
Constructor.
ElementFunction< F, G > & fun_
FE Function for which the square is to taken.
#define conceptsAssert(cond, exc)
Assert that a certain condition is fulfilled.
AbsoluteComp(ElementFunction< F, G > &fun)
Constructor.
virtual std::ostream & info(std::ostream &os) const
F absolute_(const Array< F > &val) const
Method for the absolute value.
virtual AbsoluteComp< F, G > * clone() const
virtual uint n() const =0
Number of components.
Exception class for assertions.
virtual Absolute< F, G > * clone() const
virtual void operator()(const Element< G > &elm, const Array< F > &coeff, Array< F > &val, const uint *i) const
virtual std::ostream & info(std::ostream &os) const
virtual std::ostream & info(std::ostream &os) const
virtual ElementFunction< F, G > * clone() const =0
The component wise absolute value of a element function.
virtual void operator()(const Element< G > &elm, const Array< F > &coeff, Array< F > &val, const uint *i) const
The absolute value of a element function.
virtual std::ostream & info(std::ostream &os) const
ElementFunction< F, G > & fun_
FE Function for which the square is to taken.
std::string typeOf(const T &t)
Return the typeid name of a class object.
void absolute_(Array< F > &val) const
Method for the absolute value.
double Real
Type normally used for a floating point number.
virtual void operator()(const Element< G > &elm, const Array< F > &coeff, Array< F > &val, const uint *i) const
Basic namespace for Concepts-2.