-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello Ian,
I'm not sure why MoL needs to even know about the group type (gf, scalar or array). I thought that Cactus flesh API was designed so that you can ask for a pointer to the variable, find the number of dimensions and size of the array, and loop over it, all without knowing whether it is a grid function or an array? Why does MoL know the difference? Knowing the difference means it has a lot of duplicated code, which is bad.
The issue comes from the scratch levels. For grid functions (which are all the same size but can only be allocated by the driver, though if we only need them for scratch one might not have to do so come to think of it) MoL uses the Scratch grid function. For grid arrays MoL uses malloc to get a chunk of memory itself (this is in InitialCopy.c). This chunk can differ from grid array to grid array since they all have different sizes.
Yes, MoL contains a lot of duplicated code. I hope to remove a lot of it after the IMEX code has been added. Though if someone else wants to clean it up instead you are very welcome.
Yours, Roland
- -- My email is as private as my paper mail. I therefore support encrypting and signing email messages. Get my PGP key from http://keys.gnupg.net.