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

[magnitude][contained] extract return types from traits

parent d724427f
......@@ -44,8 +44,9 @@ namespace Frackit {
* are contained in the geometry or not.
*/
template<class Geometry, class Domain, std::enable_if_t<Geometry::myDimension() == 0, int> = 0>
typename Geometry::ctype computeContainedMagnitude(const Geometry& geometry,
const Domain& domain)
typename CoordinateTypeTraits<Geometry>::type
computeContainedMagnitude(const Geometry& geometry,
const Domain& domain)
{ return 0.0; }
/*!
......@@ -53,8 +54,9 @@ typename Geometry::ctype computeContainedMagnitude(const Geometry& geometry,
* geometry that is contained in a domain geometry.
*/
template<class Geometry, class Domain, std::enable_if_t<Geometry::myDimension() == 1, int> = 0>
typename Geometry::ctype computeContainedMagnitude(const Geometry& geometry,
const Domain& domain)
typename CoordinateTypeTraits<Geometry>::type
computeContainedMagnitude(const Geometry& geometry,
const Domain& domain)
{
const auto geomShape = OCCUtilities::getShape(geometry);
const auto domainShape = OCCUtilities::getShape(domain);
......@@ -75,8 +77,9 @@ typename Geometry::ctype computeContainedMagnitude(const Geometry& geometry,
* geometry that is contained in a domain geometry.
*/
template<class Geometry, class Domain, std::enable_if_t<Geometry::myDimension() == 2, int> = 0>
typename Geometry::ctype computeContainedMagnitude(const Geometry& geometry,
const Domain& domain)
typename CoordinateTypeTraits<Geometry>::type
computeContainedMagnitude(const Geometry& geometry,
const Domain& domain)
{
const auto geomShape = OCCUtilities::getShape(geometry);
const auto domainShape = OCCUtilities::getShape(domain);
......
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