mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: face source: updated sumDirection op for vector
This commit is contained in:
@ -540,23 +540,7 @@ Foam::vector Foam::fieldValues::faceSource::processValues
|
||||
case opSumDirection:
|
||||
{
|
||||
const vector direction(dict_.lookup("direction"));
|
||||
|
||||
vector v(vector::zero);
|
||||
|
||||
forAll(Sf, i)
|
||||
{
|
||||
scalar d = Sf[i] & direction;
|
||||
if (d > 0)
|
||||
{
|
||||
v += pos(values[i] & direction)*values[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
v += neg(values[i] & direction)*values[i];
|
||||
}
|
||||
}
|
||||
|
||||
return v;
|
||||
return sum(pos(values & direction)*values);
|
||||
}
|
||||
case opAreaNormalAverage:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user