7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test module for cf3::mesh::LagrangeSF"
10 #include <boost/assign/list_of.hpp>
11 #include <boost/test/unit_test.hpp>
54 boost::shared_ptr< MeshReader > meshreader = build_component_abstract_type<MeshReader>(
"cf3.mesh.neu.Reader",
"meshreader");
57 meshreader->read_mesh_into(
"../../resources/quadtriag.neu",*
mesh2d);
69 BOOST_FOREACH(
Elements& region, find_components_recursively<Elements>(*mesh2d))
86 const Elements& firstRegion = get_first_region();
89 const Uint element_count = conn.
size();
91 for(
Uint element = 0; element != element_count; ++element)
93 fill(node_vector, coords, conn[element]);
94 for(
Uint node_idx = 0; node_idx != conn.
row_size(); ++node_idx)
98 BOOST_CHECK_EQUAL(node_vector[node_idx][xyz], coords[conn[element][node_idx]][xyz]);
106 const Elements& firstRegion = get_first_region();
109 const Uint element_count = conn.
size();
111 for(
Uint element = 0; element != element_count; ++element)
113 fill(node_matrix, coords, conn[element]);
114 for(
Uint node_idx = 0; node_idx != conn.
row_size(); ++node_idx)
118 BOOST_CHECK_EQUAL(node_matrix(node_idx, xyz), coords[conn[element][node_idx]][xyz]);
128 boost::shared_ptr<Dictionary> geometry = allocate_component<ContinuousDictionary>(
"geometry_fieds");
139 geometry->resize(10);
140 BOOST_CHECK_EQUAL(geometry->coordinates().size() , 10u);
141 BOOST_CHECK_EQUAL(geometry->coordinates().row_size() , 2u);
142 BOOST_CHECK_EQUAL(geometry->rank().size() , 10u);
143 BOOST_CHECK_EQUAL(geometry->glb_idx().size() , 10u);
146 BOOST_CHECK_EQUAL(geometry->glb_elem_connectivity().size() , 10u);
151 BOOST_AUTO_TEST_SUITE_END()
Space & geometry_space() const
Elements & get_first_region()
Nodes_Fixture()
common setup for each test case
~Nodes_Fixture()
common tear-down for each test case
const Field & coordinates() const
Dictionary & geometry_fields() const
Const access to the coordinates.
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > RealMatrix
Dynamic sized matrix of Real scalars.
Basic Classes for Mesh applications used by COOLFluiD.
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealVector
Dynamic sized column vector.
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.
void add_tag(const std::string &tag)
Functions to provide integration over elements.
Uint row_size(Uint i=0) const
boost::proto::terminal< SFOp< CoordinatesOp > >::type const coordinates
void set_row_size(const Uint nb_cols)
common::Component & root() const
Gives the default root component.
unsigned int Uint
typedef for unsigned int
void create_descriptor(const std::string &description, const Uint dimension=0)
BOOST_AUTO_TEST_CASE(FillVector)
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
bool is_not_null(T ptr)
predicate for comparison to nullptr
Handle< Mesh > mesh2d
common values accessed by all tests goes here