[Developers] Making WaveToy use InitBase
schnetter at cct.lsu.edu
Tue Mar 11 12:36:29 CST 2008
On Mar 10, 2008, at 04:16:38, Thomas Radke wrote:
> Erik Schnetter wrote:
>> The IDScalarWave thorns currently initialise exactly two time
>> levels. This is inconvenient for mesh refinement: If three time
>> levels are needed, then Carpet has to perform an additional
>> initialisation step and cannot rely on the analytic solution for
>> initial data. Furthermore, if this is not done, the third time
>> level remains uninitialised, leading to problems that are very
>> difficult to detect, since people typically don't output past time
>> I suggest to make IDScalarWave use the InitBase infrastructure to
>> detect this problem. In particular, if InitBase specifies that
>> only a single time level is to be initialised, IDScalarWave should
>> do so, and if all time levels should be initialised, IDScalarWave
>> should either also do so, or abort with an error message during
>> parameter checking.
> Hi Erik,
> the attached patch for CactusWave/IDScalarWaveC checks how many
> timelevels are currently active, and initialises them. This should
> make it work again with Carpet.
> Note that InitBase is not (explicitely) used for the check; do you
> think it should be ?
Hmm. With your patch, WaveToy initialises all possible time levels.
I can't think of a way in which this could be unsafe. It could be too
much work if something else overwrites the past time levels later on,
but this doesn't really matter since WaveToy's initialisation is fast
enough. However, WaveToy is also supposed to be an example, so
checking InitBase may be good educationally.
I think there should be a check when InitBase requests all time levels
to be initialised. WaveToy will never initialise more than 3 time
levels. If someone uses 5 time levels (e.g. for a fourth order
accurate time interpolation scheme), then Wavetoy will leave
uninitialised time levels. Instead, it should emit an error message
(since we don't want to implement the code for initialising further
time levels). However, it is currently not possible to activate more
than 3 time levels without changing WaveToy's interface.ccl -- the
danger would be that someone makes this change without updating the
I also notice that you only initialise the _p variables when there are
3 time levels active. These should be initialised when there are two
or more time levels active.
Erik Schnetter <schnetter at cct.lsu.edu> http://www.cct.lsu.edu/~eschnett/
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/developers/attachments/20080311/f928296a/attachment.bin
More information about the Developers