From b0d331aba7d95e081370a1a84dec8cf1302dea12 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 8 Apr 2016 17:25:17 +0100 Subject: [PATCH] rigidBodyModel: Add a few more comments --- src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C b/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C index 6e38206b5..e292fcb52 100644 --- a/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C +++ b/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C @@ -229,7 +229,7 @@ Foam::label Foam::RBD::rigidBodyModel::join ); } - // For the final joint in the set add the read body + // For the final joint in the set add the real body parent = join_ ( parent, @@ -237,6 +237,9 @@ Foam::label Foam::RBD::rigidBodyModel::join autoPtr(cJointPtr.ptr()), bodyPtr ); + + // Set the properties of the last joint in the list to those set + // by rigidBodyModel cJoint.setLastJoint(); return parent; @@ -340,8 +343,11 @@ void Foam::RBD::rigidBodyModel::write(Ostream& os) const os << indent << "bodies" << nl << indent << token::BEGIN_BLOCK << incrIndent << nl; + // Write the moving bodies for (label i=1; i(bodies_[i])) { os << indent << bodies_[i].name() << nl @@ -361,6 +367,7 @@ void Foam::RBD::rigidBodyModel::write(Ostream& os) const } } + // Write the bodies merged into the parent bodies for efficiency forAll(mergedBodies_, i) { os << indent << mergedBodies_[i].name() << nl