7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test module for cf3::mesh::tecplot::Writer"
10 #include <boost/test/unit_test.hpp>
30 using namespace boost;
42 m_argc = boost::unit_test::framework::master_test_suite().argc;
43 m_argv = boost::unit_test::framework::master_test_suite().argv;
70 boost::shared_ptr< MeshReader > meshreader = build_component_abstract_type<MeshReader>(
"cf3.mesh.neu.Reader",
"meshreader");
72 meshreader->options().set(
"read_groups",
true);
75 Mesh&
mesh = *Core::instance().root().create_component<
Mesh>(
"mesh" );
77 meshreader->read_mesh_into(
"../../resources/quadtriag.neu",mesh);
97 cell_centred[
e][j] =
e;
112 fields.push_back(nodal.
uri());
113 fields.push_back(cell_centred.
uri());
114 fields.push_back(nodesP2.
uri());
115 boost::shared_ptr< MeshWriter > tec_writer = build_component_abstract_type<MeshWriter>(
"cf3.mesh.tecplot.Writer",
"meshwriter");
116 tec_writer->options().set(
"cell_centred",
true);
117 tec_writer->options().set(
"mesh",mesh.
handle<
Mesh const>());
118 tec_writer->options().set(
"fields",fields);
119 tec_writer->options().set(
"file",
URI(
"quadtriag.plt"));
120 tec_writer->execute();
122 std::vector<URI> regions;
123 regions.push_back(mesh.
uri()/
"topology/inlet");
124 regions.push_back(mesh.
uri()/
"topology/outlet");
125 regions.push_back(mesh.
uri()/
"topology/wall");
126 regions.push_back(mesh.
uri()/
"topology/liquid");
127 tec_writer->options().set(
"regions",regions);
128 tec_writer->options().set(
"file",
URI(
"quadtriag_filtered.plt"));
129 tec_writer->execute();
213 BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(read_2d_mesh)
Field & create_field(const std::string &name, const Uint cols)
Create a new field in this group.
Field & coordinates() const
Dictionary & create_discontinuous_space(const std::string &space_name, const std::string &space_lib_name, const std::vector< Handle< Entities > > &entities)
external boost library namespace
int m_argc
possibly common functions used on the tests below
Dictionary & create_continuous_space(const std::string &space_name, const std::string &space_lib_name, const std::vector< Handle< Entities > > &entities)
TecWriterTests_Fixture()
common setup for each test case
URI uri() const
Construct the full path.
Real e()
Definition of the Unit charge [C].
Basic Classes for Mesh applications used by COOLFluiD.
Top-level namespace for coolfluid.
Uint row_size(Uint i=0) const
std::vector< URI > fields
unsigned int Uint
typedef for unsigned int
Handle< Component > handle()
Get a handle to the component.
Dictionary & geometry_fields() const
Most basic kernel library.
~TecWriterTests_Fixture()
common tear-down for each test case