7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Tetrahedral mesh testing on CGAL generated meshes"
10 #include <boost/test/unit_test.hpp>
12 #include <boost/assign/list_of.hpp>
13 #include <boost/foreach.hpp>
14 #include <boost/mpl/for_each.hpp>
46 sphere = allocate_component<Mesh>(
"sphere");
49 sphere->write_mesh(
URI(
"sphere.vtk"));
53 static boost::shared_ptr< Mesh >
sphere;
71 template<
typename FunctorT>
80 template <
typename EType >
81 void operator() ( EType&
T )
93 typename EType::NodesT
nodes;
94 fill(nodes, coords, elem );
104 template<
typename RangeT,
typename FunctorT>
106 BOOST_FOREACH(
const Elements& region, range) {
114 template<
typename NodesT,
typename ElementT>
136 BOOST_CHECK_CLOSE(4.1627113937322715, volume, 0.1);
142 BOOST_AUTO_TEST_SUITE_END()
#define CFinfo
these are always defined
void create_mesh(const ImplicitFunction &function, Mesh &mesh, const MeshParameters parameters)
Using the given implicit function delimiting a domain,.
static boost::shared_ptr< Mesh > sphere
void operator()(const NodesT &nodes, const ElementT &element)
boost::proto::terminal< SFOp< VolumeOp > >::type const volume
Static terminals that can be used in proto expressions.
LoopElems(const Elements &aregion, FunctorT afunctor)
BOOST_AUTO_TEST_CASE(Channel3D)
Sphere around the origin with radius r.
Classes for CGAL mesh format operations.
boost::proto::terminal< SFOp< NodesOp > >::type const nodes
Basic Classes for Mesh applications used by COOLFluiD.
Top-level namespace for coolfluid.
void fill(NodeValuesT &to_fill, const common::Table< Real > &data_array, const RowT &element_row, const Uint start=0)
Fill STL-vector like per-node data storage.
Component holding a 2 dimensional array of a templated type.
BOOST_GLOBAL_FIXTURE(GlobalFixture) BOOST_AUTO_TEST_CASE(MeshStats)
Accumulate some statistics about the cell volumes.
VolumeFunctor(Real &avolume)
void loop_over_regions(const RangeT &range, FunctorT functor)
Looping over all elements in a range of regions.
Simple test functor to compute the volume.
Most basic kernel library.
Parameters for mesh generation, as defined in the CGAL manual.
Use a global fixture, so mesh creation happens only once.