Skip to content
Snippets Groups Projects
Commit fa2f714f authored by Carlo Camilloni's avatar Carlo Camilloni
Browse files

HISTOGRAM: workaround for floor approximation in grid assignment

parent 2508f0f5
No related branches found
No related tags found
No related merge requests found
......@@ -215,6 +215,12 @@ void Histogram::performAnalysis(){
} else {
for(unsigned i=0;i<getNumberOfDataPoints();++i){
getDataPoint( i, point, weight );
// Without KERNEL the point are assigned with a lower approximation (floor)
// in order to have a correct assigmnet points must be translated of half
// the mesh
std::vector<double> dx_;
dx_ = gg->getDx();
for(unsigned j=0;j<point.size();j++) point[j]+=0.5*dx_[j];
gg->addValue(gg->getIndex(point), weight);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment