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,6 +73,8 @@ void Foam::fieldMinMax::calcMinMaxFields
|
|||||||
Pstream::gatherList(maxVs);
|
Pstream::gatherList(maxVs);
|
||||||
Pstream::gatherList(maxCs);
|
Pstream::gatherList(maxCs);
|
||||||
|
|
||||||
|
if (Pstream::master())
|
||||||
|
{
|
||||||
label minI = findMin(minVs);
|
label minI = findMin(minVs);
|
||||||
scalar minValue = minVs[minI];
|
scalar minValue = minVs[minI];
|
||||||
const vector& minC = minCs[minI];
|
const vector& minC = minCs[minI];
|
||||||
@ -81,8 +83,6 @@ void Foam::fieldMinMax::calcMinMaxFields
|
|||||||
scalar maxValue = maxVs[maxI];
|
scalar maxValue = maxVs[maxI];
|
||||||
const vector& maxC = maxCs[maxI];
|
const vector& maxC = maxCs[maxI];
|
||||||
|
|
||||||
if (Pstream::master())
|
|
||||||
{
|
|
||||||
if (write_)
|
if (write_)
|
||||||
{
|
{
|
||||||
fieldMinMaxFilePtr_()
|
fieldMinMaxFilePtr_()
|
||||||
@ -153,6 +153,8 @@ void Foam::fieldMinMax::calcMinMaxFields
|
|||||||
Pstream::gatherList(maxVs);
|
Pstream::gatherList(maxVs);
|
||||||
Pstream::gatherList(maxCs);
|
Pstream::gatherList(maxCs);
|
||||||
|
|
||||||
|
if (Pstream::master())
|
||||||
|
{
|
||||||
label minI = findMin(minVs);
|
label minI = findMin(minVs);
|
||||||
Type minValue = minVs[minI];
|
Type minValue = minVs[minI];
|
||||||
const vector& minC = minCs[minI];
|
const vector& minC = minCs[minI];
|
||||||
@ -161,9 +163,6 @@ void Foam::fieldMinMax::calcMinMaxFields
|
|||||||
Type maxValue = maxVs[maxI];
|
Type maxValue = maxVs[maxI];
|
||||||
const vector& maxC = maxCs[maxI];
|
const vector& maxC = maxCs[maxI];
|
||||||
|
|
||||||
|
|
||||||
if (Pstream::master())
|
|
||||||
{
|
|
||||||
if (write_)
|
if (write_)
|
||||||
{
|
{
|
||||||
fieldMinMaxFilePtr_()
|
fieldMinMaxFilePtr_()
|
||||||
|
|||||||
Reference in New Issue
Block a user