-
Notifications
You must be signed in to change notification settings - Fork 77
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
change V-cycle tolerance criterion #97
Conversation
Do we really need to do a V-cycle every time? If there is nothing going on, shouldn't it skip the loop like in the master? |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I still need to benchmark and correct the tests before it's finalized. |
How's this? You still need to include the latest changes @marinlauber ? |
Yes, this is not up to date, the latest change from |
I have just removed the debug flags. I will correct the test and run the TGV on GPU for benchmark. |
…into poisson_rediduals
Can you please post here the benchmark results? Just to document it in this issue too. |
Also tests are not passing, please have a look at that too :) |
Results of running
|
I fixed the tests. It should be fine now. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #97 +/- ##
=======================================
Coverage 96.44% 96.45%
=======================================
Files 12 12
Lines 450 451 +1
=======================================
+ Hits 434 435 +1
Misses 16 16 ☔ View full report in Codecov by Sentry. |
Speed-up, passing tests, and closes a issue. Merging! |
p = ml.levels[1] | ||
BC!(p.x;perdir=p.perdir) | ||
residual!(p); r₂ = L₂(p) | ||
log && (res = [r₂]) | ||
residual!(p); r₀ = r₂ = L∞(p); r₂₀ = L₂(p) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marinlauber Why are there three computed residuals? It looks like only r₂ is used.
Solve the pressure oscillation from #96
The fix is to implement a variable depth V-cycle. The criterion to
pop!
orpush!
a new level to the multigrid depends on the previous number of v-cycles necessary to reach convergence.The convergence is measured with a L_\infty norm.
This also implements a basic logging capability to track the convergence of the multigrid solver (to be improved)
TO DO: