Skip to content

Commit

Permalink
Show method for HydrostaticFreeSurfaceModel summarizes advection sc…
Browse files Browse the repository at this point in the history
…hemes (#3504)

* show(io, ::HydrostaticFreeSurfaceModel) summarizes advection schemes

* fix doctests
  • Loading branch information
navidcy committed Mar 11, 2024
1 parent f1aacf3 commit b69b1d9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/src/model_setup/buoyancy_and_equation_of_state.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ HydrostaticFreeSurfaceModel{CPU, RectilinearGrid}(time = 0 seconds, iteration =
β”œβ”€β”€ buoyancy: Nothing
β”œβ”€β”€ free surface: ImplicitFreeSurface with gravitational acceleration 9.80665 m s⁻²
β”‚ └── solver: FFTImplicitFreeSurfaceSolver
β”œβ”€β”€ advection scheme:
β”‚ └── momentum: Centered reconstruction order 2
└── coriolis: Nothing
```

Expand Down Expand Up @@ -94,6 +96,9 @@ HydrostaticFreeSurfaceModel{CPU, RectilinearGrid}(time = 0 seconds, iteration =
β”œβ”€β”€ buoyancy: BuoyancyTracer with gΜ‚ = NegativeZDirection()
β”œβ”€β”€ free surface: ImplicitFreeSurface with gravitational acceleration 9.80665 m s⁻²
β”‚ └── solver: FFTImplicitFreeSurfaceSolver
β”œβ”€β”€ advection scheme:
β”‚ β”œβ”€β”€ momentum: Centered reconstruction order 2
β”‚ └── b: Centered reconstruction order 2
└── coriolis: Nothing
```

Expand Down Expand Up @@ -131,6 +136,10 @@ HydrostaticFreeSurfaceModel{CPU, RectilinearGrid}(time = 0 seconds, iteration =
β”œβ”€β”€ buoyancy: SeawaterBuoyancy with g=9.80665 and LinearEquationOfState(thermal_expansion=0.000167, haline_contraction=0.00078) with gΜ‚ = NegativeZDirection()
β”œβ”€β”€ free surface: ImplicitFreeSurface with gravitational acceleration 9.80665 m s⁻²
β”‚ └── solver: FFTImplicitFreeSurfaceSolver
β”œβ”€β”€ advection scheme:
β”‚ β”œβ”€β”€ momentum: Centered reconstruction order 2
β”‚ β”œβ”€β”€ T: Centered reconstruction order 2
β”‚ └── S: Centered reconstruction order 2
└── coriolis: Nothing
```

Expand All @@ -146,6 +155,10 @@ HydrostaticFreeSurfaceModel{CPU, RectilinearGrid}(time = 0 seconds, iteration =
β”œβ”€β”€ buoyancy: SeawaterBuoyancy with g=9.80665 and LinearEquationOfState(thermal_expansion=0.000167, haline_contraction=0.00078) with gΜ‚ = NegativeZDirection()
β”œβ”€β”€ free surface: ImplicitFreeSurface with gravitational acceleration 9.80665 m s⁻²
β”‚ └── solver: FFTImplicitFreeSurfaceSolver
β”œβ”€β”€ advection scheme:
β”‚ β”œβ”€β”€ momentum: Centered reconstruction order 2
β”‚ β”œβ”€β”€ T: Centered reconstruction order 2
β”‚ └── S: Centered reconstruction order 2
└── coriolis: Nothing
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ function Base.show(io::IO, model::HydrostaticFreeSurfaceModel)
end
end

if model.advection !== nothing
print(io, "β”œβ”€β”€ advection scheme: ", "\n")
names = keys(model.advection)
for name in names[1:end-1]
print(io, "β”‚ β”œβ”€β”€ " * string(name) * ": " * summary(model.advection[name]), "\n")
end
name = names[end]
print(io, "β”‚ └── " * string(name) * ": " * summary(model.advection[name]), "\n")
end

if isnothing(model.particles)
print(io, "└── coriolis: $(typeof(model.coriolis))")
else
Expand Down

0 comments on commit b69b1d9

Please sign in to comment.