22 #ifndef QUADRATURE_HPP_INCLUDED
23 #define QUADRATURE_HPP_INCLUDED
26 #include "../library/lib_shape.hpp"
27 #include "../util/eigen_utils.hpp"
28 #include "../util/crtp_base.hpp"
38 template <
class XiType,
class ScalarType>
92 void set_xi(
xi_t const& xi)
114 template <
class LSet,
bool Signed = true>
116 Eigen::Matrix<scalar_t, LSet::num_nodes, LSet::domain_t::dimension>
const &coords)
120 "LSet must be derived from shape_set_base<LSet>");
122 auto j = (LSet::template eval_shape<1>(
m_xi).transpose() * coords).determinant();
128 m_xi = LSet::template eval_shape<0>(
m_xi).transpose() * coords;
133 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
144 template <
class Derived>
148 template <
class Derived>
161 template <
class Derived>
177 typedef typename domain_t::xi_t
xi_t;
199 for (
auto it = base_t::begin(); it != base_t::end(); ++it)
209 std::ostream &
print(std::ostream & os)
const
211 os << base_t::size() << std::endl;
212 for (
auto it = base_t::begin(); it != base_t::end(); ++it)
213 os << it->get_xi().transpose() <<
"\t\t" << it->get_w() << std::endl;
224 for (
size_t i = 0; i < base_t::size(); ++i)
237 template <
class LSet,
bool Signed = true>
239 Eigen::Matrix<scalar_t, LSet::num_nodes, LSet::domain_t::dimension>
const &coords)
const
243 "LSet must be derived from shape_set_base<LSet>");
245 static_assert(std::is_same<xi_t, typename LSet::xi_t>::value,
246 "Quadrature and shape set dimensions must match");
247 Derived result(derived());
248 return result.template transform_inplace<LSet, Signed>(coords);
258 template <
class LSet,
bool Signed = true>
260 const Eigen::Matrix<scalar_t, LSet::num_nodes, LSet::domain_t::dimension> &coords)
264 "LSet must be derived from shape_set_base<LSet>");
266 static_assert(std::is_same<xi_t, typename LSet::xi_t>::value,
267 "Quadrature and shape set dimensions must match");
268 for (
auto it = base_t::begin(); it != base_t::end(); ++it)
269 it->template transform_inplace<LSet, Signed>(coords);
280 template <
class otherDerived>
283 static_assert(std::is_same<xi_t, typename otherDerived::xi_t>::value,
284 "Quadrature domain dimensions must match");
285 Derived result(base_t::size()+other.size());
286 result.insert(result.end(), base_t::begin(), base_t::end());
287 result.insert(result.end(), other.begin(), other.end());
298 template <
class otherDerived>
301 static_assert(std::is_same<xi_t, typename otherDerived::xi_t>::value,
302 "Quadrature domain dimensions must match");
303 base_t::reserve(base_t::size()+other.size());
304 base_t::insert(base_t::end(), other.begin(), other.end());
316 template<
class Derived>
325 template <
class Family,
class Domain>