Skip to content

Commit

Permalink
more fixes for merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
jshipton committed Aug 25, 2023
1 parent 40e9116 commit 389bde7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 6 additions & 5 deletions examples/shallow_water/mm_ot_sw_galewsky_jet.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Domain
mesh = IcosahedralSphereMesh(radius=R,
refinement_level=ref_level, degree=2)
domain = Domain(mesh, dt, 'BDM', 1)
domain = Domain(mesh, dt, 'BDM', 1, move_mesh=True)

# Equation
Omega = parameters.Omega
Expand All @@ -35,19 +35,19 @@

output = OutputParameters(dirname=dirname,
dumplist_latlon=['D', 'PotentialVorticity',
'RelativeVorticity'],
log_level="INFO")
'RelativeVorticity'])

pv = PotentialVorticity()
diagnostic_fields = [pv, RelativeVorticity()]
io = IO(domain, output, diagnostic_fields=diagnostic_fields)

# Transport schemes
transported_fields = [ImplicitMidpoint(domain, "u"),
transported_fields = [TrapeziumRule(domain, "u"),
SSPRK3(domain, "D")]

transport_methods = [DGUpwind(eqns, "u"), DGUpwind(eqns, "D")]

# Mesh movement

def update_pv():
pv()

Expand All @@ -64,6 +64,7 @@ def reinterpolate_coriolis():

# Time stepper
stepper = MeshMovement(eqns, io, transported_fields,
spatial_methods=transport_methods,
mesh_generator=mesh_generator)
#stepper = SemiImplicitQuasiNewton(eqns, io, transported_fields)

Expand Down
4 changes: 3 additions & 1 deletion gusto/timeloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
TestFunction, assemble, inner, dx, split
from firedrake.petsc import PETSc
from pyop2.profiling import timed_stage
from gusto.equations import PrognosticEquationSet
from gusto.equations import PrognosticEquationSet, ShallowWaterEquations
from gusto.fields import TimeLevelFields, StateFields
from gusto.forcing import Forcing
from gusto.fml import drop, Label, Term
Expand Down Expand Up @@ -668,6 +668,7 @@ def timestep(self):
class MeshMovement(SemiImplicitQuasiNewton):

def __init__(self, equation_set, io, transport_schemes,
spatial_methods,
auxiliary_equations_and_schemes=None,
linear_solver=None,
diffusion_schemes=None,
Expand All @@ -684,6 +685,7 @@ def __init__(self, equation_set, io, transport_schemes,
super().__init__(equation_set=equation_set,
io=io,
transport_schemes=transport_schemes,
spatial_methods=spatial_methods,
auxiliary_equations_and_schemes=auxiliary_equations_and_schemes,
linear_solver=linear_solver,
diffusion_schemes=diffusion_schemes,
Expand Down

0 comments on commit 389bde7

Please sign in to comment.