diff --git a/src/immersedBoundary/immersedBoundaryDynamicMesh/movingImmersedBoundary/movingImmersedBoundary.C b/src/immersedBoundary/immersedBoundaryDynamicMesh/movingImmersedBoundary/movingImmersedBoundary.C index 0098a5133..92bc07ce4 100644 --- a/src/immersedBoundary/immersedBoundaryDynamicMesh/movingImmersedBoundary/movingImmersedBoundary.C +++ b/src/immersedBoundary/immersedBoundaryDynamicMesh/movingImmersedBoundary/movingImmersedBoundary.C @@ -90,9 +90,6 @@ void Foam::movingImmersedBoundary::movePoints() const U.boundaryField()[patchID] ); - // Set refValue_ to moving boundary velocity - ibPatchField.refValue() = - transform(sbmfPtr_->velocity(), refIbSurface_.points()); const immersedBoundaryPolyPatch& cibPatch = refCast @@ -104,6 +101,10 @@ void Foam::movingImmersedBoundary::movePoints() const immersedBoundaryPolyPatch& ibPatch = const_cast(cibPatch); + // Set refValue_ to moving boundary velocity + ibPatchField.refValue() = + transform(sbmfPtr_->velocity(), ibPatch.ibMesh().coordinates()); + // Move points ibPatch.moveTriSurfacePoints (