-
Notifications
You must be signed in to change notification settings - Fork 114
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
Implement BR1 scheme #378
Implement BR1 scheme #378
Conversation
…results in comparison to "naive" implementation
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.
Thanks a lot for prototyping this, @sloede!
src/semidiscretization/semidiscretization_hyperbolic_parabolic.jl
Outdated
Show resolved
Hide resolved
src/semidiscretization/semidiscretization_hyperbolic_parabolic.jl
Outdated
Show resolved
Hide resolved
src/semidiscretization/semidiscretization_hyperbolic_parabolic.jl
Outdated
Show resolved
Hide resolved
boundary_conditions=boundary_conditions, | ||
RealT=RealT) | ||
|
||
solver_parabolic = DGSEM(solver.basis, flux_central, solver.volume_integral, solver.mortar) |
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.
As far as I know, the common choice is to use the weak form volume integral for the parabolic terms, even if something more complex is used for the hyperbolic terms. Would it be better to use create_solver_auxvars
here?
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.
There is no hard set rule for this, it is largely a matter of convention (or data convenience) which form is used. When we use LGL nodes the weak and strong form volume integrals are equivalent so we can use whichever we like. It is just one of those decisions we need to make and then be consistent with it moving forward :)
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.
What I meant was that we shouldn't use something like shock-capturing volume integrals here
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.
The question for me is: is it the "common" or the "only sensible" choice? For example, we could make it the default to use the weak formulation by add a keyword argument volume_integral_parabolic=VolumeIntegralWeakFormulation()
that allows the user to override it.
So if there are is no difference and no proofs depend on using the strong form vs the weak form, I'll hardcode the weak form integral here as well.
Would it be better to use create_solver_auxvars here?
To me, the "auxvars solver" describes the concept of the solver I need to create when computing parabolic problems by getting the gradients as "auxiliary variables" from a separate solver. Here, the shoe doesn't really fit, so for now I'd leave it as is (also given the fact that BR1 is already very solver specific).
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.
What I meant was that we shouldn't use something like shock-capturing volume integrals here
This has convinced me. I made the weak form the default in 665e99f and will allow users to override this with volume_integral_parabolic
.
cache = create_cache(mesh, equations, solver, RealT) | ||
_boundary_conditions = digest_boundary_conditions(boundary_conditions) | ||
|
||
solver_auxvars = create_solver_auxvars(solver) |
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.
We will need to have the possibility to use different numerical fluxes for the first and second step (computation of auxiliary variables and doing stuff with them) for methods different from BR1.
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.
Absolutely. That's one of the reasons I wanted the parabolic terms to be handled by a separate solver. I originally planned to postpone this to a second PR, but I think we can also put it in here. Maybe we can discuss this next Monday?
boundary_conditions=boundary_conditions, | ||
RealT=RealT) | ||
|
||
solver_parabolic = DGSEM(solver.basis, flux_central, solver.volume_integral, solver.mortar) |
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.
There is no hard set rule for this, it is largely a matter of convention (or data convenience) which form is used. When we use LGL nodes the weak and strong form volume integrals are equivalent so we can use whichever we like. It is just one of those decisions we need to make and then be consistent with it moving forward :)
boundary_conditions=boundary_conditions, | ||
RealT=RealT) | ||
|
||
solver_parabolic = DGSEM(solver.basis, flux_central, volume_integral_parabolic, solver.mortar) |
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.
solver_parabolic = DGSEM(solver.basis, flux_central, volume_integral_parabolic, solver.mortar) | |
solver_parabolic = DGSEM(solver.basis, flux_central, volume_integral_parabolic) |
We should probably not use Jesse's EC/ES mortars for parabolic terms...
… (convergence test seems OK)
…on in a breaking way without bumping the minor version
There might be three (slightly orthogonal) approaches to solve the current ugliness:
|
Thanks for these suggestions! Here are my initial thoughts (just spitballing)...
That would solve the current ugliness of BCs implemented in the gradient equations. But we'd still need to find a way to define/implement BCs for the gradients. How and where would we do that then?
This sounds like (potentially) a lot of boilerplate and requires even more complicated passing around of "unknown" data (unknown in the sense that a user reading the implementation does not know what is happening). Also, I would hate it if everyone was required to allow for this "extra" argument (that defaults to
That I don't understand. What does it mean to use a primal formulation and what would it look like? |
I would pass
It would look like the FD methods of https://doi.org/10.1007/s10915-009-9301-5. I'm not aware of an article using this approach with AMR, though, but I'm sure it's possible to figure that out. |
TODO
Maybe TODO (or in a subsequent PR)
SemidiscretizationParabolicAuxVars
dimension agnosticOpen questions/issues
ndims + 1
additional full systems (one gradient equation for each dimension + the parabolic system)