Authentication method changed. UCLouvain users, please use the "UCLouvain SSO" button to connect on the website and use ssh + ssh key (https://git.immc.ucl.ac.be/-/profile/keys) or https + personnal access token (https://git.immc.ucl.ac.be/-/profile/personal_access_tokens) in your git clients.

Commit 723ffc93 authored by Valentin Vallaeys's avatar Valentin Vallaeys
Browse files

updated offline testcase

parent e3ee8d75
Pipeline #1205 passed with stage
in 31 minutes and 29 seconds
......@@ -556,7 +556,7 @@ class ShallowWaterTracer2d:
Format:
- equation : ShallowWater2d object (online mode)
- string : path to the folder containing the hydrodynamics (offline mode).
- string : path to the folder containing the hydrodynamics folder 'offline_sw2d' (offline mode).
* linear_equation
boolean stating linear shallow water tracer equation (default: False)
* name
......
......@@ -75,14 +75,16 @@ loop.add_equation(eq)
loop.add_equation(eq2)
loop.run()
eq3 = slim.ShallowWaterTracer2d(domain, "implicit",'./output', name="tracer_offline", offline = True, initial_time=0, final_time=nbSteps*dt)
n_restart = 25
eq3 = slim.ShallowWaterTracer2d(domain, "implicit",'./output', name="tracer_offline", offline = True, initial_time=n_restart*dt, final_time=nbSteps*dt)
eq3.set_initial_condition(("tracer_CI.nc","CI"))
eq3.set_diffusivity("okubo",okubo_coefficient=0.0)
eq3.set_boundary_coast("Wall")
eq3.compute_mass("tracer.dat")
loop2=slim.Loop(maximum_time_step = dt, export_time = dt,path="./output")
loop2.set_time_step_offline(dt, periodic = False, index_start=1, n_index_per_period=-1)
loop2.set_time_step_offline(dt, periodic = False, index_start=n_restart, n_index_per_period=-1)
loop2.add_equation(eq3)
loop2.run()
......@@ -105,4 +107,6 @@ print("L2 error on tracer: %e\n" % error)
if (error > 1e-12):
dgpy.Msg.Error("Error is too high");
dgpy.Msg.Exit(1)
else:
dgpy.Msg.Info("Test succeeded");
dgpy.Msg.Exit(0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment