Commit fbcfa196 authored by graham's avatar graham
Browse files

BUG: sixDoFRigidBodyMotion. Was not skipping constraints and

restraints when there were none read.  Was not a problem for
restraints, but constraints were stopping the code on a maxIteration
trap, as it defaults to zero.
parent 9c52c9f1
......@@ -30,6 +30,11 @@ License
void Foam::sixDoFRigidBodyMotion::applyRestraints()
{
if (restraints_.size() == 0)
{
return;
}
if (Pstream::master())
{
forAll(restraints_, rI)
......@@ -57,6 +62,11 @@ void Foam::sixDoFRigidBodyMotion::applyRestraints()
void Foam::sixDoFRigidBodyMotion::applyConstraints(scalar deltaT)
{
if (constraints_.size() == 0)
{
return;
}
if (Pstream::master())
{
label iter = 0;
......
......@@ -69,6 +69,9 @@ bool Foam::sixDoFRigidBodyMotionConstraint::read
const dictionary& sDoFRBMCDict
)
{
name_ =
fileName(sDoFRBMCDict.name().name()).components(token::COLON).last();
tolerance_ = (readScalar(sDoFRBMCDict.lookup("tolerance")));
relaxationFactor_ = sDoFRBMCDict.lookupOrDefault<scalar>
......
......@@ -64,6 +64,9 @@ bool Foam::sixDoFRigidBodyMotionRestraint::read
const dictionary& sDoFRBMRDict
)
{
name_ =
fileName(sDoFRBMRDict.name().name()).components(token::COLON).last();
sDoFRBMRCoeffs_ = sDoFRBMRDict.subDict(type() + "Coeffs");
return true;
......
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