Commit 9fcf2423 authored by Douglas Serson's avatar Douglas Serson Committed by Spencer Sherwin
Browse files

Small changes to checkpoints of DriverAdaptive

parent 17636143
......@@ -296,10 +296,14 @@ void DriverAdaptive::v_Execute(ostream &out)
ClearManager(std::string("GlobalLinSys"));
int chkNumber = m_equ[0]->GetCheckpointNumber();
int chkSteps = m_equ[0]->GetCheckpointSteps();
// Initialise driver again
Driver::v_InitObject(out);
// Set chkSteps to zero to avoid writing initial condition
m_equ[0]->SetCheckpointSteps(0);
// Initialise equation
m_equ[0]->DoInitialise();
m_equ[0]->SetInitialStep(i * numSteps);
......@@ -307,6 +311,7 @@ void DriverAdaptive::v_Execute(ostream &out)
m_equ[0]->SetTime(startTime + i * period);
m_equ[0]->SetBoundaryConditions(startTime + i * period);
m_equ[0]->SetCheckpointNumber(chkNumber);
m_equ[0]->SetCheckpointSteps(chkSteps);
// Project solution to new expansion
for (int n = 0; n < nFields; n++)
......
......@@ -662,7 +662,7 @@ namespace Nektar
m_session->LoadParameter("NumQuadPointsError",
m_NumQuadPointsError, 0);
m_nchk = 0;
m_nchk = 1;
// Zero all physical fields initially
ZeroPhysFields();
......
......@@ -417,6 +417,16 @@ namespace Nektar
m_nchk = num;
}
SOLVER_UTILS_EXPORT int GetCheckpointSteps()
{
return m_checksteps;
}
SOLVER_UTILS_EXPORT void SetCheckpointSteps(int num)
{
m_checksteps = num;
}
SOLVER_UTILS_EXPORT void SetTime(
const NekDouble time)
{
......
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