7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test module for the ETYPE shape function"
10 #include <boost/assign/list_of.hpp>
11 #include <boost/test/unit_test.hpp>
37 mapped_coords(0.1, 0.8, 0.45),
41 0.830434, 0.885201, 0.188108,
42 0.89653, 0.899961, 0.297475,
43 0.888273, 0.821744, 0.211428,
44 0.950439, 0.904872, 0.20736).finished()
82 const ETYPE::SF::ValueT reference_result(-0.35, 0.1, 0.8, 0.45);
83 ETYPE::SF::ValueT result;
84 ETYPE::SF::compute_value(mapped_coords, result);
93 const ETYPE::CoordsT reference_result(1.779178467272182762
e-02, 4.106555656123735409
e-01, 5.386286149811901902
e-01);
103 ConstFunctor ftor(
nodes);
105 gauss_integrate<1, GeoShape::TETRA>(ftor, ftor.mapped_coords, result);
106 BOOST_CHECK_CLOSE(result,
volume, 0.0000000001);
111 ETYPE::SF::GradientT expected;
112 expected(
XX, 0) = -1.;
113 expected(
YY, 0) = -1.;
114 expected(
ZZ, 0) = -1.;
115 expected(
XX, 1) = 1.;
116 expected(
YY, 1) = 0.;
117 expected(
ZZ, 1) = 0.;
118 expected(
XX, 2) = 0.;
119 expected(
YY, 2) = 1.;
120 expected(
ZZ, 2) = 0.;
121 expected(
XX, 3) = 0.;
122 expected(
YY, 3) = 0.;
123 expected(
ZZ, 3) = 1.;
124 ETYPE::SF::GradientT result;
125 ETYPE::SF::compute_gradient(mapped_coords, result);
135 BOOST_CHECK_CLOSE(result,
volume, 0.00001);
141 expected(0,0) = 6.609600000000004361e-02;
142 expected(0,1) = 1.475999999999999535e-02;
143 expected(0,2) = 1.093669999999999920e-01;
144 expected(1,0) = 5.783899999999997377e-02;
145 expected(1,1) = -6.345699999999998564e-02;
146 expected(1,2) = 2.332000000000000739e-02;
147 expected(2,0) = 1.200050000000000283e-01;
148 expected(2,1) = 1.967099999999999405e-02;
149 expected(2,2) = 1.925199999999999134e-02;
160 expected(0,0) = -1.680401883999999273e-03;
161 expected(0,1) = 1.867198736999999475e-03;
162 expected(0,2) = 7.284304918999997755e-03;
163 expected(1,0) = 1.685000172000002431e-03;
164 expected(1,1) = -1.185210664300000161e-02;
165 expected(1,2) = 4.784319192999994877e-03;
166 expected(2,0) = 8.752908253999998334e-03;
167 expected(2,1) = 4.710993839999994925e-04;
168 expected(2,2) = -5.047957512000001042e-03;
192 BOOST_AUTO_TEST_SUITE_END()
static void compute_jacobian_adjoint(const MappedCoordsT &mapped_coord, const NodesT &nodes, JacobianT &result)
2D Lagrange P1 Triangular Element type This class provides the lagrangian shape function describing t...
static void compute_jacobian(const MappedCoordsT &mapped_coord, const NodesT &nodes, MatrixType &jacobian)
static Real jacobian_determinant(const MappedCoordsT &mapped_coord, const NodesT &nodes)
boost::proto::terminal< SFOp< VolumeOp > >::type const volume
Static terminals that can be used in proto expressions.
ConstFunctor(const NodesT &node_list)
static bool is_coord_in_element(const CoordsT &coord, const NodesT &nodes)
ETYPE::CoordsT mapped_coords
Real max(const Real a, const Real b)
Maximum between two scalars.
Real e()
Definition of the Unit charge [C].
boost::proto::terminal< SFOp< NodesOp > >::type const nodes
Eigen::Matrix< Real, nb_nodes, Hexa3D_traits::dimension > NodesT
~LagrangeP1Tetra3DFixture()
common tear-down for each test case
LagrangeP1Tetra3DFixture()
common setup for each test case
Basic Classes for Mesh applications used by COOLFluiD.
namespace holding LagrangeP1 shape functions and elements
Top-level namespace for coolfluid.
static void compute_mapped_coordinate(const CoordsT &coord, const NodesT &nodes, MappedCoordsT &mapped_coord)
Eigen::Matrix< Real, Hexa3D_traits::dimension, 1 > CoordsT
const ETYPE::MappedCoordsT mapped_coords
common values accessed by all tests goes here
Functions to provide integration over elements.
Hexa3D_traits::SF::MappedCoordsT MappedCoordsT
BOOST_AUTO_TEST_CASE(ShapeFunction)
Eigen::Matrix< Real, Hexa3D_traits::SF::dimensionality, Hexa3D_traits::dimension > JacobianT
static const Uint nb_nodes