mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: fieldMinMax: accessing uninitialised data (data not scattered)
This commit is contained in:
@ -73,16 +73,16 @@ void Foam::fieldMinMax::calcMinMaxFields
|
|||||||
Pstream::gatherList(maxVs);
|
Pstream::gatherList(maxVs);
|
||||||
Pstream::gatherList(maxCs);
|
Pstream::gatherList(maxCs);
|
||||||
|
|
||||||
label minI = findMin(minVs);
|
|
||||||
scalar minValue = minVs[minI];
|
|
||||||
const vector& minC = minCs[minI];
|
|
||||||
|
|
||||||
label maxI = findMax(maxVs);
|
|
||||||
scalar maxValue = maxVs[maxI];
|
|
||||||
const vector& maxC = maxCs[maxI];
|
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
|
label minI = findMin(minVs);
|
||||||
|
scalar minValue = minVs[minI];
|
||||||
|
const vector& minC = minCs[minI];
|
||||||
|
|
||||||
|
label maxI = findMax(maxVs);
|
||||||
|
scalar maxValue = maxVs[maxI];
|
||||||
|
const vector& maxC = maxCs[maxI];
|
||||||
|
|
||||||
if (write_)
|
if (write_)
|
||||||
{
|
{
|
||||||
fieldMinMaxFilePtr_()
|
fieldMinMaxFilePtr_()
|
||||||
@ -153,17 +153,16 @@ void Foam::fieldMinMax::calcMinMaxFields
|
|||||||
Pstream::gatherList(maxVs);
|
Pstream::gatherList(maxVs);
|
||||||
Pstream::gatherList(maxCs);
|
Pstream::gatherList(maxCs);
|
||||||
|
|
||||||
label minI = findMin(minVs);
|
|
||||||
Type minValue = minVs[minI];
|
|
||||||
const vector& minC = minCs[minI];
|
|
||||||
|
|
||||||
label maxI = findMax(maxVs);
|
|
||||||
Type maxValue = maxVs[maxI];
|
|
||||||
const vector& maxC = maxCs[maxI];
|
|
||||||
|
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
|
label minI = findMin(minVs);
|
||||||
|
Type minValue = minVs[minI];
|
||||||
|
const vector& minC = minCs[minI];
|
||||||
|
|
||||||
|
label maxI = findMax(maxVs);
|
||||||
|
Type maxValue = maxVs[maxI];
|
||||||
|
const vector& maxC = maxCs[maxI];
|
||||||
|
|
||||||
if (write_)
|
if (write_)
|
||||||
{
|
{
|
||||||
fieldMinMaxFilePtr_()
|
fieldMinMaxFilePtr_()
|
||||||
|
|||||||
Reference in New Issue
Block a user