mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: Clean-up after latest Foundation integrations
This commit is contained in:
@ -196,10 +196,12 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
|
||||
|
||||
label mini = findMin(minVs);
|
||||
scalar minValue = minVs[mini];
|
||||
const label minCell = minCells[mini];
|
||||
const vector& minC = minCs[mini];
|
||||
|
||||
label maxi = findMax(maxVs);
|
||||
scalar maxValue = maxVs[maxi];
|
||||
const label maxCell = minCells[maxi];
|
||||
const vector& maxC = maxCs[maxi];
|
||||
|
||||
output
|
||||
|
||||
@ -986,11 +986,14 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
|
||||
{
|
||||
if (validField<scalar>(weightFieldName_))
|
||||
{
|
||||
scalarField weightField = getFieldValues<scalar>
|
||||
scalarField weightField
|
||||
(
|
||||
weightFieldName_,
|
||||
true,
|
||||
orientWeightField_
|
||||
getFieldValues<scalar>
|
||||
(
|
||||
weightFieldName_,
|
||||
true,
|
||||
orientWeightField_
|
||||
)
|
||||
);
|
||||
|
||||
// Process the fields
|
||||
@ -998,11 +1001,14 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
|
||||
}
|
||||
else if (validField<vector>(weightFieldName_))
|
||||
{
|
||||
vectorField weightField = getFieldValues<vector>
|
||||
vectorField weightField
|
||||
(
|
||||
weightFieldName_,
|
||||
true,
|
||||
orientWeightField_
|
||||
getFieldValues<vector>
|
||||
(
|
||||
weightFieldName_,
|
||||
true,
|
||||
orientWeightField_
|
||||
)
|
||||
);
|
||||
|
||||
// Process the fields
|
||||
|
||||
@ -147,17 +147,6 @@ processSameTypeValues
|
||||
break;
|
||||
}
|
||||
case opWeightedSum:
|
||||
{
|
||||
if (weightField.size())
|
||||
{
|
||||
result = sum(weightField*values);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = sum(values);
|
||||
}
|
||||
break;
|
||||
}
|
||||
{
|
||||
if (returnReduce(weightField.empty(), andOp<bool>()))
|
||||
{
|
||||
@ -165,7 +154,7 @@ processSameTypeValues
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp<scalarField> weight = weightingFactor(weightField);
|
||||
tmp<scalarField> weight(weightingFactor(weightField));
|
||||
|
||||
result = gSum(weight*values);
|
||||
}
|
||||
@ -202,7 +191,7 @@ processSameTypeValues
|
||||
}
|
||||
else
|
||||
{
|
||||
const scalarField factor = weightingFactor(weightField);
|
||||
const scalarField factor(weightingFactor(weightField));
|
||||
|
||||
result = gSum(factor*values)/(gSum(factor) + ROOTVSMALL);
|
||||
}
|
||||
@ -217,7 +206,7 @@ processSameTypeValues
|
||||
}
|
||||
case opWeightedAreaAverage:
|
||||
{
|
||||
const scalarField factor = weightingFactor(weightField, Sf);
|
||||
const scalarField factor(weightingFactor(weightField, Sf));
|
||||
|
||||
result = gSum(factor*values)/gSum(factor + ROOTVSMALL);
|
||||
break;
|
||||
@ -231,25 +220,11 @@ processSameTypeValues
|
||||
}
|
||||
case opWeightedAreaIntegrate:
|
||||
{
|
||||
const scalarField factor = weightingFactor(weightField, Sf);
|
||||
const scalarField factor(weightingFactor(weightField, Sf));
|
||||
|
||||
result = gSum(factor*values);
|
||||
break;
|
||||
}
|
||||
case opWeightedAreaIntegrate:
|
||||
{
|
||||
const scalarField magSf(mag(Sf));
|
||||
|
||||
if (weightField.size())
|
||||
{
|
||||
result = sum(weightField*magSf*values);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = sum(magSf*values);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case opMin:
|
||||
{
|
||||
result = gMin(values);
|
||||
|
||||
Reference in New Issue
Block a user