Commit 0c48b153 authored by Henry Weller's avatar Henry Weller
Browse files

rigidBodyModel: Added operator<<(Ostream&, const rigidBodyModel&)

parent 33a97bb8
......@@ -84,7 +84,7 @@ int main(int argc, char *argv[])
rigidBodyModel pendulum1(dictionary(IFstream("pendulum")()));
rigidBodyModel pendulum = pendulum1;
pendulum.write(Info);
Info<< pendulum << endl;
// Create the joint-space state fields
scalarField q(pendulum.nDoF(), Zero);
......
......@@ -378,4 +378,13 @@ void Foam::RBD::rigidBodyModel::write(Ostream& os) const
}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
Foam::Ostream& Foam::RBD::operator<<(Ostream& os, const rigidBodyModel& rbm)
{
rbm.write(os);
return os;
}
// ************************************************************************* //
......@@ -61,6 +61,12 @@ namespace Foam
namespace RBD
{
// Forward declaration of friend functions and operators
class rigidBodyModel;
Ostream& operator<<(Ostream&, const rigidBodyModel&);
/*---------------------------------------------------------------------------*\
Class rigidBodyModel Declaration
\*---------------------------------------------------------------------------*/
......@@ -326,6 +332,11 @@ public:
//- Write
virtual void write(Ostream&) const;
// Ostream Operator
friend Ostream& operator<<(Ostream&, const rigidBodyModel&);
};
......
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