Jens
Carpet offers two versions of the "sum" reduction:
The regular "sum" reduction is scaled by the volume of the refinement levels, i.e. each level is scaled by a factor of 1/8. This would affect the total you are seeing. This is done because that is what people need most of the time, e.g. to calculate the total mass of a neutron star.
There is also an "isum" reduction that is not scaled this way. This simply adds all values from all grid points (but still excluding ghosts, boundaries etc.).
If you only want the sum over the finest level, then you should call the reduction operation in level mode, not in global mode. It will then return the result only from the current level.
-erik
On Wed, Jul 19, 2017 at 3:52 AM, Jens Mahlmann jensmahl@alumni.uv.es wrote:
Dear all,
I am currently encountering some strange behavior when using the CCTK_Reduce "sum" reduction. I observe that CCTK_Reduce would return a global "sum" (=0.06) which is between the global "minimum" (=0.0) and the global "maximum" (=6.6). In the global mode I am calling
CCTK_Reduce(cctkGH, -1, CCTK_ReductionHandle("sum"), 1, CCTK_VARIABLE_REAL, target_var, 1, CCTK_VarIndex("Thorn::source_var"))
Maybe somebody has an instant idea what I should look for to fix this to have the desired summation? Especially, I would be interested in summing up the values only on the finest refinement level. Is there a standard, best-practice way to do so?
Thank you very much and my best
Jens
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users