autoscale fix

This commit is contained in:
Joachim Schoeberl 2013-07-10 14:51:25 +00:00
parent 7aa13b2cdd
commit 1da60d3e5c

View File

@ -2397,7 +2397,8 @@ namespace netgen
// bool considerElem; // bool considerElem;
bool hasit = false; bool hasit = false;
minv = 0; maxv = 1; minv = numeric_limits<double>::max();
maxv = -numeric_limits<double>::max();
if ((ntasks == 1) || (id > 0)) if ((ntasks == 1) || (id > 0))
if (funcnr != -1) if (funcnr != -1)
@ -2409,8 +2410,8 @@ namespace netgen
NgProfiler::RegionTimer reg1 (timer1); NgProfiler::RegionTimer reg1 (timer1);
int ne = mesh->GetNE(); int ne = mesh->GetNE();
double hmax = -numeric_limits<double>::max(); double hmax = maxv;
double hmin = numeric_limits<double>::max(); double hmin = minv;
#pragma omp parallel for reduction (max : hmax) reduction (min : hmin) #pragma omp parallel for reduction (max : hmax) reduction (min : hmin)
for (int i = 0; i < ne; i++) for (int i = 0; i < ne; i++)