Hello Ian, all,
Do you know if there is any performance penalty when multipatch is switched off?
I did not do extensive testing, but for the simple TOV only test that I did, I found no measurable slowdown when multipatch was switchted off compared not compiling in Multipatch.
I ran the TOVSolver testsuite test_tov_carpet.par with HLLE solver and TVD reconstruction and 64^3 grid for 100 iterations. The differences between using pointers and straight arrays was about 1%, sometimes (when running the same run more than once) pointers were faster, sometimes arrays (this is for gcc 4.6, on my laptop on a single core).
If you look at what was done then essentially pointers were introduced which point either to the local tensor variables (gaa) or to the global ones (gxx). Apparently using pointers still lets the compiler do all the optimizations and keeps track of aliasing. I do not know if this might change once we use cctk_lsh in the flesh to declare array dimensions rather than passing three individual integers per grid function.
So, no to my knowledge there is no performance penalty. Things will likely be different if one actually were doing the transformations but with a trivial jacobian (which would make the code a bit shorter and easier to read in some parts in part. GRHydro_Transform*.c).
Yours, Roland