BUG: reference FO: allocate interpolator on all processors. Fixes #823.

This commit is contained in:
mattijs
2018-05-24 09:52:33 +01:00
parent cb1cd96b04
commit 417a2f6a73

View File

@ -53,13 +53,15 @@ bool Foam::functionObjects::reference::calcType()
{
cellValue.value() = -pTraits<Type>::one*GREAT;
// Might trigger parallel comms (e.g. volPointInterpolation, if
// result is not yet cached) so have all processors do it
autoPtr<interpolation<Type>> interpolator
(
interpolation<Type>::New(interpolationScheme_, vf)
);
if (celli_ != -1)
{
autoPtr<interpolation<Type>> interpolator
(
interpolation<Type>::New(interpolationScheme_, vf)
);
cellValue.value() =
interpolator().interpolate(position_, celli_, -1);
}