29 #ifndef __ConstrainedPolynomialSet_H
30 #define __ConstrainedPolynomialSet_H 1
42 template<
typename Poly>
43 class ConstrainedPolynomialSet
45 public mpl::if_<mpl::bool_<Poly::is_scalar>,
46 mpl::identity<PolynomialSet<Poly> >,
47 mpl::identity<PolynomialSet<Poly, Vectorial> > >::type::type
49 typedef typename mpl::if_<mpl::bool_<Poly::is_scalar>,
50 mpl::identity<PolynomialSet<Poly> >,
51 mpl::identity<PolynomialSet<Poly, Vectorial> > >::type::type super;
57 static const uint16_type nDim = super::nDim;
58 static const uint16_type nOrder = super::nOrder;
59 static const bool is_vectorial = super::is_vectorial;
60 static const bool is_scalar = super::is_scalar;
61 static const uint16_type nComponents = super::nComponents;
67 typedef ConstrainedPolynomialSet<Poly>
self_type;
68 typedef Poly space_type;
69 typedef typename super::value_type value_type;
70 typedef typename super::basis_type basis_type;
72 typedef typename super::polyset_type polyset_type;
78 typedef typename mpl::if_<mpl::bool_<is_scalar>,
79 mpl::identity<Polynomial<space_type> >,
80 mpl::identity<Polynomial<space_type, Vectorial> > >::type::type polynomial_type;
82 typedef typename super::convex_type convex_type;
83 typedef typename basis_type::matrix_type matrix_type;
84 typedef typename basis_type::points_type points_type;
87 BOOST_STATIC_ASSERT( ( boost::is_same<typename matrix_type::value_type, value_type>::value ) );
88 BOOST_STATIC_ASSERT( ( boost::is_same<typename matrix_type::value_type, typename points_type::value_type>::value ) );
96 ConstrainedPolynomialSet()
101 void setConstraints( constraintset_type
const& fset )
105 matrix_type m( fset( fset.functionSpace() ) );
114 std::cout <<
"[ConstrainedPolynomialSet] v2m(m) = " << m <<
"\n";
117 SVD<matrix_type> svd( m );
121 matrix_type mv ( ublas::subrange( svd.V(), svd.S().size(), svd.V().size1(), 0, m.size2() ) );
123 this->setCoefficient( polyset_type::toType( mv ),
true );
a Set of polynomials
Definition: fe.hpp:37
Set of functionals.
Definition: constrainedpolynomialset.hpp:37
represents a linear functional
Definition: constrainedpolynomialset.hpp:36