81 std::cerr <<
"format not found" << std::endl;
93 std::stringstream file_name;
94 std::ofstream script_file;
95 file_name <<
getName() <<
".xballs";
96 script_file.open((file_name.str()).c_str());
99 script_file <<
"#!/bin/bash" << std::endl;
100 script_file <<
"x=$(echo $0 | cut -c2-)" << std::endl;
101 script_file <<
"file=$PWD$x" << std::endl;
102 script_file <<
"dirname=`dirname \"$file\"`" << std::endl;
103 script_file <<
"cd $dirname" << std::endl;
107 int verticalOffset = 0;
144 if (verticalOffset >= 1)
145 script_file <<
" -o " << verticalOffset;
146 else if (verticalOffset >= 1)
147 script_file <<
" -mo " << -verticalOffset;
148 if (horizontalOffset >= 1)
149 script_file <<
" -moh " << horizontalOffset;
150 else if (horizontalOffset >= 1)
151 script_file <<
" -oh " << -horizontalOffset;
163 chmod((file_name.str().c_str()), S_IRWXU);
Mdouble X
the vector components
int getXBallsColourMode() const
Get the xball colour mode (CMode)
unsigned int getSystemDimensions() const
Returns the dimension of the simulation. Note there is also a particle dimension. ...
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax...
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin...
const std::string getFullName() const
Also allows to access the file name, however with additional information which is the file counter...
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin...
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
virtual void outputXBallsDataParticle(const unsigned int i, const unsigned int format, std::ostream &os) const
This function writes out the particle locations into an output stream in a format the XBalls program ...
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
const Vec3D & getOrientation() const
Returns the orientation of this BaseInteractable.
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax...
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created...
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
virtual void writeXBallsScript() const
This writes a script which can be used to load the xballs problem to display the data just generated...
File dataFile
An instance of class File to handle in- and output into a .data file.
Mdouble getRadius() const
Returns the particle's radius_.
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax...
virtual double getInfo(const BaseParticle &P) const
A virtual method that allows the user to overrride and set what is written into the info column in th...
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin...
double getXBallsVectorScale() const
Returns the scale of vectors used in xballs.
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
Implementation of a 3D vector (by Vitaliy).
std::string getXBallsAdditionalArguments() const
double getXBallsScale() const
Returns the scale of the view in xballs.
const std::string & getName() const
Returns the name of the file. Does not allow to change it though.
const std::string getMercuryBuildDir()