COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
utest-mesh-functions.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 cf3::mesh::BoundingBox"
9 
10 #include <boost/assign/list_of.hpp>
11 #include <boost/test/unit_test.hpp>
12 
13 #include "common/Log.hpp"
14 #include "common/OptionList.hpp"
15 #include "common/PropertyList.hpp"
16 
17 #include "common/Core.hpp"
18 #include "common/Environment.hpp"
19 
20 #include "mesh/Functions.hpp"
21 #include "mesh/LagrangeP1/Quad.hpp"
22 #include "mesh/LagrangeP2/Quad.hpp"
23 
24 using namespace cf3;
25 
27 
28 BOOST_AUTO_TEST_SUITE( MeshFunctionsTestSuite )
29 
30 
32 BOOST_AUTO_TEST_CASE( TestNearestNodeMapping )
33 {
34  std::vector<Uint> node_mapping;
35  std::vector<bool> is_interior;
36 
38 
39  const std::vector<Uint> expected_mapping = boost::assign::list_of(0)(1)(2)(3)(0)(1)(2)(3)(0);
40  const Uint nb_target_points = mesh::LagrangeP2::Quad::nb_nodes;
41  for(Uint point_idx = 0; point_idx != nb_target_points; ++point_idx)
42  {
43  BOOST_CHECK_EQUAL(node_mapping[point_idx], expected_mapping[point_idx]);
44  BOOST_CHECK(!(is_interior[point_idx] && point_idx != 8));
45  }
46 }
47 
49 
50 BOOST_AUTO_TEST_SUITE_END()
51 
52 
void nearest_node_mapping(const RealMatrix &support_local_coords, const RealMatrix &source_local_coords, std::vector< Uint > &node_mapping, std::vector< bool > &is_interior)
Definition: Functions.cpp:116
static const RealMatrix & local_coordinates()
Definition: Quad.cpp:54
Top-level namespace for coolfluid.
Definition: Action.cpp:18
BOOST_AUTO_TEST_CASE(TestNearestNodeMapping)
static const RealMatrix & local_coordinates()
Definition: Quad.cpp:79
unsigned int Uint
typedef for unsigned int
Definition: CF.hpp:90
Send comments to:
COOLFluiD Web Admin