Skip to content

Commit

Permalink
examples: Remove nz usage where it's not required.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sbte committed Sep 16, 2024
1 parent 6775316 commit d09e851
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions examples/amoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def main():

nx = 60
ny = 30
nz = 1

# Define the problem
parameters = {'Problem Type': 'AMOC',
Expand All @@ -66,7 +65,7 @@ def main():
# Give back extra output (this is also more expensive)
'Verbose': False}

interface = Interface(parameters, nx, ny, nz)
interface = Interface(parameters, nx, ny)
continuation = Continuation(interface, newton_tolerance=1e-6)

# First increase the temperature forcing to the desired value
Expand Down
3 changes: 1 addition & 2 deletions examples/ldc2.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ def main():
''' An example of performing a continuation for a 2D lid-driven cavity and computing eigenvalues along the way'''
nx = 16
ny = nx
nz = 1

# Define the problem
parameters = {'Problem Type': 'Lid-driven Cavity',
# Problem parametes
'Reynolds Number': 1,
'Lid Velocity': 0}

interface = Interface(parameters, nx, ny, nz)
interface = Interface(parameters, nx, ny)
continuation = Continuation(interface)

# Compute an initial guess
Expand Down
5 changes: 2 additions & 3 deletions examples/ldc3.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def main():
''' An example of performing a "poor man's continuation" for a 2D lid-driven cavity using time integration'''
nx = 16
ny = nx
nz = 1

# Define the problem
parameters = {'Problem Type': 'Lid-driven Cavity',
Expand All @@ -37,12 +36,12 @@ def main():
'Verbose': False,
'Theta': 1}

interface = Interface(parameters, nx, ny, nz)
interface = Interface(parameters, nx, ny)

# Store data for computing the bifurcation diagram using postprocessing
data = Data()

n = interface.discretization.dof * nx * ny * nz
n = interface.discretization.dof * nx * ny
x = numpy.random.random(n)

mu_list = []
Expand Down
3 changes: 1 addition & 2 deletions examples/qg.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def main():

nx = 32
ny = nx
nz = 1

# Define the problem
parameters = {'Problem Type': 'Double Gyre',
Expand All @@ -39,7 +38,7 @@ def main():
# Give back extra output (this is also more expensive)
'Verbose': False}

interface = Interface(parameters, nx, ny, nz)
interface = Interface(parameters, nx, ny)
continuation = Continuation(interface)

# First activate the wind stress
Expand Down

0 comments on commit d09e851

Please sign in to comment.