Changeset 6174 for anuga_core/source/anuga/fit_interpolate/test_fit.py
- Timestamp:
- Jan 15, 2009, 11:03:42 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/fit_interpolate/test_fit.py
r6152 r6174 25 25 26 26 def distance(x, y): 27 return sqrt( sum( (num.array(x)-num.array(y))**2))27 return sqrt(num.sum((num.array(x)-num.array(y))**2)) 28 28 29 29 def linear_function(point): … … 582 582 583 583 #Define f(x,y) = x 584 f = num.array([0,0,2] ) #Value at global vertex 2584 f = num.array([0,0,2], num.Int) #Value at global vertex 2 #array default# 585 585 586 586 #Check that int (df/dx)**2 + (df/dy)**2 dx dy = … … 589 589 590 590 #Define f(x,y) = y 591 f = num.array([0,2,0] ) #Value at global vertex 1591 f = num.array([0,2,0], num.Int) #Value at global vertex 1 #array default# 592 592 593 593 #Check that int (df/dx)**2 + (df/dy)**2 dx dy = … … 596 596 597 597 #Define f(x,y) = x+y 598 f = num.array([0,2,2] ) #Values at global vertex 1 and 2598 f = num.array([0,2,2], num.Int) #Values at global vertex 1 and 2 #array default# 599 599 600 600 #Check that int (df/dx)**2 + (df/dy)**2 dx dy = … … 623 623 624 624 #Define f(x,y) = x 625 f = num.array([0,0,2,0,2,4] ) #f evaluated at points a-f625 f = num.array([0,0,2,0,2,4], num.Int) #f evaluated at points a-f #array default# 626 626 627 627 #Check that int (df/dx)**2 + (df/dy)**2 dx dy = … … 630 630 631 631 #Define f(x,y) = y 632 f = num.array([0,2,0,4,2,0] ) #f evaluated at points a-f632 f = num.array([0,2,0,4,2,0], num.Int) #f evaluated at points a-f #array default# 633 633 634 634 #Check that int (df/dx)**2 + (df/dy)**2 dx dy = … … 637 637 638 638 #Define f(x,y) = x+y 639 f = num.array([0,2,2,4,4,4] ) #f evaluated at points a-f639 f = num.array([0,2,2,4,4,4], num.Int) #f evaluated at points a-f #array default# 640 640 641 641 #Check that int (df/dx)**2 + (df/dy)**2 dx dy =
Note: See TracChangeset
for help on using the changeset viewer.