7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test module for cf3::mesh::BlockMesh::BlockMeshMPI"
10 #include <boost/assign.hpp>
11 #include <boost/test/unit_test.hpp>
35 BOOST_AUTO_TEST_SUITE( BlockMesh2D )
46 const Real half_height = 1.;
47 const Real ratio = 0.2;
54 << length << -half_height
58 << length << half_height;
67 << 1. << 1. << ratio << ratio;
80 BOOST_CHECK_NO_THROW(mesh.
write_mesh(
"grid-2d.msh"));
90 BOOST_FOREACH(
const Field& field, find_components_recursively<Field>(*block_mesh))
92 if(field.
name() !=
"coordinates")
93 fields.push_back(field.
uri());
97 mesh_writer->
options().
set(
"mesh",block_mesh->handle<
Mesh const>());
99 mesh_writer->
options().
set(
"enable_overlap",
true);
100 mesh_writer->
options().
set(
"file",
URI(
"grid-2d-parblocks.msh"));
106 BOOST_AUTO_TEST_SUITE_END()
void write_mesh(const common::URI &file, const std::vector< common::URI > fields=std::vector< common::URI >())
virtual void execute()
execute the action
BOOST_AUTO_TEST_CASE(Grid2D)
URI uri() const
Construct the full path.
const std::string & name() const
Access the name of the component.
Handle< common::Table< Uint > > create_block_subdivisions()
void partition_blocks(const Uint nb_partitions, const Uint direction)
Handle< common::Table< Uint > > create_blocks(const Uint nb_blocks)
Create the table that holds the blocks.
void create_mesh(Mesh &mesh)
Basic Classes for Mesh applications used by COOLFluiD.
Top-level namespace for coolfluid.
Handle< common::Table< Real > > create_block_gradings()
Handle< common::Table< Uint > > create_patch(const std::string &name, const Uint nb_faces)
std::vector< URI > fields
Handle< Mesh > create_block_mesh()
Create the volume block mesh.
common::Component & root() const
Gives the default root component.
common::Environment & environment() const
unsigned int Uint
typedef for unsigned int
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.
Handle< common::Table< Real > > create_points(const Uint dimensions, const Uint nb_points)
Create the table that holds the points for the blocks.