mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: incorrect statistics in parallel. Also removed sign of magSf.
This commit is contained in:
@ -80,10 +80,11 @@ void Foam::fieldValues::cellSource::setCellZoneCells()
|
||||
}
|
||||
|
||||
cellId_.setSize(count);
|
||||
nCells_ = returnReduce(cellId_.size(), sumOp<label>());
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Original cell zone size = " << cZone.size()
|
||||
Pout<< "Original cell zone size = " << cZone.size()
|
||||
<< ", new size = " << count << endl;
|
||||
}
|
||||
}
|
||||
@ -109,8 +110,8 @@ void Foam::fieldValues::cellSource::initialise(const dictionary& dict)
|
||||
}
|
||||
|
||||
Info<< type() << " " << name_ << ":" << nl
|
||||
<< " total cells = " << cellId_.size() << nl
|
||||
<< " total volume = " << sum(filterField(mesh().V()))
|
||||
<< " total cells = " << nCells_ << nl
|
||||
<< " total volume = " << gSum(filterField(mesh().V()))
|
||||
<< nl << endl;
|
||||
|
||||
if (operation_ == opWeightedAverage)
|
||||
@ -144,7 +145,7 @@ void Foam::fieldValues::cellSource::writeFileHeader()
|
||||
{
|
||||
outputFilePtr_()
|
||||
<< "# Source : " << sourceTypeNames_[source_] << " "
|
||||
<< sourceName_ << nl << "# Cells : " << cellId_.size() << nl
|
||||
<< sourceName_ << nl << "# Cells : " << nCells_ << nl
|
||||
<< "# Time" << tab << "sum(V)";
|
||||
|
||||
forAll(fields_, i)
|
||||
@ -172,6 +173,7 @@ Foam::fieldValues::cellSource::cellSource
|
||||
fieldValue(name, obr, dict, loadFromFiles),
|
||||
source_(sourceTypeNames_.read(dict.lookup("source"))),
|
||||
operation_(operationTypeNames_.read(dict.lookup("operation"))),
|
||||
nCells_(0),
|
||||
cellId_()
|
||||
{
|
||||
read(dict);
|
||||
|
||||
@ -133,6 +133,9 @@ protected:
|
||||
//- Operation to apply to values
|
||||
operationType operation_;
|
||||
|
||||
//- Global number of cells
|
||||
label nCells_;
|
||||
|
||||
//- Local list of cell IDs
|
||||
labelList cellId_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user