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/lexical_cast.hpp>
12 #include <boost/test/unit_test.hpp>
48 int argc = boost::unit_test::framework::master_test_suite().argc;
49 char** argv = boost::unit_test::framework::master_test_suite().argv;
69 if(!
domain().get_child(
"mesh"))
71 m_mesh =
domain().create_component<
Mesh>(
"mesh");
115 const Real half_height = 0.5;
116 const Real width = 6.;
117 const Real ratio = 0.1;
130 else if(nb_procs == 32)
135 else if(nb_procs == 64)
140 else if(nb_procs == 128)
156 Dictionary& elems_P0 =
mesh().create_discontinuous_space(
"elems_P0",
"cf3.mesh.LagrangeP0");
161 Entities& elements = *elements_handle;
162 const Space& space = elems_P0.
space(elements);
166 elem_rank[field_idx][0] = elements.
rank()[
elem];
174 mesh().write_mesh(
"utest-blockmesh-3d-mpi_output.pvtu",
fields);
179 BOOST_AUTO_TEST_SUITE_END()
Field & create_field(const std::string &name, const Uint cols)
Create a new field in this group.
Handle< Domain > m_domain
const std::vector< Handle< Entities > > & entities_range() const
URI uri() const
Construct the full path.
#define boost_foreach
lowercase version of BOOST_FOREACH
common::List< Uint > & rank()
Uint rank() const
Return rank, additionally, if is_init==0.
void partition_blocks(const Uint nb_partitions, const Uint direction)
void create_mesh(Mesh &mesh)
Uint size() const
Return the number of processes, or 1 if is_init==0.
Uint size() const
return the number of elements
Basic Classes for Mesh applications used by COOLFluiD.
Handle< Component > get_child(const std::string &name)
void init(int argc=0, char **args=0)
Top-level namespace for coolfluid.
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
BOOST_AUTO_TEST_CASE(Setup)
static Comm & instance()
Return a reference to the current PE.
Base class for defining CF components.
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