mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: avoid ternary mismatch in PatchFunction1
- SubField<vector> vs Field<vector>
This commit is contained in:
@ -135,10 +135,8 @@ Foam::PatchFunction1<Type>::localPosition(const pointField& globalPos) const
|
|||||||
{
|
{
|
||||||
return globalPos;
|
return globalPos;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return coordSys_.coordSys()().localPosition(globalPos);
|
return coordSys_.coordSys()().localPosition(globalPos);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -153,13 +151,13 @@ Foam::tmp<Foam::Field<Type>> Foam::PatchFunction1<Type>::transform
|
|||||||
return tfld;
|
return tfld;
|
||||||
}
|
}
|
||||||
|
|
||||||
const pointField& fc =
|
tmp<Field<Type>> tresult =
|
||||||
(
|
(
|
||||||
faceValues_
|
faceValues_
|
||||||
? this->patch_.faceCentres()
|
? this->coordSys_.transform(this->patch_.faceCentres(), tfld())
|
||||||
: this->patch_.localPoints()
|
: this->coordSys_.transform(this->patch_.localPoints(), tfld())
|
||||||
);
|
);
|
||||||
auto tresult = this->coordSys_.transform(fc, tfld());
|
|
||||||
tfld.clear();
|
tfld.clear();
|
||||||
return tresult;
|
return tresult;
|
||||||
}
|
}
|
||||||
@ -176,13 +174,14 @@ Foam::tmp<Foam::Field<Type>> Foam::PatchFunction1<Type>::transform
|
|||||||
return fld;
|
return fld;
|
||||||
}
|
}
|
||||||
|
|
||||||
const pointField& fc =
|
if (faceValues_)
|
||||||
(
|
{
|
||||||
faceValues_
|
return this->coordSys_.transform(this->patch_.faceCentres(), fld);
|
||||||
? this->patch_.faceCentres()
|
}
|
||||||
: this->patch_.localPoints()
|
else
|
||||||
);
|
{
|
||||||
return this->coordSys_.transform(fc, fld);
|
return this->coordSys_.transform(this->patch_.localPoints(), fld);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user