3 #ifndef DUNE_PDELAB_FUNCTION_SQRT_HH 4 #define DUNE_PDELAB_FUNCTION_SQRT_HH 18 SqrtGridFunctionAdapter<GF> >
20 static_assert(GF::Traits::dimRange == 1,
"Dimension of range must " 21 "be 1 to take the sqrt");
23 typedef typename GF::Traits T;
26 typedef typename T::RangeFieldType RF;
37 void evaluate(
const typename Traits::ElementType &
e,
38 const typename Traits::DomainType &x,
39 typename Traits::RangeType &y)
const {
41 y[0] = std::sqrt(y[0]);
45 return gf.getGridView();
48 template<
typename Time>
49 void setTime(Time time) { gf.setTime(time); }
55 #endif // DUNE_PDELAB_FUNCTION_SQRT_HH const Entity & e
Definition: localfunctionspace.hh:120
leaf of a function tree
Definition: function.hh:298
SqrtGridFunctionAdapter(GF &gf_)
Definition: sqrt.hh:33
void setTime(Time time)
Definition: sqrt.hh:49
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
Take sqrt of a GridFunction.
Definition: sqrt.hh:16
Base::Traits Traits
Definition: sqrt.hh:31
const Traits::GridViewType & getGridView() const
Definition: sqrt.hh:44
void evaluate(const typename Traits::ElementType &e, const typename Traits::DomainType &x, typename Traits::RangeType &y) const
Definition: sqrt.hh:37
T Traits
Export type traits.
Definition: function.hh:192