mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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.
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user