X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Distribution.cxx;h=86efdee66fe1bacd10aaed1da9cf258094f9a00d;hb=1b151a4568db40e23b9c8e65f6346a26a8468de7;hp=989fcf3ced6cd7b4ed6db6c4cfdf0c4e5caebef1;hpb=d1f5fb3e0b86418ef63e031f1eba621ef58dea61;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_Distribution.cxx b/src/StdMeshers/StdMeshers_Distribution.cxx index 989fcf3ce..86efdee66 100644 --- a/src/StdMeshers/StdMeshers_Distribution.cxx +++ b/src/StdMeshers/StdMeshers_Distribution.cxx @@ -117,6 +117,11 @@ bool FunctionTable::value( const double t, double& f ) const if( !findBounds( t, i1, i2 ) ) return false; + if( i1==i2 ) { + f = myData[ 2*i1+1 ]; + return true; + } + double x1 = myData[2*i1], y1 = myData[2*i1+1], x2 = myData[2*i2], y2 = myData[2*i2+1]; @@ -169,7 +174,7 @@ bool FunctionTable::findBounds( const double x, int& x_ind_1, int& x_ind_2 ) con } for( int i=0; i