-
Couldn't load subscription status.
- Fork 131
Comments NSF (Entropy-Var) Gradients #2528
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
base: main
Are you sure you want to change the base?
Comments NSF (Entropy-Var) Gradients #2528
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2528 +/- ##
=======================================
Coverage 96.76% 96.76%
=======================================
Files 512 512
Lines 42391 42391
=======================================
Hits 41016 41016
Misses 1375 1375
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
I think these changes are confusing and/or misleading. It makes it seem that we need the gradients of either rho or w1. But these are not needed in any of the flux computations. They do get computed and passed around, but they are never modified or used.
| # varnames(::typeof(cons2prim) , ::CompressibleNavierStokesDiffusion1D) = ("rho", "v1", "T") | ||
| # varnames(::typeof(cons2entropy), ::CompressibleNavierStokesDiffusion1D) = ("w1", "w2", "w3") |
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.
I am still not a fan of this. I my eyes we should have a separate set of variables of size nvars_grad to avoid the computation of unnecessary gradients like d_rho or d_w1. This commented section of code was intended to reflect such a desire. So changing it to include the unnecessary gradient values goes against its spirit.
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.
I agree, this would be nice - I gave it a quick look this morning but this is a major project, as a whole set of functions need to be rewritten.
For now, however, I would like to have a comment reflecting what is, and maybe add a comment for this TODO. We still have it here: #1147
| # Takes the solution values `u` and gradient of the entropy variables w and | ||
| # reverse engineers the gradients to be terms of the primitive variables u_prim = (rho, v1, v2, T). |
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.
Same here. I would like to avoid unnecessary gradients as it wastes computation time and memory. Although, I understand that having a gradient vector of variables that is one less than the conservative variable vector could be an annoying restructuring of the existing code.
| # varnames(::typeof(cons2prim) , ::CompressibleNavierStokesDiffusion2D) = ("rho", "v1", "v2", "T") | ||
| # varnames(::typeof(cons2entropy), ::CompressibleNavierStokesDiffusion2D) = ("w1", "w2", "w3", "w4") |
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.
Similar here. Changing this commented code goes against the original intent in its creation. We discussed several years ago to mimic the computation of the gradients to match FLUXO. Perhaps we are willing to eat the computational overhead of computing unused gradients, but this is something we should discuss as a group.
| # varnames(::typeof(cons2prim) , ::CompressibleNavierStokesDiffusion3D) = ("rho", "v1", "v2", "v3", "T") | ||
| # varnames(::typeof(cons2entropy), ::CompressibleNavierStokesDiffusion3D) = ("w1", "w2", "w3", "w4", "w5") |
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.
Same in 3D.
Extending parts of #2527 to 2D, 3D.
Supposed to be merged after #2517, until then labeled as draft