COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
utest-vtklegacy-writer.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::tecplot::Writer"
9 
10 #include <boost/test/unit_test.hpp>
11 
12 #include "common/Log.hpp"
13 #include "common/Core.hpp"
14 
15 #include "mesh/MeshWriter.hpp"
16 
18 
19 #include "common/List.hpp"
20 #include "common/Table.hpp"
21 #include "mesh/Dictionary.hpp"
22 
23 using namespace cf3;
24 using namespace cf3::mesh;
25 using namespace cf3::common;
26 
28 
29 BOOST_AUTO_TEST_SUITE( VTKLegacySuite )
30 
31 
34 {
36 
37  Handle<Mesh> mesh = root.create_component<Mesh>("mesh");
38  Tools::MeshGeneration::create_rectangle(*mesh, 5., 5., 5, 5);
39 
40  boost::shared_ptr< MeshWriter > vtk_writer = build_component_abstract_type<MeshWriter>("cf3.mesh.VTKLegacy.Writer","meshwriter");
41  vtk_writer->write_from_to(*mesh,"grid.vtk");
42 
43  BOOST_CHECK(true);
44 }
45 
47 
48 BOOST_AUTO_TEST_SUITE_END()
49 
50 
BOOST_AUTO_TEST_CASE(WriteGrid)
tuple root
Definition: coolfluid.py:24
void create_rectangle(Mesh &mesh, const Real x_len, const Real y_len, const Uint x_segments, const Uint y_segments)
Create a rectangular, 2D, quad-only mesh. No buffer for creation.
Basic Classes for Mesh applications used by COOLFluiD.
Top-level namespace for coolfluid.
Definition: Action.cpp:18
common::Component & root() const
Gives the default root component.
Definition: Core.cpp:145
static Core & instance()
Definition: Core.cpp:37
Base class for defining CF components.
Definition: Component.hpp:82
Handle< Component > create_component(const std::string &name, const std::string &builder)
Build a (sub)component of this component using the extended type_name of the component.
Definition: Component.cpp:568
Most basic kernel library.
Definition: Action.cpp:19
Send comments to:
COOLFluiD Web Admin