7 #include <boost/mpl/vector.hpp>
8 #include <boost/mpl/for_each.hpp>
59 template<
typename NumberT>
62 apply< common::List<NumberT> >();
63 apply< common::Table<NumberT> >();
66 template<
typename ArrayT>
69 BOOST_FOREACH(
const ArrayT& left_array, common::find_components_recursively<ArrayT>(
m_left))
71 std::string relative_path = left_array.uri().path();
72 boost::replace_first(relative_path,
m_left.
uri().
path() +
"/",
"");
88 BOOST_FOREACH(
const ArrayT& right_array, common::find_components_recursively<ArrayT>(
m_right))
90 std::string relative_path = right_array.uri().path();
91 boost::replace_first(relative_path,
m_right.
uri().
path() +
"/",
"");
114 .description(
"Left mesh in the comparison")
118 .pretty_name(
"Right")
119 .description(
"Right mesh in the comparison")
123 .pretty_name(
"Max ULPs")
124 .description(
"Maximum distance allowed between floating point numbers")
128 .pretty_name(
"Zero Threshold")
129 .description(
"Floating point numbers smaller than this are considered to be zero")
150 array_differ->options().set(
"max_ulps",
options().value<Uint>(
"max_ulps"));
151 array_differ->options().set(
"zero_threshold",
options().value<Real>(
"zero_threshold"));
154 typedef boost::mpl::vector5<int, Uint, float, double, bool> allowed_types;
155 bool mesh_equal =
true;
156 boost::mpl::for_each<allowed_types>(
detail::DoDiff(*left, *right, *array_differ, mesh_equal));
std::string name(ComponentWrapper &self)
virtual void execute()
execute the action
bool is_null(T ptr)
predicate for comparison to nullptr
Safe pointer to an object. This is the supported method for referring to components.
Helper class to create the Builder and place it in the factory.
MeshDiff(const std::string &name)
common::ComponentBuilder< MeshDiff, common::Action, mesh::actions::LibActions > MeshDiff_Builder
URI uri() const
Construct the full path.
DoDiff(const Mesh &left, const Mesh &right, common::Action &differ, bool &mesh_equal)
PropertyList & add(const std::string &name, const boost::any &value)
adds a property to the list
Real e()
Definition of the Unit charge [C].
void operator()(const NumberT)
Handle< Component > access_component(const URI &path) const
Common_API std::string to_str(const T &v)
Converts to std::string.
PropertyList & properties()
TYPE value(const std::string &pname) const
Handle< Component > get_child(const std::string &name)
Top-level namespace for coolfluid.
const TYPE value(const std::string &opt_name) const
Get the value of the option with given name.
void set(const std::string &pname, const boost::any &val)
Component that executes an action. Implementation of the IAction interface as a component, exposing the execute function as a signal.
virtual void execute()=0
execute the action
common::Action & m_differ
SelectOptionType< T >::type & add(const std::string &name, const T &default_value=T())
static Comm & instance()
Return a reference to the current PE.
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.