Commit 417a2f6a authored by mattijs's avatar mattijs
Browse files

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

parent cb1cd96b
......@@ -53,13 +53,15 @@ bool Foam::functionObjects::reference::calcType()
{
cellValue.value() = -pTraits<Type>::one*GREAT;
if (celli_ != -1)
{
// 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)
{
cellValue.value() =
interpolator().interpolate(position_, celli_, -1);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment