Commit 459085df authored by Anton Gladky's avatar Anton Gladky
Browse files

Fix compilation with GCC-5. (Closes: #778190)

parent f1b7637d
......@@ -65,6 +65,7 @@ using std::make_pair;
#include <boost/foreach.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/filesystem/convenience.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/exception.hpp>
#include <boost/numeric/conversion/bounds.hpp>
......
......@@ -19,9 +19,8 @@ YADE_PLUGIN((Disp2DPropLoadEngine));
void Disp2DPropLoadEngine::postLoad(Disp2DPropLoadEngine&)
{
std::string outputFile="DirSearch" + Key + "Yade";
bool file_exists = std::ifstream (outputFile.c_str()); //if file does not exist, we will write colums titles
ofile.open(outputFile.c_str(), std::ios::app);
if (!file_exists) ofile<<"theta (!angle in plane (gamma,-du) ) dtau (kPa) dsigma (kPa) dgamma (m) du (m) tau0 (kPa) sigma0 (kPa) d2W coordSs0 coordTot0 coordSsF coordTotF (Yade)" << endl;
if (!boost::filesystem::exists( outputFile.c_str() )) ofile<<"theta (!angle in plane (gamma,-du) ) dtau (kPa) dsigma (kPa) dgamma (m) du (m) tau0 (kPa) sigma0 (kPa) d2W coordSs0 coordTot0 coordSsF coordTotF (Yade)" << endl;
}
......
......@@ -29,9 +29,8 @@ MicroMacroAnalyser::~MicroMacroAnalyser(){ /*delete analyser;*/} //no need, its
void MicroMacroAnalyser::postLoad(MicroMacroAnalyser&)
{
bool file_exists = std::ifstream(outputFile.c_str()); //if file does not exist, we will write colums titles
ofile.open(outputFile.c_str(), std::ios::app);
if (!file_exists) ofile<<"iteration eps1w eps2w eps3w eps11g eps22g eps33g eps12g eps13g eps23g"<< endl;
if (!boost::filesystem::exists( outputFile.c_str() )) ofile<<"iteration eps1w eps2w eps3w eps11g eps22g eps33g eps12g eps13g eps23g"<< endl;
}
void MicroMacroAnalyser::action()
......@@ -51,9 +50,8 @@ void MicroMacroAnalyser::action()
if (!initialized) {
setState(1,true,false);
//Check file here again, to make sure we write to the correct file when filename is modified after the scene is loaded
bool file_exists = std::ifstream(outputFile.c_str());
ofile.open(outputFile.c_str(), std::ios::app);
if (!file_exists) ofile<<"iteration eps1w eps2w eps3w eps11g eps22g eps33g eps12g eps13g eps23g"<< endl;
if (!boost::filesystem::exists( outputFile.c_str() )) ofile<<"iteration eps1w eps2w eps3w eps11g eps22g eps33g eps12g eps13g eps23g"<< endl;
initialized=true;
} else if (scene->iter % interval == 0) {
setState(2, true, compIncrt);
......
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