7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test module for the Line1D shapefunction"
10 #include <boost/assign/list_of.hpp>
11 #include <boost/test/unit_test.hpp>
38 mapped_coords((
ETYPE::MappedCoordsT() << .2).finished()),
75 boost::shared_ptr< ElementType > line1d = build_component_abstract_type<ElementType>(
"cf3.mesh.LagrangeP1.Line1D",
"line1d");
76 BOOST_CHECK_EQUAL(line1d->volume(nodes_line1D),1.);
81 const ETYPE::SF::ValueT reference_result(0.4, 0.6);
82 ETYPE::SF::ValueT result;
83 Line1D::SF::compute_value(mapped_coords, result);
94 Line1D::compute_mapped_coordinate(test_coords,
nodes, result);
101 ETYPE::SF::GradientT result;
102 ETYPE::SF::GradientT expected;
103 expected(0,0) = -0.5;
105 Line1D::SF::compute_gradient(mapped_coords, result);
121 Line1D::compute_jacobian(mapped_coords,
nodes, result);
132 Line1D::compute_jacobian_adjoint(mapped_coords,
nodes, result);
140 ConstFunctor ftor(
nodes);
145 cf3::Real result4 = 0.0;
146 cf3::Real result8 = 0.0;
147 cf3::Real result16 = 0.0;
148 cf3::Real result32 = 0.0;
150 gauss_integrate<1, GeoShape::LINE>(ftor, ftor.mapped_coords,
result1);
151 gauss_integrate<2, GeoShape::LINE>(ftor, ftor.mapped_coords,
result2);
152 gauss_integrate<4, GeoShape::LINE>(ftor, ftor.mapped_coords, result4);
153 gauss_integrate<8, GeoShape::LINE>(ftor, ftor.mapped_coords, result8);
154 gauss_integrate<16, GeoShape::LINE>(ftor, ftor.mapped_coords, result16);
155 gauss_integrate<32, GeoShape::LINE>(ftor, ftor.mapped_coords, result32);
167 BOOST_AUTO_TEST_SUITE_END()
ConstFunctor(const ETYPE::NodesT &node_list)
boost::proto::terminal< SFOp< JacobianDeterminantOp > >::type const jacobian_determinant
boost::proto::terminal< SFOp< VolumeOp > >::type const volume
Static terminals that can be used in proto expressions.
Real max(const Real a, const Real b)
Maximum between two scalars.
boost::proto::terminal< SFOp< NodesOp > >::type const nodes
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > RealMatrix
Dynamic sized matrix of Real scalars.
Eigen::Matrix< Real, nb_nodes, Hexa3D_traits::dimension > NodesT
Lagrange P1 Triangular Element type This class provides the lagrangian shape function describing the ...
Basic Classes for Mesh applications used by COOLFluiD.
namespace holding LagrangeP1 shape functions and elements
Top-level namespace for coolfluid.
~LagrangeP1Line1DFixture()
common tear-down for each test case
Eigen::Matrix< Real, Hexa3D_traits::dimension, 1 > CoordsT
ETYPE::MappedCoordsT mapped_coords
BOOST_AUTO_TEST_CASE(Volume)
LagrangeP1Line1DFixture()
common setup for each test case
Functions to provide integration over elements.
const ETYPE::NodesT nodes
Hexa3D_traits::SF::MappedCoordsT MappedCoordsT
const ETYPE::NodesT & m_nodes
Eigen::Matrix< Real, Hexa3D_traits::SF::dimensionality, Hexa3D_traits::dimension > JacobianT
Most basic kernel library.
2D Lagrange P1 Triangular Element type This class provides the lagrangian shape function describing t...
const ETYPE::MappedCoordsT mapped_coords
common values accessed by all tests goes here