moved some files around to conform to python best practicies

--HG--
rename : lib/baker.py => lib/baker/__init__.py
rename : lib/tools.py => lib/baker/tools.py
rename : lib/grid.py => lib/grid/__init__.py
rename : lib/smcqdelaunay.py => lib/grid/smcqdelaunay.py
This commit is contained in:
smcquay@cfdviz2 2010-03-08 13:05:42 -07:00
parent 9a1b8d14b2
commit c5d8fff883
6 changed files with 15 additions and 11 deletions

View File

@ -5,7 +5,7 @@ from optparse import OptionParser
import numpy as np
from tools import rms, exact_func
from baker.tools import rms, exact_func
import grid

View File

@ -5,8 +5,7 @@ import pickle
from grid import simple_rect_grid, simple_random_grid
from baker import run_baker
from tools import smberror
from baker.tools import smberror
qfile = '/tmp/grid_regular.txt'

View File

@ -1,7 +1,7 @@
import numpy as np
import sys
from tools import smberror
from baker.tools import smberror
def get_phis(X, R):
"""

View File

@ -1,6 +1,9 @@
import numpy as np
class smberror(Exception):
"""
this is a silly little exception subclass
"""
def __init__(self, val):
self.value = val
def __str__(self):
@ -17,5 +20,7 @@ def rms(errors):
return r
def exact_func(x, y):
"""
the exact function used from baker's article (for testing)
"""
return np.power((np.sin(x * np.pi) * np.cos(y * np.pi)), 2)
return np.sin(x * np.pi) * np.cos(y * np.pi)

View File

@ -8,8 +8,8 @@ import numpy as np
import scipy.spatial
from baker import run_baker, get_phis
from tools import exact_func, smberror
from smcqdelaunay import *
from baker.tools import exact_func, smberror
from grid.smcqdelaunay import *
class face(object):
def __init__(self, name):