3 #ifndef DUNE_PDELAB_FUNCTION_PRODUCT_HH 4 #define DUNE_PDELAB_FUNCTION_PRODUCT_HH 8 #include <dune/common/fvector.hh> 9 #include <dune/common/typetraits.hh> 17 template<
typename GF1,
typename GF2,
class =
void>
21 typename GF1::Traits::GridViewType,
22 typename GF1::Traits::RangeFieldType, 1,
23 FieldVector<typename GF1::Traits::RangeFieldType, 1> >,
24 ProductGridFunctionAdapter<GF1,GF2> >
26 static_assert(
unsigned(GF1::Traits::dimRange) ==
27 unsigned(GF2::Traits::dimRange),
28 "ProductGridFunctionAdapter: Operands must have " 29 "matching range dimensions, or one operand must be " 33 typename GF1::Traits::GridViewType,
34 typename GF1::Traits::RangeFieldType, 1,
35 FieldVector<typename GF1::Traits::RangeFieldType, 1> >
T;
45 : gf1(gf1_), gf2(gf2_)
51 typename GF1::Traits::RangeType y1;
53 typename GF2::Traits::RangeType y2;
59 return gf1.getGridView();
62 template<
typename Time>
70 template<
typename GF1,
typename GF2>
74 GF1::Traits::dimRange == 1 && GF2::Traits::dimRange != 1
77 ProductGridFunctionAdapter<GF1,GF2> >
79 typedef typename GF2::Traits T;
89 : gf1(gf1_), gf2(gf2_)
92 void evaluate(
const typename Traits::ElementType &
e,
93 const typename Traits::DomainType &x,
94 typename Traits::RangeType &y)
const {
95 typename GF1::Traits::RangeType y1;
102 return gf1.getGridView();
105 template<
typename Time>
113 template<
typename GF1,
typename GF2>
117 GF1::Traits::dimRange != 1 && GF2::Traits::dimRange == 1
130 #endif // DUNE_PDELAB_FUNCTION_PRODUCT_HH const Traits::GridViewType & getGridView() const
Definition: product.hh:58
void evaluate(const typename Traits::ElementType &e, const typename Traits::DomainType &x, typename Traits::RangeType &y) const
Definition: product.hh:92
ProductGridFunctionAdapter(GF1 &gf1_, GF2 &gf2_)
Definition: product.hh:44
Base::Traits Traits
Definition: product.hh:42
const Traits::GridViewType & getGridView() const
Definition: product.hh:101
GV GridViewType
The type of the grid view the function lives on.
Definition: function.hh:114
Definition: adaptivity.hh:27
GV::Traits::template Codim< 0 >::Entity ElementType
codim 0 entity
Definition: function.hh:117
void evaluate(const typename Traits::ElementType &e, const typename Traits::DomainType &x, typename Traits::RangeType &y) const
Definition: product.hh:48
Product of two GridFunctions.
Definition: product.hh:18
ProductGridFunctionAdapter(GF1 &gf1, GF2 &gf2)
Definition: product.hh:122
ProductGridFunctionAdapter(GF1 &gf1_, GF2 &gf2_)
Definition: product.hh:88
const Entity & e
Definition: localfunctionspace.hh:111
Dune::FieldVector< GV::Grid::ctype, GV::dimension > DomainType
domain type in dim-size coordinates
Definition: function.hh:48
T Traits
Export type traits.
Definition: function.hh:191
R RangeType
range type
Definition: function.hh:60
void setTime(Time time)
Definition: product.hh:106
void setTime(Time time)
Definition: product.hh:63
leaf of a function tree
Definition: function.hh:576
Base::Traits Traits
Definition: product.hh:86
traits class holding the function signature, same as in local function
Definition: function.hh:175