COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
utest-mesh-lagrangep2-quad2d.cpp
Go to the documentation of this file.
1 // Copyright (C) 2010-2013 von Karman Institute for Fluid Dynamics, Belgium
2 //
3 // This software is distributed under the terms of the
4 // GNU Lesser General Public License version 3 (LGPLv3).
5 // See doc/lgpl.txt and doc/gpl.txt for the license text.
6 
7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test module for the ETYPE shapefunction"
9 
10 #include <boost/assign/list_of.hpp>
11 #include <boost/test/unit_test.hpp>
12 
13 #include "common/Log.hpp"
14 
15 #include "common/Table.hpp"
19 #include "mesh/Elements.hpp"
20 
22 
23 using namespace boost::assign;
24 using namespace cf3;
25 using namespace cf3::common;
26 using namespace cf3::mesh;
27 using namespace cf3::mesh::Integrators;
28 using namespace cf3::mesh::LagrangeP2;
29 using namespace cf3::Tools::Testing;
30 
32 
33 typedef Quad2D ETYPE;
34 
36 {
40  {
41  }
42 
45  {
46  }
48 
49  const ETYPE::MappedCoordsT mapped_coords;
50  const NodesT nodes;
51 
52 };
53 
55 
56 BOOST_FIXTURE_TEST_SUITE( ETYPESuite, LagrangeP1Quad2DFixture )
57 
58 
61 {
63  nodes <<
64  0.0, 0.0,
65  1.0, 0.0,
66  1.0, 1.0,
67  0.0, 1.0,
68  0.5, 0.0,
69  1.0, 0.5,
70  0.5, 1.0,
71  0.0, 0.5,
72  0.5, 0.5;
73  BOOST_CHECK_EQUAL(ETYPE::volume(nodes), 1.0);
74 
75  ETYPE::MappedCoordsT mapped_coord;
76  ETYPE::CoordsT coord; coord << 0.5,0.5;
77  ETYPE::compute_mapped_coordinate(coord,nodes,mapped_coord);
78  CFinfo << mapped_coord.transpose() << CFendl;
79 }
80 
82 
83 BOOST_AUTO_TEST_SUITE_END()
84 
85 
#define CFinfo
these are always defined
Definition: Log.hpp:104
BOOST_AUTO_TEST_CASE(Volume)
#define CFendl
Definition: Log.hpp:109
boost::proto::terminal< SFOp< NodesOp > >::type const nodes
Eigen::Matrix< Real, nb_nodes, Hexa3D_traits::dimension > NodesT
Basic Classes for Mesh applications used by COOLFluiD.
2D Lagrange P2 Quadrilateral Element type This class provides the lagrangian shape function describin...
Definition: Quad2D.hpp:36
Top-level namespace for coolfluid.
Definition: Action.cpp:18
static void compute_mapped_coordinate(const CoordsT &coord, const NodesT &nodes, MappedCoordsT &mapped_coord)
Definition: Hexa3D.cpp:85
Eigen::Matrix< Real, Hexa3D_traits::dimension, 1 > CoordsT
Functions to provide integration over elements.
Definition: Gauss.hpp:26
~LagrangeP1Quad2DFixture()
common tear-down for each test case
namespace holding LagrangeP2 shape functions and elements
static Real volume(const NodesT &nodes)
Definition: Hexa3D.cpp:324
LagrangeP1Quad2DFixture()
common setup for each test case
Most basic kernel library.
Definition: Action.cpp:19
Send comments to:
COOLFluiD Web Admin