COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
utest-mesh-transformer.cpp
Go to the documentation of this file.
1 
2 // Copyright (C) 2010-2013 von Karman Institute for Fluid Dynamics, Belgium
3 //
4 // This software is distributed under the terms of the
5 // GNU Lesser General Public License version 3 (LGPLv3).
6 // See doc/lgpl.txt and doc/gpl.txt for the license text.
7 
8 #define BOOST_TEST_DYN_LINK
9 #define BOOST_TEST_MODULE "Tests mesh reading"
10 
11 #include <boost/test/unit_test.hpp>
12 #include <boost/foreach.hpp>
13 #include <boost/regex.hpp>
14 
15 #include "common/OptionT.hpp"
16 #include "common/Log.hpp"
17 #include "common/Group.hpp"
19 
20 
21 #include "mesh/Domain.hpp"
22 #include "mesh/Mesh.hpp"
23 #include "mesh/Region.hpp"
24 #include "mesh/Elements.hpp"
25 #include "common/Table.hpp"
26 #include "mesh/MeshReader.hpp"
27 #include "mesh/MeshWriter.hpp"
28 #include "mesh/MeshTransformer.hpp"
29 
30 using namespace std;
31 using namespace boost;
32 using namespace cf3;
33 using namespace cf3::mesh;
34 using namespace cf3::common;
35 
37 
39 {
42  {
43  m_argc = boost::unit_test::framework::master_test_suite().argc;
44  m_argv = boost::unit_test::framework::master_test_suite().argv;
45 
46  root = allocate_component<Group>("Root");
47  reader = build_component_abstract_type<MeshReader>("cf3.mesh.neu.Reader","MyReader");
48  domain = root->create_component<Domain>("MyDom");
49 
50  root->add_component( reader );
51 
52  ExceptionManager::instance().ExceptionOutputs = false;
53  ExceptionManager::instance().ExceptionDumps = false;
54  }
55 
58  {
59  }
60 
62  boost::shared_ptr< Component > root;
63  boost::shared_ptr< MeshReader > reader;
65 
68  int m_argc;
69  char** m_argv;
70 
71 };
72 
74 
76 
77 BOOST_FIXTURE_TEST_SUITE( MeshTransformer_TestSuite, MeshTransformer_Fixture )
78 
79 
82 {
83  // boost::shared_ptr< MeshReader > meshreader = build_component_abstract_type<MeshReader>("cf3.mesh.neu.Reader","meshreader");
84  //
85  // // the file to read from
86  // boost::filesystem::path fp_in ("../../resources/quadtriag.neu");
87  //
88  // // the mesh to store in
89  //
90  // meshreader->do_read_mesh_into(fp_in,mesh);
91 
92 }
93 
95 
96 BOOST_AUTO_TEST_CASE( test_arguments )
97 {
98  boost::shared_ptr< MeshTransformer > transformer = build_component_abstract_type<MeshTransformer>("cf3.mesh.actions.Info","info");
99 
100  std::vector<std::string> args;
101  args.push_back("variable:bool=true");
102  args.push_back("array_vars:array<bool>=true,false,true");
103  //args.push_back("center:double=[x,y,z]");
104 
105  //transformer->configure(args);
106 
107 }
108 
110 
111 BOOST_AUTO_TEST_SUITE_END()
112 
113 
external boost library namespace
int m_argc
common values accessed by all tests goes here
BOOST_AUTO_TEST_CASE(read_mesh)
STL namespace.
tuple root
Definition: coolfluid.py:24
Basic Classes for Mesh applications used by COOLFluiD.
Top-level namespace for coolfluid.
Definition: Action.cpp:18
boost::shared_ptr< Component > root
possibly common functions used on the tests below
~MeshTransformer_Fixture()
common tear-down for each test case
MeshTransformer_Fixture()
common setup for each test case
boost::shared_ptr< MeshReader > reader
Most basic kernel library.
Definition: Action.cpp:19
Send comments to:
COOLFluiD Web Admin