Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show method for HydrostaticFreeSurfaceModel summarizes advection schemes #3504

Merged
merged 2 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ĝ = 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 ĝ = 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 ĝ = 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