Changeset 3858
- Timestamp:
- Oct 25, 2006, 5:21:42 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/fit_interpolate/search_functions.py
r3850 r3858 84 84 sigma1 = dot((x-xi2), n1)/dot((xi1-xi2), n1) 85 85 86 # Integrity check - machine precision is too hard, but at 87 # least check that we are within a couple of orders of magnitude 88 epsilon = get_machine_precision() 89 msg = 'abs(sigma0+sigma1+sigma2-1) = %.15e, 100*eps = %.15e'\ 90 %(abs(sigma0+sigma1+sigma2-1), 100*epsilon) 91 assert abs(sigma0 + sigma1 + sigma2 - 1.0) < 100*epsilon, msg 86 # Integrity check - machine precision is too hard. 87 #epsilon = get_machine_precision() 88 # Use single precision as we used to here 89 epsilon = 1.0e-6 90 msg = 'abs(sigma0+sigma1+sigma2-1) = %.15e, eps = %.15e'\ 91 %(abs(sigma0+sigma1+sigma2-1), epsilon) 92 assert abs(sigma0 + sigma1 + sigma2 - 1.0) < epsilon, msg 92 93 93 94 #Check that this triangle contains the data point
Note: See TracChangeset
for help on using the changeset viewer.