||March 13, 2010 16:27
problem interrogating min/max face velocity
In CourantNo.H, the max magnitude of the velocity at a face is reported as
velMag = max(mag(phi)/mesh.magSf()).value();
I'd like to interrogate the result in detail, so I add the following:
Info << "max phi/magSf = " << max(phi/mesh.magSf()).value() << endl;
Info << "min phi/magSf = " << min(phi/mesh.magSf()).value() << endl;
Info << i << " " << phi[i]
<< " " << mesh.magSf()[i]
<< " " << phi[i]/mesh.magSf()[i]
With this bit of code, and using 1.6.x, I am able to find agreement with the max operator (i.e. the loop reports a max value of 5410 which is the same value reported by the max operator), but I am not
able to find agreement with the min operator. The min operator reports a value of -12472 while the loop reports a min value of "only" -2710.
This is serial execution -- all faces belong to a single mesh on a single processor. The number of values reported in the loop, phi.size(), and magSf().size() are all equal.
Any ideas how I might be getting this wrong?