19 #include <boost/math/constants/constants.hpp>
29 typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>
dMatrix;
31 typedef Eigen::Matrix<unsigned, Eigen::Dynamic, Eigen::Dynamic> uMatrix;
35 template <
class func_space>
36 void tester(func_space
const &w)
38 using namespace boost::math::double_constants;
41 size_t nDOF = w.get_num_dofs();
50 std::cout <<
"WR matrix:\n" << I << std::endl;
51 std::cout <<
"sum of elements: " << I.sum() << std::endl;
54 double anal = 32.0 * (std::log(1.0+root_two)-(root_two-1.0)/3.0) / 4.0 / pi;
55 std::cout <<
"log10 error = " << std::log10(std::abs(I.sum() / anal - 1.0)) << std::endl;
72 uMatrix elements(1, 1+4);
73 elements << NiHu::quad_1_elem::id, 0, 1, 3, 2;
81 std::cout <<
"Testing with constant field" << std::endl;
82 tester(NiHu::constant_view(msh));
85 std::cout <<
"Testing with isoparametric field" << std::endl;
86 tester(NiHu::isoparametric_view(msh));