mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: sixDoFRigidBodyMotion, calling boolean function along with
boolean test was not actually calling the function. Probably optimised out.
This commit is contained in:
@ -61,7 +61,7 @@ void Foam::sixDoFRigidBodyMotion::applyConstraints(scalar deltaT)
|
|||||||
{
|
{
|
||||||
label iter = 0;
|
label iter = 0;
|
||||||
|
|
||||||
bool converged = true;
|
bool allConverged = true;
|
||||||
|
|
||||||
// constraint force accumulator
|
// constraint force accumulator
|
||||||
vector cFA = vector::zero;
|
vector cFA = vector::zero;
|
||||||
@ -86,7 +86,7 @@ void Foam::sixDoFRigidBodyMotion::applyConstraints(scalar deltaT)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
converged = true;
|
allConverged = true;
|
||||||
|
|
||||||
forAll(constraints_, cI)
|
forAll(constraints_, cI)
|
||||||
{
|
{
|
||||||
@ -101,7 +101,7 @@ void Foam::sixDoFRigidBodyMotion::applyConstraints(scalar deltaT)
|
|||||||
// constraint moment
|
// constraint moment
|
||||||
vector cM = vector::zero;
|
vector cM = vector::zero;
|
||||||
|
|
||||||
converged = converged && constraints_[cI].constrain
|
bool constraintConverged = constraints_[cI].constrain
|
||||||
(
|
(
|
||||||
*this,
|
*this,
|
||||||
cFA,
|
cFA,
|
||||||
@ -112,6 +112,8 @@ void Foam::sixDoFRigidBodyMotion::applyConstraints(scalar deltaT)
|
|||||||
cM
|
cM
|
||||||
);
|
);
|
||||||
|
|
||||||
|
allConverged = allConverged && constraintConverged;
|
||||||
|
|
||||||
// Accumulate constraint force
|
// Accumulate constraint force
|
||||||
cFA += cF;
|
cFA += cF;
|
||||||
|
|
||||||
@ -119,7 +121,7 @@ void Foam::sixDoFRigidBodyMotion::applyConstraints(scalar deltaT)
|
|||||||
cMA += cM + ((cP - centreOfMass()) ^ cF);
|
cMA += cM + ((cP - centreOfMass()) ^ cF);
|
||||||
}
|
}
|
||||||
|
|
||||||
} while(!converged);
|
} while(!allConverged);
|
||||||
|
|
||||||
Info<< "Constraints converged in " << iter << " iterations" << nl
|
Info<< "Constraints converged in " << iter << " iterations" << nl
|
||||||
<< "Constraint force: " << cFA << nl
|
<< "Constraint force: " << cFA << nl
|
||||||
|
|||||||
Reference in New Issue
Block a user