Commit 1811bb26 authored by Douglas Serson's avatar Douglas Serson Committed by Dave Moxey

Open files with append attribute for DriverAdaptive

(cherry picked from commit 3e5dc2c2)
parent 43d344ec
......@@ -310,7 +310,17 @@ void FilterAeroForces::v_Initialise(
if (vComm->GetRank() == 0)
{
// Open output stream
m_outputStream.open(m_outputFile.c_str());
bool adaptive;
m_session->MatchSolverInfo("Driver", "Adaptive",
adaptive, false);
if (adaptive)
{
m_outputStream.open(m_outputFile.c_str(), ofstream::app);
}
else
{
m_outputStream.open(m_outputFile.c_str());
}
m_outputStream << "# Forces acting on bodies" << endl;
for( int i = 0; i < expdim; i++ )
{
......
......@@ -136,15 +136,24 @@ void FilterModalEnergy::v_Initialise(
if (vComm->GetRank() == 0)
{
// Open output stream
if(m_isHomogeneous1D)
bool adaptive;
m_session->MatchSolverInfo("Driver", "Adaptive",
adaptive, false);
if (adaptive)
{
m_outputStream.open(m_outputFile.c_str(), ofstream::app);
}
else
{
m_outputStream.open(m_outputFile.c_str());
}
if(m_isHomogeneous1D)
{
m_outputStream << "# Time, Fourier Mode, Energy ";
m_outputStream << endl;
}
else
{
m_outputStream.open(m_outputFile.c_str());
m_outputStream << "# Time, Energy ";
m_outputStream << endl;
}
......
Markdown is supported
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