7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test module for ETYPE"
10 #include <boost/assign/list_of.hpp>
11 #include <boost/test/unit_test.hpp>
33 mapped_coords(1./6., 1./6.),
41 0.0, 2./3.).finished())
61 ETYPE::SF::ValueT reference_result;
62 reference_result << 5./18., -1./18., -1./18., 2./9., -1./9., 2./9., 0.5;
63 ETYPE::SF::ValueT result;
64 ETYPE::SF::compute_value(mapped_coords, result);
66 std::cout<< reference_result << std::endl;
67 std::cout<< reference_result.sum() << std::endl;
69 std::cout<< result << std::endl;
70 std::cout<< result.sum() << std::endl;
73 BOOST_CHECK_CLOSE ( result.sum(), 1.0, 1
e-8 );
80 ETYPE::SF::GradientT result;
81 ETYPE::SF::compute_gradient(mapped_coords, result);
86 std::cout<< result << std::endl;
88 std::cout<< result(
XX,0) + result(
XX,1) + result(
XX,2) + result(
XX,3) + result(
XX,4) + result(
XX,5) + result(
XX,6) << std::endl;
89 std::cout<< result(
YY,0) + result(
YY,1) + result(
YY,2) + result(
YY,3) + result(
YY,4) + result(
YY,5) + result(
YY,6) << std::endl;
93 ETYPE::SF::compute_gradient(m1, result);
95 std::cout<< result << std::endl;
97 std::cout<< result(
XX,0) + result(
XX,1) + result(
XX,2) + result(
XX,3) + result(
XX,4) + result(
XX,5) + result(
XX,6) << std::endl;
98 std::cout<< result(
YY,0) + result(
YY,1) + result(
YY,2) + result(
YY,3) + result(
YY,4) + result(
YY,5) + result(
YY,6) << std::endl;
100 BOOST_CHECK_LE ( std::abs(result.sum()), 1
e-14 );
105 BOOST_AUTO_TEST_SUITE_END()
namespace holding LagrangeP2B shape functions and elements
Real e()
Definition of the Unit charge [C].
boost::proto::terminal< SFOp< NodesOp > >::type const nodes
2D Lagrange P2B Triangular Element type This class provides the lagrangian shape function describing ...
Eigen::Matrix< Real, nb_nodes, Hexa3D_traits::dimension > NodesT
Basic Classes for Mesh applications used by COOLFluiD.
Top-level namespace for coolfluid.
const ETYPE::MappedCoordsT mapped_coords
common values accessed by all tests goes here
Hexa3D_traits::SF::MappedCoordsT MappedCoordsT
~LagrangeP2BTriag2DFixture()
common tear-down for each test case
LagrangeP2BTriag2DFixture()
common setup for each test case
BOOST_AUTO_TEST_CASE(ShapeFunction)