From 423ed38986145cbe5aabb9946e90d52acef4680f Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 19 Jul 2018 18:03:10 +0100 Subject: [PATCH] COMP: rigidBodyDynamics: add Time& argument to make them compile --- applications/test/rigidBodyDynamics/pendulum/pendulum | 4 ++-- applications/test/rigidBodyDynamics/pendulum/pendulum.C | 6 +++++- .../pendulumAndSpring/pendulumAndSpring.C | 6 +++++- .../test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C | 7 ++++++- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/applications/test/rigidBodyDynamics/pendulum/pendulum b/applications/test/rigidBodyDynamics/pendulum/pendulum index 3a6b4b1843..35748dc4fa 100644 --- a/applications/test/rigidBodyDynamics/pendulum/pendulum +++ b/applications/test/rigidBodyDynamics/pendulum/pendulum @@ -4,7 +4,7 @@ bodies0 { type rigidBody; mass 1; - centreOfMass (0 -1 0); + //centreOfMass (0 -1 0); inertia (0.001 0 0 0.001 0 0.001); parent root; transform (1 0 0 0 1 0 0 0 1) (0 0 0); @@ -32,7 +32,7 @@ bodies type sphere; mass 1; radius 0.05; - centreOfMass (0 10 0); + centreOfMass (0 10 0); // used with mass+radius to set intertia transform (1 0 0 0 1 0 0 0 1) (0 -1 0); mergeWith hinge; } diff --git a/applications/test/rigidBodyDynamics/pendulum/pendulum.C b/applications/test/rigidBodyDynamics/pendulum/pendulum.C index cc9fc374e5..73be2e1b87 100644 --- a/applications/test/rigidBodyDynamics/pendulum/pendulum.C +++ b/applications/test/rigidBodyDynamics/pendulum/pendulum.C @@ -36,6 +36,8 @@ Description #include "sphere.H" #include "joints.H" #include "IFstream.H" +#include "argList.H" +#include "Time.H" using namespace Foam; using namespace RBD; @@ -44,6 +46,8 @@ using namespace RBD; int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" /* bool testMerge = true; @@ -82,7 +86,7 @@ int main(int argc, char *argv[]) */ // Create the pendulum model from dictionary - rigidBodyModel pendulum(dictionary(IFstream("pendulum")())); + rigidBodyModel pendulum(runTime, dictionary(IFstream("pendulum")())); Info<< pendulum << endl; diff --git a/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C b/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C index 2597932290..5da5d7f336 100644 --- a/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C +++ b/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C @@ -37,6 +37,8 @@ Description #include "rigidBodyModelState.H" #include "Fstream.H" #include "constants.H" +#include "argList.H" +#include "Time.H" using namespace Foam; using namespace RBD; @@ -46,10 +48,12 @@ using namespace Foam::constant::mathematical; int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" dictionary pendulumAndSpringDict(IFstream("pendulumAndSpring")()); // Create the pendulumAndSpring model from dictionary - rigidBodyMotion pendulumAndSpring(pendulumAndSpringDict); + rigidBodyMotion pendulumAndSpring(runTime, pendulumAndSpringDict); label nIter(readLabel(pendulumAndSpringDict.lookup("nIter"))); diff --git a/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C b/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C index db4f5ca062..f61dfe03b4 100644 --- a/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C +++ b/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C @@ -36,6 +36,8 @@ Description #include "rigidBodyRestraint.H" #include "rigidBodyModelState.H" #include "Fstream.H" +#include "argList.H" +#include "Time.H" using namespace Foam; using namespace RBD; @@ -44,10 +46,13 @@ using namespace RBD; int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + dictionary sphericalJointDict(IFstream("sphericalJoint")()); // Create the sphericalJoint model from dictionary - rigidBodyMotion sphericalJoint(sphericalJointDict); + rigidBodyMotion sphericalJoint(runTime, sphericalJointDict); label nIter(readLabel(sphericalJointDict.lookup("nIter")));