[Developers] Re: MoL usage: RHS for one equation is S-and-R for another?
Ian Hawke
hawke at aei.mpg.de
Fri May 13 06:09:49 CDT 2005
On Fri, 13 May 2005, Jonathan Thornburg wrote:
> Suppose I have a system of equations time-integrated with MoL
>
> partial_t A :=: A_rhs = fn(A,B) (1)
> partial_t B :=: B_rhs = fn(A_rhs,B) (2)
>
> Thatis, the B rhs computation uses the results of the A rhs computation.
> And further suppose that we have separate thorns doing these rhs
> computations.
>
> Clearly the A rhs thorn should register (A,A_rhs) as a (state-vector,rhs)
> pair with MoL, and register B with MoL as S-and-R.
> And the B rhs thorn should register (B,B_rhs) as a (state-vector,rhs) pair
> with MoL. But am I correct to, in the B rhs thorn, register A_rhs with
> MoL as S-and-R?
In theory the answer is yes, because in theory thorn B does not know that
the time derivative of A, A_rhs, is being computed in a MoL compatible
sense. It could be computed by some other thorn. Then, of course, there is
the question of where it is schedule w.r.t MoL, but that would, in theory,
be the problem of the thorn computing A_rhs.
In practice you do _not_ want to register A_rhs as a S-and-R grid function
for a number of reasons. Firstly I assume that your thorn B is getting
A_rhs by inheritance so you "know" that all thorns providing A_rhs will
use MoL. Therefore it's a waste of time. Secondly, SandR GFs require two
timelevels whilst RHS GFs require only one - it's a waste of memory.
Thirdly there is no reason to do so, and the extra computation required in
shuffling the SandR timelevels will be wasted.
I can't see why it wouldn't work to leave it unregistered from thorn B.
Ian
More information about the Developers
mailing list