Commit 371619bc authored by mattijs's avatar mattijs
Browse files

BUG: rigidBodyMeshMotion: do not access uninitialised. Fixes #2127

parent 9823ddd4
......@@ -260,7 +260,11 @@ void Foam::rigidBodyMeshMotion::solve()
ramp*t.lookupObject<uniformDimensionedVectorField>("g").value();
}
vector oldPos = model_.cCofR(bodyIdCofG_);
vector oldPos(vector::uniform(GREAT));
if (bodyIdCofG_ != -1)
{
oldPos = model_.cCofR(bodyIdCofG_);
}
if (test_)
{
......
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