Dear Firedrakers,
Just wondering if anyone can help me with an error that I'm coming up
again as I can't think of a way to solve it myself!
I'm editing the DG_advection class for gusto by trying to implement a
limiter but I'm running up against this error (see below). I guess I was
expecting to be able to call 'par_loop' without any problems?
Cheers,
Tom
_____________________________________________
test_dgadvection[False-False] _____________________________________________
tmpdir =
local('/tmp/pytest-of-tmb15/pytest-16/test_dgadvection_False_False_0'),
vector = False, continuity = False
@pytest.mark.parametrize("vector", [False, True])
@pytest.mark.parametrize("continuity", [False, True])
def test_dgadvection(tmpdir, vector, continuity):
dirname = str(tmpdir)
> f_err = run(dirname, vector, continuity)
test_DG_advection.py:85:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_DG_advection.py:70: in run
f_advection.apply(f, fp1)
../gusto/advection.py:244: in apply
self.limit_slope(self.D1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gusto.advection.DGAdvection object at 0x7f7c4649c810>
D = Coefficient(WithGeometry(FunctionSpace(<firedrake.mesh.MeshTopology
object at ...ctorElement(FiniteElement('Lagrange', Cell('triangle', 3),
1), dim=3), 1)), 38)
def limit_slope(self, D):
self.Dmax.assign(-1.0e10)
self.Dmin.assign(1.0e10)
self.Dbar.project(D)
self.deltaD.project(D-self.Dbar)
> par_loop(self.max_kernel, dx,
{"maxq":(self.Dmax,RW),
"q":(self.Dbar,READ)})
E NameError: global name 'par_loop' is not defined