Skip to content
Snippets Groups Projects
Commit 5512491f authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed getEntityMeasure specializations

parent 99ad4528
No related branches found
No related tags found
1 merge request!49Bug fixes
...@@ -116,8 +116,8 @@ getEntityMeasure( const Mesh< MeshConfig, Device > & mesh, ...@@ -116,8 +116,8 @@ getEntityMeasure( const Mesh< MeshConfig, Device > & mesh,
const auto& v1 = mesh.template getEntity< 0 >( entity.template getSubentityIndex< 0 >( 1 ) ); const auto& v1 = mesh.template getEntity< 0 >( entity.template getSubentityIndex< 0 >( 1 ) );
const auto& v2 = mesh.template getEntity< 0 >( entity.template getSubentityIndex< 0 >( 2 ) ); const auto& v2 = mesh.template getEntity< 0 >( entity.template getSubentityIndex< 0 >( 2 ) );
using Point = decltype( v0.getPoint() ); using Point = decltype( v0.getPoint() );
Point p1 = v2.getPoint() - v0.getPoint(); const Point p1 = v2.getPoint() - v0.getPoint();
Point p2 = v1.getPoint() - v0.getPoint(); const Point p2 = v1.getPoint() - v0.getPoint();
return getTriangleArea( p1, p2 ); return getTriangleArea( p1, p2 );
} }
...@@ -134,7 +134,10 @@ getEntityMeasure( const Mesh< MeshConfig, Device > & mesh, ...@@ -134,7 +134,10 @@ getEntityMeasure( const Mesh< MeshConfig, Device > & mesh,
const auto& v1 = mesh.template getEntity< 0 >( entity.template getSubentityIndex< 0 >( 1 ) ); const auto& v1 = mesh.template getEntity< 0 >( entity.template getSubentityIndex< 0 >( 1 ) );
const auto& v2 = mesh.template getEntity< 0 >( entity.template getSubentityIndex< 0 >( 2 ) ); const auto& v2 = mesh.template getEntity< 0 >( entity.template getSubentityIndex< 0 >( 2 ) );
const auto& v3 = mesh.template getEntity< 0 >( entity.template getSubentityIndex< 0 >( 3 ) ); const auto& v3 = mesh.template getEntity< 0 >( entity.template getSubentityIndex< 0 >( 3 ) );
return getTriangleArea( v2.getPoint() - v0.getPoint(), v3.getPoint() - v1.getPoint() ); using Point = decltype( v0.getPoint() );
const Point p1 = v2.getPoint() - v0.getPoint();
const Point p2 = v3.getPoint() - v1.getPoint();
return getTriangleArea( p1, p2 );
} }
template< typename VectorExpression > template< typename VectorExpression >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment