Commit 0338ab90 authored by Yury Hayeu's avatar Yury Hayeu Committed by Tomáš Oberhuber
Browse files

Add optimization for the neighbour entities, which have the same orientation and dimension

parent fcfce68e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -21,7 +21,8 @@ class NeighbourGridEntityGetter {

         const Coordinate coordinate = entity.getCoordinates() + offset;
         const int orientation = TNL::min(orientationsCount - 1, entity.getOrientation());
         const Coordinate basis = entity.getMesh().template getBasis<NeighbourEntityDimension>(orientation);
         const Coordinate basis = orientation == entity.getOrientation() && ParentEntityDimension == NeighbourEntityDimension ?
            entity.getBasis() : entity.getMesh().template getBasis<NeighbourEntityDimension>(orientation);

         TNL_ASSERT_GE(coordinate, Coordinate(0), "wrong coordinate");
         TNL_ASSERT_LT(coordinate, entity.getMesh().getDimensions() + basis, "wrong coordinate");
@@ -47,7 +48,8 @@ class NeighbourGridEntityGetter {

         const Coordinate coordinate = entity.getCoordinates() + Coordinate(Steps...);
         const int orientation = TNL::min(orientationsCount - 1, entity.getOrientation());
         const Coordinate basis = entity.getMesh().template getBasis<NeighbourEntityDimension>(orientation);
         const Coordinate basis = orientation == entity.getOrientation() && ParentEntityDimension == NeighbourEntityDimension ?
            entity.getBasis() : entity.getMesh().template getBasis<NeighbourEntityDimension>(orientation);

         TNL_ASSERT_GE(coordinate, Coordinate(0), "wrong coordinate");
         TNL_ASSERT_LT(coordinate, entity.getMesh().getDimensions() + basis, "wrong coordinate");
+1 −1

File changed.

Contains only whitespace changes.