joining code

This commit is contained in:
Stephen McQuay 2011-03-02 23:44:08 -07:00
parent 639f732fce
commit 6e4d8c9505
3 changed files with 8 additions and 9 deletions

View File

@ -3,6 +3,8 @@
import interp.bootstrap
from multiprocessing.managers import BaseManager
from interp.grid.gmsh import gmsh_grid3D
class QueueManager(BaseManager): pass
QueueManager.register('get_inqueue' )
QueueManager.register('get_outqueue')

View File

@ -7,17 +7,10 @@ import numpy as np
import interp.bootstrap
from interp.grid.gmsh import gmsh_grid3D
from interp.tools import improved_answer, log
from interp.tools import improved_answer, log, exact
from interp.grid import grid
def exact(X):
x = X[0]
y = X[1]
z = X[2]
return 1+ x*x + y*y + z*z
if __name__ == '__main__':
if len(sys.argv) != 2:

View File

@ -62,6 +62,10 @@ def exact_func_3D(X):
log.debug(answer)
return answer
def exact(X):
x,y,z = X
return 1 + x*x + y*y + z*z
def improved_answer(answer, exact, verbose=False):
if not answer['error']:
return True