joining code
This commit is contained in:
parent
639f732fce
commit
6e4d8c9505
@ -3,6 +3,8 @@
|
|||||||
import interp.bootstrap
|
import interp.bootstrap
|
||||||
from multiprocessing.managers import BaseManager
|
from multiprocessing.managers import BaseManager
|
||||||
|
|
||||||
|
from interp.grid.gmsh import gmsh_grid3D
|
||||||
|
|
||||||
class QueueManager(BaseManager): pass
|
class QueueManager(BaseManager): pass
|
||||||
QueueManager.register('get_inqueue' )
|
QueueManager.register('get_inqueue' )
|
||||||
QueueManager.register('get_outqueue')
|
QueueManager.register('get_outqueue')
|
||||||
@ -10,5 +12,5 @@ QueueManager.register('get_outqueue')
|
|||||||
m = QueueManager(address=('install', 50000), authkey='asdf')
|
m = QueueManager(address=('install', 50000), authkey='asdf')
|
||||||
m.connect()
|
m.connect()
|
||||||
|
|
||||||
inq = m.get_inqueue()
|
inq = m.get_inqueue()
|
||||||
outq = m.get_outqueue()
|
outq = m.get_outqueue()
|
||||||
|
@ -7,17 +7,10 @@ import numpy as np
|
|||||||
|
|
||||||
import interp.bootstrap
|
import interp.bootstrap
|
||||||
from interp.grid.gmsh import gmsh_grid3D
|
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
|
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 __name__ == '__main__':
|
||||||
if len(sys.argv) != 2:
|
if len(sys.argv) != 2:
|
||||||
|
@ -62,6 +62,10 @@ def exact_func_3D(X):
|
|||||||
log.debug(answer)
|
log.debug(answer)
|
||||||
return 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):
|
def improved_answer(answer, exact, verbose=False):
|
||||||
if not answer['error']:
|
if not answer['error']:
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user