Skip to content
Snippets Groups Projects
Commit 4d67e43f authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

include the proper creation time and date in the output file

[[Imported from SVN: r6921]]
parent ec206418
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
#include <fstream>
#include <vector>
#include <ctime>
#include <dune/common/exceptions.hh>
#include <dune/istl/bvector.hh>
......@@ -51,12 +52,15 @@ void writeRod(const std::vector<RigidBodyMotion<2> >& rod,
// /////////////////////
// Write header
// /////////////////////
time_t rawtime;
time (&rawtime);
std::ofstream outfile(filename.c_str());
outfile << "# AmiraMesh 3D ASCII 2.0" << std::endl;
outfile << std::endl;
outfile << "# CreationDate: Mon Jul 18 17:14:27 2005" << std::endl;
outfile << "# CreationDate: " << ctime(&rawtime) << std::endl;
outfile << std::endl;
outfile << std::endl;
outfile << "define Lines " << nLines << std::endl;
......@@ -127,11 +131,14 @@ void writeRod(const std::vector<RigidBodyMotion<3> >& rod,
// Write header
// /////////////////////
time_t rawtime;
time (&rawtime);
std::ofstream outfile(filename.c_str());
outfile << "# AmiraMesh 3D ASCII 2.0" << std::endl;
outfile << std::endl;
outfile << "# CreationDate: Mon Jul 18 17:14:27 2005" << std::endl;
outfile << "# CreationDate: " << ctime(&rawtime) << std::endl;
outfile << std::endl;
outfile << std::endl;
outfile << "nNodes " << nPoints << std::endl;
......@@ -184,11 +191,14 @@ void writeRodElementData(Dune::BlockVector<Dune::FieldVector<double, 1> >& data,
// Write header
// /////////////////////
time_t rawtime;
time (&rawtime);
std::ofstream outfile(filename.c_str());
outfile << "# AmiraMesh 3D ASCII 2.0" << std::endl;
outfile << std::endl;
outfile << "# CreationDate: Mon Jul 18 17:14:27 2005" << std::endl;
outfile << "# CreationDate: " << ctime(&rawtime) << std::endl;
outfile << std::endl;
outfile << std::endl;
outfile << "define Segments " << data.size() << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment