Skip to content

Time-stepper cleanup and modularization #505

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

Merged
merged 12 commits into from
Oct 27, 2019
Merged

Conversation

glwagner
Copy link
Member

@glwagner glwagner commented Oct 25, 2019

This PR moves the time stepping functionality into a module and refactors and orthogonalizes the time-stepping algorithm to make it easier to implement new time steppers.

It also introduces a macro @loop_xyz that copy-pastes code to specify a 3D loop, reducing a lot of boiler plate.

There is also a new function compute_w_from_continuity!(model) that a user might employ to ensure their initial velocity field is non-divergent.

Resolves #485
Resolves #461
Probably resolves #448

@codecov
Copy link

codecov bot commented Oct 26, 2019

Codecov Report

Merging #505 into master will decrease coverage by 0.39%.
The diff coverage is 74.48%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #505     +/-   ##
=========================================
- Coverage   72.73%   72.33%   -0.4%     
=========================================
  Files          37       39      +2     
  Lines        1720     1717      -3     
=========================================
- Hits         1251     1242      -9     
- Misses        469      475      +6
Impacted Files Coverage Δ
src/Oceananigans.jl 75% <ø> (ø) ⬆️
src/output_writers.jl 80.33% <ø> (ø) ⬆️
src/models.jl 84.37% <100%> (-1.34%) ⬇️
src/utils.jl 71.56% <100%> (-1.58%) ⬇️
src/TimeSteppers/adams_bashforth.jl 100% <100%> (ø)
src/TimeSteppers/kernels.jl 60.39% <60.39%> (ø)
src/TimeSteppers/TimeSteppers.jl 74.35% <74.35%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cacb753...059d826. Read the comment docs.

@glwagner glwagner requested a review from ali-ramadhan October 27, 2019 11:23
@glwagner glwagner added the cleanup 🧹 Paying off technical debt label Oct 27, 2019
Copy link
Member

@ali-ramadhan ali-ramadhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay for more modules. Just left a couple of minor comments.

@glwagner glwagner merged commit 525d5c0 into master Oct 27, 2019
@glwagner glwagner deleted the glw/time-stepping-cleanup branch October 27, 2019 18:49
arcavaliere pushed a commit to arcavaliere/Oceananigans.jl that referenced this pull request Nov 6, 2019
…leanup

Time-stepper cleanup and modularization

Former-commit-id: 525d5c0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup 🧹 Paying off technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Function to make velocity field non-divergent? Don't be a type pirate for NamedTuple Logic for arguments to time-stepping related functions
2 participants