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

[Solvers][Mesh] Add CFL condition calculation to solvers #64

Merged
merged 28 commits into from
Dec 31, 2020

Conversation

noelchalmers
Copy link
Member

@noelchalmers noelchalmers commented Dec 29, 2020

This PR adds the ability in each time-dependent solver to properly calculate the CFL timestep restriction. Currently, all solvers will only do this calculation once, after the initial condition is set. Aside from being slightly more robust when starting timestepping, this may be useful in the future for some timesteppers to adapt the timestep size.

This PR also addresses #25.

@tcew
Copy link
Contributor

tcew commented Dec 29, 2020

Using max velocity instead of dt ~ min(h/(lambda*N^2)) will be pessimistic

@noelchalmers
Copy link
Member Author

Would you prefer calculating min(h/lambda) over all elements over computing min(h) and max(lambda)?

@noelchalmers noelchalmers marked this pull request as draft December 29, 2020 03:33
@tcew
Copy link
Contributor

tcew commented Dec 29, 2020

I think so. Sorry for not noticing that before.

@noelchalmers
Copy link
Member Author

Sounds good. No reason we cant do that with a small tweak. I also need to update some golden norms. Some have shifted slightly enough that units tests are failing.

@noelchalmers noelchalmers marked this pull request as ready for review December 30, 2020 14:43
@codecov
Copy link

codecov bot commented Dec 30, 2020

Codecov Report

Merging #64 (d3dccc4) into master (d2ad425) will decrease coverage by 0.09%.
The diff coverage is 78.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
- Coverage   84.24%   84.14%   -0.10%     
==========================================
  Files         257      256       -1     
  Lines       20049    20219     +170     
==========================================
+ Hits        16890    17013     +123     
- Misses       3159     3206      +47     
Impacted Files Coverage Δ
include/mesh.hpp 100.00% <ø> (ø)
include/mesh/mesh2D.hpp 0.00% <ø> (ø)
include/mesh/mesh3D.hpp 0.00% <ø> (ø)
solvers/acoustics/acoustics.hpp 100.00% <ø> (ø)
solvers/acoustics/src/acousticsSetup.cpp 84.84% <ø> (-0.87%) ⬇️
solvers/advection/advection.hpp 100.00% <ø> (ø)
solvers/bns/bns.hpp 100.00% <ø> (ø)
solvers/cns/cns.hpp 100.00% <ø> (ø)
solvers/fokkerPlanck/fpe.hpp 83.33% <ø> (ø)
solvers/ins/ins.hpp 83.33% <ø> (ø)
... and 30 more

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 d2ad425...10ec70a. Read the comment docs.

@noelchalmers noelchalmers linked an issue Dec 30, 2020 that may be closed by this pull request
@noelchalmers noelchalmers merged commit 3ed0e3f into master Dec 31, 2020
@noelchalmers noelchalmers deleted the feature/cfl branch December 31, 2020 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

meshMinCharacteristicLengrh is simplex specific
2 participants