commit 6ea4d621d7292919597b79382b21ea846e7abbed
parent 684c105d47317bce6b24d432af0c5a8c881fb1e3
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 6 Apr 2016 10:30:46 +0200
Upd the cylinder test to handle the YAML fileformat updates
Diffstat:
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/test_schiff_cylinder.sh b/src/test_schiff_cylinder.sh
@@ -366,12 +366,15 @@ then
# Compute the mean radius
r=`echo $i | sed "s/[eE]+*/*10^/g"`
mean_radius=$(echo -e "scale=10\n($r*0.450) / (8*a(1))" | bc -l)
+ radius=1.0
+ height=$(echo "$radius / $R * 2.0" | bc -l)
# Generate the geometry distribution into the pipe
echo -e \
"cylinder:\n" \
- " aspect_ratio: $R\n" \
- " radius: { lognormal: { sigma: $sigma, mu: $mean_radius } }\n" \
+ " height: $height\n" \
+ " radius: $radius\n" \
+ " radius_sphere: { lognormal: { sigma: $sigma, mu: $mean_radius } }\n" \
> $tmppipe &
# Invoke the schiff command
@@ -401,9 +404,10 @@ do
fi
lines+="$(($iline))p"
done
+sed -n "$lines" $tmpfile > $tmppipe &
i=0
-sed -n "$lines" $tmpfile | while read line
+while read line
do
xsection=(`echo $line | sed 's/^\S*\(.*\)$/\1/g' | sed 's/[eE]+*/*10^/g'`)
reference=(`echo ${references[$i]} | sed 's/[eE]+*/*10^/g'`)
@@ -422,9 +426,14 @@ do
echo OK
fi
i=$(($i+1))
-done
+done < $tmppipe
rm $tmppipe
+if [ ! $i -eq ${#x[@]} ]
+then
+ err=1 # notify the error
+fi
+
exit $err