From 4a717040e444b9e7cd4061e27d1c80d6cd6ee354 Mon Sep 17 00:00:00 2001 From: Tomas Oberhuber <tomas.oberhuber@fjfi.cvut.cz> Date: Sat, 22 Jun 2013 15:45:05 +0200 Subject: [PATCH] Fixing the linear grid geometry. --- src/implementation/mesh/tnlLinearGridGeometry_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/implementation/mesh/tnlLinearGridGeometry_impl.h b/src/implementation/mesh/tnlLinearGridGeometry_impl.h index 103dc86d36..f6d5e7daad 100644 --- a/src/implementation/mesh/tnlLinearGridGeometry_impl.h +++ b/src/implementation/mesh/tnlLinearGridGeometry_impl.h @@ -299,7 +299,7 @@ void tnlLinearGridGeometry< 2, Real, Device, Index > :: getVertex( const Coordin { //y = proportions. y() * pow( y / proportions. y(), 2.0 ); Index i( 0 ); - while( ySegments[ i ] < y && i < this -> numberOfSegments ) i++; + while( ySegments[ i ] <= y && i < this -> numberOfSegments - 1 ) i++; tnlAssert( i > 0, cerr << " i = " << i ;) const RealType y0 = ySegments[ i - 1 ]; const RealType y1 = ySegments[ i ]; -- GitLab