32 #include <blitz/array.h>
48 template<
int M,
int N = M>
59 static const uint16_type imorder = 0;
60 static const bool imIsPoly =
true;
62 template<
typename Func>
63 struct HasTestFunction
65 static const bool result =
false;
68 template<
typename Func>
69 struct HasTrialFunction
71 static const bool result =
false;
74 typedef Eye<M,N> this_type;
75 typedef double value_type;
91 Eye( Eye
const & eig )
126 blitz::Array<value_type,2> eye()
const
132 template<
typename Geo_t,
typename Basis_i_t,
typename Basis_j_t>
135 typedef this_type expression_type;
136 typedef typename expression_type::value_type value_type;
137 typedef value_type return_value_type;
138 typedef typename mpl::if_<fusion::result_of::has_key<Geo_t, vf::detail::gmc<0> >,
139 mpl::identity<vf::detail::gmc<0> >,
140 mpl::identity<vf::detail::gmc<1> > >::type::type key_type;
141 typedef typename fusion::result_of::value_at_key<Geo_t,key_type>::type::element_type* gmc_ptrtype;
142 typedef typename fusion::result_of::value_at_key<Geo_t,key_type>::type::element_type gmc_type;
144 struct INVALID_SHAPE {};
145 static const bool eq11 = M==1&&N==1;
146 static const bool eqD1 = M==gmc_type::nDim&&N==1;
147 static const bool eq1D = M==1&&N==gmc_type::nDim;
148 static const bool eqDD = M==gmc_type::nDim&&N==gmc_type::nDim;
149 typedef typename mpl::if_< mpl::bool_<eq11>,
150 mpl::identity<Shape<gmc_type::nDim, Scalar, false, false> >,
151 typename mpl::if_< mpl::bool_<eqD1>,
152 mpl::identity<Shape<gmc_type::nDim, Vectorial, false, false> >,
153 typename mpl::if_< mpl::bool_<eq1D>,
154 mpl::identity<Shape<gmc_type::nDim, Vectorial, true, false> >,
155 typename mpl::if_< mpl::bool_<eqDD>,
156 mpl::identity<Shape<gmc_type::nDim, Tensor2, false, false> >,
157 mpl::identity<INVALID_SHAPE> >::type>::type>::type>::type::type shape;
160 template <
class Args>
struct sig
162 typedef value_type type;
165 tensor( this_type
const& expr,Geo_t
const&, Basis_i_t
const&, Basis_j_t
const& )
171 tensor( this_type
const& expr,Geo_t
const&, Basis_i_t
const& )
177 tensor( this_type
const& expr, Geo_t
const& )
183 void update( Geo_t
const&, Basis_i_t
const&, Basis_j_t
const& )
186 void update( Geo_t
const&, Basis_i_t
const& )
189 void update( Geo_t
const& )
195 evalijq( uint16_type i, uint16_type j, uint16_type c1, uint16_type c2, uint16_type q )
const
197 Feel::detail::ignore_unused_variable_warning( i );
198 Feel::detail::ignore_unused_variable_warning( j );
199 Feel::detail::ignore_unused_variable_warning( q );
200 return eval( c1, c2, mpl::bool_<shape::is_scalar>() );
203 template<
int PatternContext>
205 evalijq( uint16_type i, uint16_type j, uint16_type c1, uint16_type c2, uint16_type q,
206 mpl::int_<PatternContext> )
const
208 Feel::detail::ignore_unused_variable_warning( i );
209 Feel::detail::ignore_unused_variable_warning( j );
210 Feel::detail::ignore_unused_variable_warning( q );
211 return eval( c1, c2, mpl::bool_<shape::is_scalar>() );
215 evaliq( uint16_type i, uint16_type c1, uint16_type c2, uint16_type q )
const
217 Feel::detail::ignore_unused_variable_warning( i );
218 Feel::detail::ignore_unused_variable_warning( q );
219 return eval( c1, c2, mpl::bool_<shape::is_scalar>() );
222 evalq( uint16_type c1, uint16_type c2, uint16_type q )
const
224 Feel::detail::ignore_unused_variable_warning( q );
225 return eval( c1, c2, mpl::bool_<shape::is_scalar>() );
229 eval(
int c1,
int c2, mpl::bool_<true> )
const
231 Feel::detail::ignore_unused_variable_warning( c1 );
232 Feel::detail::ignore_unused_variable_warning( c2 );
233 return M_expr.eye()( 0, 0 );
236 eval(
int c1,
int c2, mpl::bool_<false> )
const
238 return M_expr.eye()( c1, c2 );
243 blitz::Array<value_type,2> M_eye;
255 template<
int M,
int N>
257 Expr<vf::detail::Eye<M,N> >
260 return Expr< vf::detail::Eye<M,N> >( vf::detail::Eye<M, N>() );
size_t size_type
Indices (starting from 0)
Definition: feelcore/feel.hpp:319