7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test module for the Prism3D shape function"
10 #include <boost/assign/list_of.hpp>
11 #include <boost/test/unit_test.hpp>
14 #include <Eigen/StdVector>
39 mapped_coords(0.5, 0.4, 0.1),
48 0., 1., 1.).finished()
58 0.2, 1.3, 1.).finished()
110 ETYPE::SF::ValueT reference_result;
111 reference_result << 0.045, 0.225, 0.18, 0.055, 0.275, 0.22;
113 ETYPE::SF::ValueT result;
114 ETYPE::SF::compute_value(mapped_coords, result);
117 vector_test(result, reference_result, accumulator);
123 ConstFunctor ftor(skewed_nodes);
126 gauss_integrate<1, GeoShape::PRISM>(ftor, ftor.mapped_coords, result);
127 BOOST_CHECK_CLOSE(result, 0.5, 0.000001);
129 gauss_integrate<2, GeoShape::PRISM>(ftor, ftor.mapped_coords, result);
130 BOOST_CHECK_CLOSE(result, 0.5, 0.000001);
135 ETYPE::SF::GradientT expected;
136 expected << -0.45, 0.45, 0, -0.55, 0.55, 0,
137 -0.45, 0, 0.45, -0.55, 0, 0.55,
138 -0.05, -0.25, -0.2, 0.05, 0.25, 0.2;
140 ETYPE::SF::GradientT result;
141 ETYPE::SF::compute_gradient(mapped_coords, result);
157 expected << 1, 0, 0, 0, 1, 0, 0, 0, 0.5;
170 expected << 0.5, 0, 0, 0, 0.5, 0, 0, 0, 1.;
182 BOOST_AUTO_TEST_SUITE_END()
static void compute_jacobian_adjoint(const MappedCoordsT &mapped_coord, const NodesT &nodes, JacobianT &result)
const ETYPE::NodesT & m_nodes
boost::proto::terminal< SFOp< JacobianDeterminantOp > >::type const jacobian_determinant
ConstFunctor(const ETYPE::NodesT &node_list)
static void compute_jacobian(const MappedCoordsT &mapped_coord, const NodesT &nodes, MatrixType &jacobian)
static Real jacobian_determinant(const MappedCoordsT &mapped_coord, const NodesT &nodes)
ETYPE::MappedCoordsT mapped_coords
Real max(const Real a, const Real b)
Maximum between two scalars.
BOOST_AUTO_TEST_CASE(Volume)
Prism3DFixture()
common setup for each test case
Eigen::Matrix< Real, nb_nodes, Hexa3D_traits::dimension > NodesT
3D Lagrange P1 Triangular Prism Element type This class provides the lagrangian shape function descri...
~Prism3DFixture()
common tear-down for each test case
Basic Classes for Mesh applications used by COOLFluiD.
namespace holding LagrangeP1 shape functions and elements
Top-level namespace for coolfluid.
Functions to provide integration over elements.
Hexa3D_traits::SF::MappedCoordsT MappedCoordsT
const ETYPE::NodesT skewed_nodes
static Real volume(const NodesT &nodes)
const ETYPE::MappedCoordsT mapped_coords
common values accessed by all tests goes here
Eigen::Matrix< Real, Hexa3D_traits::SF::dimensionality, Hexa3D_traits::dimension > JacobianT
const ETYPE::NodesT unit_nodes
2D Lagrange P1 Triangular Element type This class provides the lagrangian shape function describing t...