From 78d8c9474de857669a3b4cad105f5dca75a141b8 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 29 Dec 2006 09:24:35 +0000 Subject: [PATCH] PAL14419 (IMP: a filter predicate to find nodes/elements lying on any kind of geom surface needed) fix by ASV for instable work of TableDistribution in PLEIADES project --- src/StdMeshers/StdMeshers_Distribution.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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