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>
32 using namespace boost;
44 m_argc = boost::unit_test::framework::master_test_suite().argc;
45 m_argv = boost::unit_test::framework::master_test_suite().argv;
72 boost::shared_ptr< MeshReader > meshreader = build_component_abstract_type<MeshReader>(
"cf3.mesh.neu.Reader",
"meshreader");
74 meshreader->options().set(
"read_groups",
true);
80 meshreader->read_mesh_into(
"../../resources/quadtriag.neu",mesh);
83 Field& nodal = mesh.geometry_fields().create_field(
"nodal",
"nodal[vector]");
91 Dictionary& elems_P0 = mesh.create_discontinuous_space(
"elems_P0",
"cf3.mesh.LagrangeP0");
93 Field& cell_centred = elems_P0.
create_field(
"cell_centred",
"cell_centred[vector]");
97 cell_centred[
e][j] =
e;
101 fields.push_back(nodal.
uri());
102 fields.push_back(cell_centred.
uri());
103 fields.push_back(mesh.geometry_fields().coordinates().uri());
106 write_mesh.
write_mesh(mesh,
"quadtriag.plt",fields);
107 write_mesh.
write_mesh(mesh,
"quadtriag.msh",fields);
194 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.
external boost library namespace
void write_mesh(const Mesh &, const common::URI &file, const std::vector< common::URI > &fields)
TecWriterTests_Fixture()
common setup for each test case
URI uri() const
Construct the full path.
Real e()
Definition of the Unit charge [C].
Handle< Component const > root() const
void write_mesh(const common::URI &file)
write the active mesh
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
math::VariablesDescriptor & descriptor() const
void set(const std::string &pname, const boost::any &val)
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.
Most basic kernel library.
~TecWriterTests_Fixture()
common tear-down for each test case