Skip to content
Snippets Groups Projects
Commit 2f221756 authored by Andreas Dedner's avatar Andreas Dedner
Browse files

minor fixes

parent b9336314
No related branches found
No related tags found
1 merge request!4Latest features added to dune-fem-dg.
Pipeline #12495 failed
......@@ -7,7 +7,14 @@ parameter.append({"fem.verboserank": -1})
parameter.append("parameter")
primitive=lambda Model,uh: {"freesurface":Model.toPrim(uh)[0]}
parameters = {"fem.ode.odesolver": "EX",
"fem.timeprovider.factor": 0.45/2.,
"dgadvectionflux.method": "LLF",
"femdg.limiter.limiteps": 1,
"femdg.limiter.admissiblefunctions": 1,
"femdg.limiter.tolerance": 1}
run(*problem(1),
startLevel=0, polOrder=2, limiter="default",
primitive=primitive, saveStep=0.1, subsamp=0)
primitive=primitive, saveStep=0.1, subsamp=0,
dt=None,threading=True, grid="alucube",
parameters=parameters)
......@@ -86,12 +86,12 @@ def run(Model, initial, x0,x1,N, endTime, name, exact,
except:
pass
vtk.write(name, count, outputType=OutputType.appendedraw)
else:
if exact is not None:
grid.writeVTK(name, subsampling=subsamp, celldata=[u_h, exact(t)])
else:
grid.writeVTK(name, subsampling=subsamp, celldata=[u_h])
# output the final result and compute error (if exact is available)
if exact is not None:
grid.writeVTK(name, subsampling=subsamp,
celldata={"solution":u_h, "exact":exact(t)})
error = integrate( grid, dot(u_h-exact(t),u_h-exact(t)), order=5 )
print("error:", math.sqrt(error),flush=True )
else:
grid.writeVTK(name, subsampling=subsamp, celldata=[u_h])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment