Commit fce112a9 authored by frey_m's avatar frey_m
Browse files

AMR test case: Bug in computation of total charge if we do not have to scale

               by cell volume.

modified:   ippl/test/AMR/helper_functions.h
parent f1a87d31
......@@ -293,9 +293,9 @@ inline double totalCharge(const container_t& rhs,
for (int i = 0; i <= finest_level; ++i) {
Real vol = (*(geom[i].CellSize()) * *(geom[i].CellSize()) * *(geom[i].CellSize()) );
#ifdef UNIQUE_PTR
Real sum = rhs[i]->sum(0) * vol * scale;
Real sum = (scale) ? rhs[i]->sum(0) * vol : rhs[i]->sum(0);
#else
Real sum = rhs[i].sum(0) * vol * scale;
Real sum = (scale) ? rhs[i].sum(0) * vol : rhs[i].sum(0);
#endif
totCharge += sum;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment