30 #define __Function_H 1
44 template<
typename Func>
55 static const size_type context = vm::POINT;
56 static const bool is_terminal =
false;
57 static const uint16_type imorder = Func::imorder;
58 static const bool imIsPoly = Func::imIsPoly;
60 template<
typename Funct>
61 struct HasTestFunction
63 static const bool result =
false;
65 template<
typename Funct>
66 struct HasTrialFunction
68 static const bool result =
false;
71 typedef Func expression_type;
72 typedef Function<Func> this_type;
73 typedef typename expression_type::value_type value_type;
80 explicit Function( expression_type
const & fun )
84 Function( Function
const & fun )
118 const expression_type& fun()
const
126 template<
typename Geo_t,
typename Basis_i_t,
typename Basis_j_t>
129 typedef typename expression_type::value_type value_type;
131 typedef typename mpl::if_<fusion::result_of::has_key<Geo_t,vf::detail::gmc<0> >,
132 mpl::identity<vf::detail::gmc<0> >,
133 mpl::identity<vf::detail::gmc<1> > >::type::type key_type;
134 typedef typename fusion::result_of::value_at_key<Geo_t,key_type>::type::element_type* gmc_ptrtype;
135 typedef typename fusion::result_of::value_at_key<Geo_t,key_type>::type::element_type gmc_type;
136 typedef typename mpl::if_<mpl::equal_to<mpl::int_<Func::rank>,mpl::int_<0> >,
137 mpl::identity<Shape<gmc_type::nDim, Scalar, false, false> >,
138 typename mpl::if_<mpl::equal_to<mpl::int_<Func::rank>,mpl::int_<1> >,
139 mpl::identity<Shape<gmc_type::nDim, Vectorial, false, false> >,
140 mpl::identity<Shape<gmc_type::nDim, Tensor2, false, false> > >::type >::type::type shape;
144 static const bool value =
false;
147 tensor( this_type
const& expr,
148 Geo_t
const& geom, Basis_i_t
const& , Basis_j_t
const& )
151 M_gmc( fusion::at_key<key_type>( geom ).get() )
154 tensor( this_type
const& expr,
155 Geo_t
const& geom, Basis_i_t
const& )
158 M_gmc( fusion::at_key<key_type>( geom ).get() )
161 tensor( this_type
const& expr, Geo_t
const& geom )
164 M_gmc( fusion::at_key<key_type>( geom ).get() )
168 template<
typename IM>
169 void init( IM
const& im )
173 void update( Geo_t
const& geom, Basis_i_t
const& , Basis_j_t
const& )
177 void update( Geo_t
const& geom, Basis_i_t
const& )
181 void update( Geo_t
const& geom )
183 M_gmc = fusion::at_key<key_type>( geom ).
get();
186 void update( Geo_t
const& geom, uint16_type )
188 M_gmc = fusion::at_key<key_type>( geom ).
get();
193 evalij( uint16_type i, uint16_type j )
const
200 evalijq( uint16_type , uint16_type , uint16_type c1, uint16_type c2, uint16_type q )
const
202 return M_fun( c1, c2, M_gmc->xReal( q ), M_gmc->unitNormal( q ) );
204 template<
int PatternContext>
206 evalijq( uint16_type , uint16_type , uint16_type c1, uint16_type c2, uint16_type q,
207 mpl::int_<PatternContext> )
const
209 return M_fun( c1, c2, M_gmc->xReal( q ), M_gmc->unitNormal( q ) );
215 evaliq( uint16_type i, uint16_type c1, uint16_type c2, uint16_type q )
const
217 return M_fun( c1, c2, M_gmc->xReal( q ), M_gmc->unitNormal( q ) );
221 evalq( uint16_type c1, uint16_type c2, uint16_type q )
const
223 return M_fun( c1, c2, M_gmc->xReal( q ), M_gmc->unitNormal( q ) );
231 mutable expression_type M_fun;
239 template<
typename Func>
241 Expr< Function<Func> >
244 typedef Function<Func> func_t;
245 return Expr< func_t >( func_t( f ) );
size_t size_type
Indices (starting from 0)
Definition: feelcore/feel.hpp:319