#956: Allow skipping setting the RHS to zero in MoL -----------------------------------+---------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Keywords: | -----------------------------------+---------------------------------------- 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.
#956: Allow skipping setting the RHS to zero in MoL ------------------------------------+--------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: review Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: ------------------------------------+--------------------------------------- Changes (by eschnett):
* status: new => review
#956: Allow skipping setting the RHS to zero in MoL ------------------------------------+--------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: review Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: ------------------------------------+---------------------------------------
Comment (by rhaas):
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.
#956: Allow skipping setting the RHS to zero in MoL ------------------------------------+--------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: closed Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: fixed | Keywords: ------------------------------------+--------------------------------------- Changes (by eschnett):
* status: review => closed * resolution: => fixed
Comment:
Applied.
#956: Allow skipping setting the RHS to zero in MoL ------------------------------------+--------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: closed Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: fixed | Keywords: ------------------------------------+---------------------------------------
Comment (by rhaas):
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?
#956: Allow skipping setting the RHS to zero in MoL ------------------------------------+--------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: closed Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: fixed | Keywords: ------------------------------------+---------------------------------------
Comment (by eschnett):
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.
trac@lists.einsteintoolkit.org