Skip to content

Commit 6491677

Browse files
authored
Clean physical process docs (#131)
* Remove use of coords field from tests and code * Remove coords field from floe * Clean up floe_utils * Clean up geometry utils * Wrappers for GO code * Finish floe util cleanup * Clean up collisions code * Finish cleaning up collision docs * Update comments for physical processes up through fractures * Update ridge/raft docs * Finish physical process docs cleanup * Finish documentation cleanup * Update all packages * Decrease flow fracturing in tutorial
1 parent bd46fb4 commit 6491677

File tree

26 files changed

+746
-1459
lines changed

26 files changed

+746
-1459
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Extents = "0.1"
3636
GeoInterfaceMakie = "0.1"
3737
GeometryOps = "0.1.31"
3838
Interpolations = "0.14, 0.15, 0.16"
39-
JLD2 = "0.4, 0.5"
39+
JLD2 = "0.4, 0.5, 0.6"
4040
Measures = "0.3"
4141
NCDatasets = "0.14"
4242
Rotations = "1"

docs/literate/tutorial.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ consts = Constants()
308308
fracture_settings = FractureSettings(
309309
fractures_on = true,
310310
criteria = HiblerYieldCurve(floes),
311-
Δt = 75,
311+
Δt = 500,
312312
npieces = 3,
313313
deform_on = false,
314314
)
@@ -353,7 +353,7 @@ sim = Simulation(;
353353
model = model,
354354
consts = consts,
355355
Δt = 10, # timestep of 5 seconds
356-
nΔt = 30000, # run for 10,000 timesteps
356+
nΔt = 20000, # run for 20,000 timesteps
357357
floe_settings = floe_settings,
358358
fracture_settings = fracture_settings,
359359
writers = writers,

docs/make.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ format = Documenter.HTML(;
4747
canonical = "https://Caltech-OCTO.github.io/SubzeroDocumentation/stable",
4848
mathengine = MathJax3(),
4949
size_threshold = 5*10^6, # 500 KiB
50+
collapselevel = 3,
5051
)
5152

5253
# Metadata from doc tests

docs/src/api.md

Lines changed: 80 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,52 @@ CurrentModule = Subzero
44

55
# Full Subzero API documentation
66

7-
## Grids
7+
## User Methods
8+
9+
### Grids
810

911
```@docs
1012
AbstractRectilinearGrid
1113
RegRectilinearGrid
1214
```
1315

14-
## Directions
16+
### Directions
1517
```@docs
1618
AbstractDirection
1719
North
1820
South
1921
East
2022
West
2123
```
22-
## Boundaries
24+
### Boundaries
2325
```@docs
2426
AbstractBoundary
2527
OpenBoundary
2628
PeriodicBoundary
2729
CollisionBoundary
2830
MovingBoundary
2931
```
30-
## Topography
32+
### Topography
3133
```@docs
3234
TopographyElement
3335
initialize_topography_field
3436
```
35-
## Domain
37+
### Domain
3638
```@docs
3739
Domain
3840
```
3941

40-
## Ocean
42+
### Ocean
4143
```@docs
4244
Ocean
4345
```
4446

45-
## Atmosphere
47+
### Atmosphere
4648
```@docs
4749
Atmos
4850
```
4951

50-
## Floes
52+
### Floes
5153
```@docs
5254
Floe
5355
AbstractFloeFieldGenerator
@@ -56,17 +58,17 @@ VoronoiTesselationFieldGenerator
5658
initialize_floe_field
5759
```
5860

59-
## Model
61+
### Model
6062
```@docs
6163
Model
6264
```
6365

64-
## Constants
66+
### Constants
6567
```@docs
6668
Constants
6769
```
6870

69-
## Physical Process Settings
71+
### Physical Process Settings
7072
```@docs
7173
FloeSettings
7274
CouplingSettings
@@ -81,7 +83,7 @@ RidgeRaftSettings
8183
WeldSettings
8284
```
8385

84-
## Output Writers
86+
### Output Writers
8587
```@docs
8688
AbstractOutputWriter
8789
InitialStateOutputWriter
@@ -92,20 +94,20 @@ OutputWriters
9294
SubzeroLogger
9395
```
9496

95-
## Simulations
97+
### Simulations
9698
```@docs
9799
Simulation
98100
run!
99101
restart!
100102
```
101103

102-
# Developer-Used Methods
104+
## Developer Methods
103105

104-
## Simulation Methods
106+
### Simulation Methods
105107
```@docs
106108
timestep_sim!
107109
```
108-
## Output Writer Methods
110+
### Output Writer Methods
109111
```@docs
110112
write_data!
111113
write_init_state_data!
@@ -114,10 +116,70 @@ write_floe_data!
114116
write_grid_data!
115117
calc_eulerian_data!
116118
```
117-
118-
## Developer-Used Types
119+
### Developer-Used Types
119120
```@docs
120121
CellFloes
121122
CellStresses
122123
TopographyField
123124
```
125+
126+
### Collision Methods
127+
```@docs
128+
timestep_collisions!
129+
calc_elastic_forces
130+
calc_normal_force
131+
calc_friction_forces
132+
add_interactions!
133+
floe_floe_interaction!
134+
floe_domain_interaction!
135+
floe_domain_element_interaction!
136+
update_boundaries!
137+
add_ghosts!
138+
```
139+
140+
### Coupling Methods
141+
```@docs
142+
timestep_coupling!
143+
calc_one_way_coupling!
144+
calc_two_way_coupling!
145+
calc_atmosphere_forcing
146+
calc_ocean_forcing!
147+
floe_to_grid_info!
148+
```
149+
150+
### Fracture Methods
151+
```@docs
152+
fracture_floes!
153+
split_floe
154+
deform_floe!
155+
determine_fractures
156+
```
157+
158+
### Ridging and Rafting Methods
159+
```@docs
160+
timestep_ridging_rafting!
161+
floe_floe_raft!
162+
floe_domain_raft!
163+
floe_floe_ridge!
164+
floe_domain_ridge!
165+
```
166+
167+
### Simplify Methods
168+
```@docs
169+
simplify_floes!
170+
smooth_floes!
171+
fuse_floes!
172+
remove_floes!
173+
```
174+
175+
### Welding Methods
176+
```@docs
177+
timestep_welding!
178+
```
179+
180+
### Floe Update Methods
181+
```@docs
182+
timestep_floe_properties!
183+
calc_stress!
184+
calc_strain!
185+
```

docs/src/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ The list of existing settings is:
356356
fracture_settings = FractureSettings(
357357
fractures_on = true,
358358
criteria = HiblerYieldCurve(floes),
359-
Δt = 75,
359+
Δt = 500,
360360
npieces = 3,
361361
deform_on = false,
362362
)
@@ -417,7 +417,7 @@ sim = Simulation(;
417417
model = model,
418418
consts = consts,
419419
Δt = 10, # timestep of 5 seconds
420-
nΔt = 30000, # run for 10,000 timesteps
420+
nΔt = 20000, # run for 20,000 timesteps
421421
floe_settings = floe_settings,
422422
fracture_settings = fracture_settings,
423423
writers = writers,

ext/SubzeroMakieExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ heatmap and colorbar.
1818
## Arguments:
1919
- `floe_fn::String`: $(Subzero.FLOE_FN_DEF)
2020
- `initial_state_fn::String`: $(Subzero.INITIAL_STATE_FN_DEF)
21-
- `Δt::Int`: $(Subzero.ΔT_DEF)
21+
- $(Subzero.ΔT_DEF)
2222
- `output_fn::String`: $(Subzero.MP4_OUTPUT_FN)
2323
"""
2424
function plot_sim(

src/Subzero.jl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ using CoordinateTransformations, Dates, Extents,
1717
Printf, Random, Rotations, SplitApplyCombine, Statistics, StructArrays
1818

1919

20-
20+
const SIM_DEF = "`sim::Simulation`: simulation to be run"
2121
const FT_DEF = "`FT::Type{<:AbstractFloat}`: Float type used to run the simulation, either \
2222
`Float64` (default) or `Float32`."
2323
const POLY_DEF = "`poly::Polys{FT}`: Polygon used to represent the shape of a floe or topography"
@@ -31,8 +31,6 @@ point that is the centroid of either a floe or topography"
3131
const RMAX_DEF = "`rmax::FT`: Float length representing the maximum radius of a floe or topography \
3232
from the centroid to any given vertex"
3333

34-
const SIM_DEF = "`sim::Simulation`: simulation to be run"
35-
3634

3735
# Types
3836
include("tools/geom_utils.jl")
@@ -55,9 +53,14 @@ include("simulation_components/atmos.jl")
5553
include("simulation_components/model.jl")
5654
# Outputs
5755
include("simulation_components/output_components/logger.jl")
58-
# Physical Processes
56+
# Process Settings
5957
include("simulation_components/process_settings/process_settings.jl")
6058
include("simulation_components/process_settings/fracture_settings.jl")
59+
# Simulation
60+
include("simulation_components/output_components/output.jl")
61+
include("simulation_components/constants.jl")
62+
include("simulation_components/simulation.jl")
63+
# Physical Processes
6164
include("physical_processes/fractures.jl")
6265
include("physical_processes/update_floe.jl")
6366
include("physical_processes/coupling.jl")
@@ -69,8 +72,4 @@ include("physical_processes/welding.jl")
6972
include("tools/plotting.jl")
7073
include("tools/conservation_em.jl")
7174
include("tools/compare_files.jl")
72-
# Simulation
73-
include("simulation_components/output_components/output.jl")
74-
include("simulation_components/constants.jl")
75-
include("simulation_components/simulation.jl")
7675
end

0 commit comments

Comments
 (0)