- changed status to open
- removed comment
Allow skipping setting the RHS to zero in MoL
By default, MoL initialises the RHS variables to zero before calling the CalcRHS routines. This is (a) superfluous in a well-written code, and (b) makes it impossible to re-use a RHS that has been calculated ahead of time, e.g. at the end of the previous time step.
This patch adds a parameter to disable this behaviour.
Keyword:
Comments (5)
-
reporter -
- removed comment
The proposed change seems harmless. ok to apply. not clearing has the advantage that any possible poisoning stays visible in regions not overwritten by the use thorn.
-
reporter - changed status to resolved
- removed comment
Applied.
-
- removed comment
Thinking about this a bit more, what happens in the following situation:
- Carpet poisons new memory incl. the RHS when it is first allocated
- most thorns put nothing into the ghost zones when computing the RHS, so they stay poisoned
- in the buffer zones, until the full RK step is done, the poison accumulates possibly creating an overflow and/or triggering a NaN check inside MoL_Add (if it was turned on)
Is this what would happen?
-
reporter - removed comment
Yes, this is what would happen.
Without the nan checks, the nans would not cause a problem, except possibly slow things down.
The upshot is: don't do this; if you don't set all RHS grid points yourself, then don't use this flag.
- Log in to comment