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>
40 BOOST_AUTO_TEST_SUITE( BlockMesh2D )
46 PE::Comm::instance().
init(boost::unit_test::framework::master_test_suite().argc, boost::unit_test::framework::master_test_suite().argv);
57 const Real half_height = 1.;
58 const Real ratio = 0.2;
65 << length << -half_height
69 << length << half_height;
78 << 1. << 1. << ratio << ratio;
99 Entities& elements = *elements_handle;
100 const Space& space = elems_P0.
space(elements);
104 elem_rank[field_idx][0] = elements.
rank()[
elem];
110 fields.push_back(elem_rank.
uri());
111 mesh.
write_mesh(
"utest-blockmesh-2d-mpi_output.pvtu", fields);
116 BOOST_AUTO_TEST_SUITE_END()
void write_mesh(const common::URI &file, const std::vector< common::URI > fields=std::vector< common::URI >())
Field & create_field(const std::string &name, const Uint cols)
Create a new field in this group.
const std::vector< Handle< Entities > > & entities_range() const
Safe pointer to an object. This is the supported method for referring to components.
Dictionary & create_discontinuous_space(const std::string &space_name, const std::string &space_lib_name, const std::vector< Handle< Entities > > &entities)
URI uri() const
Construct the full path.
#define boost_foreach
lowercase version of BOOST_FOREACH
common::List< Uint > & rank()
Handle< common::Table< Uint > > create_block_subdivisions()
Uint rank() const
Return rank, additionally, if is_init==0.
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)
Uint size() const
Return the number of processes, or 1 if is_init==0.
BOOST_AUTO_TEST_CASE(Grid2D)
Uint size() const
return the number of elements
Basic Classes for Mesh applications used by COOLFluiD.
void init(int argc=0, char **args=0)
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)
const Space & space(const Entities &entities) const
Return the space of given entities.
std::vector< URI > fields
common::Component & root() const
Gives the default root component.
unsigned int Uint
typedef for unsigned int
static Comm & instance()
Return a reference to the current PE.
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.
Connectivity & connectivity()
connectivity table to dictionary entries
Handle< common::Table< Real > > create_points(const Uint dimensions, const Uint nb_points)
Create the table that holds the points for the blocks.