<div dir="ltr">Jens<div><br></div><div>Carpet offers two versions of the "sum" reduction:</div><div><br></div><div>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.</div><div><br></div><div>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.).</div><div><br></div><div>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.</div><div><br></div><div>-erik</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 19, 2017 at 3:52 AM, Jens Mahlmann <span dir="ltr"><<a href="mailto:jensmahl@alumni.uv.es" target="_blank">jensmahl@alumni.uv.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
<br>
I am currently encountering some strange behavior when using the<br>
CCTK_Reduce "sum" reduction. I observe that CCTK_Reduce would return a<br>
global "sum" (=0.06) which is between the global "minimum" (=0.0) and<br>
the global "maximum" (=6.6). In the global mode I am calling<br>
<br>
CCTK_Reduce(cctkGH, -1, CCTK_ReductionHandle("sum"), 1,<br>
CCTK_VARIABLE_REAL,<br>
target_var, 1,<br>
CCTK_VarIndex("Thorn::source_<wbr>var"))<br>
<br>
Maybe somebody has an instant idea what I should look for to fix this to<br>
have the desired summation? Especially, I would be interested in summing<br>
up the values only on the finest refinement level. Is there a standard,<br>
best-practice way to do so?<br>
<br>
Thank you very much and my best<br>
<br>
Jens<br>
<br>
______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@einsteintoolkit.org">Users@einsteintoolkit.org</a><br>
<a href="http://lists.einsteintoolkit.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.einsteintoolkit.<wbr>org/mailman/listinfo/users</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Erik Schnetter <<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>><br><a href="http://www.perimeterinstitute.ca/personal/eschnetter/" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a></div><div><br></div></div></div>
</div>