Commit d724427f authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[magnitude][contained] add overload for generic geometry

parent b0052dbb
......@@ -27,8 +27,13 @@
#include <type_traits>
#include <frackit/precision/defaultepsilon.hh>
#include <frackit/occ/breputilities.hh>
#include <frackit/common/extractctype.hh>
#include <frackit/precision/defaultepsilon.hh>
#include <frackit/geometry/geometry.hh>
#include <frackit/geometryutilities/applyongeometry.hh>
#include "magnitude.hh"
namespace Frackit {
......@@ -89,6 +94,23 @@ typename Geometry::ctype computeContainedMagnitude(const Geometry& geometry,
return size;
}
/*!
* \brief TODO doc
*/
template<class Domain>
typename CoordinateTypeTraits<Domain>::type
computeContainedMagnitude(std::shared_ptr<Geometry> geometry,
const Domain& domain)
{
using ctype = typename CoordinateTypeTraits<Domain>::type;
// lambda to evaluate the contained magnitude
auto doComputation = [&] (const auto& geometry) -> ctype
{ return computeContainedMagnitude(geometry, domain); };
return applyOnGeometry(doComputation, geometry);
}
} // end namespace Frackit
#endif // FRACKIT_CONTAINED_MAGNITUDE_HH
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment