Commit 143d3f79 authored by Chris Cantwell's avatar Chris Cantwell

Merge branch 'tidy/TimeIntegratorCleanUp' into 'master'

removed the time integration enum and added a time stability

See merge request !1103
parents 45ef448c 0e11cf92
Pipeline #1335 failed with stages
in 1 minute and 40 seconds
......@@ -338,8 +338,7 @@ int main(int argc, char *argv[])
"step).\n";
outfile << "#\n";
outfile << "# Delta T: " << dt << "\n";
outfile << "# Method: " << TimeIntegrationScheme::nameFromMethod(
tiScheme->GetIntegrationMethod())
outfile << "# Method: " << tiScheme->GetName()
<< "\n";
outfile << "#\n";
outfile << "# There are 3 columns with the following headers:\n";
......@@ -372,8 +371,7 @@ int main(int argc, char *argv[])
<< "\n";
// Some more writing out the results
solver->GenerateGnuplotScript(TimeIntegrationScheme::nameFromMethod(
tiScheme->GetIntegrationMethod()));
solver->GenerateGnuplotScript(tiScheme->GetName());
outfile.close();
delete solver;
......
......@@ -34,6 +34,10 @@
//
///////////////////////////////////////////////////////////////////////////////
// Note : If adding a new integrator be sure to register the
// integrator with the Time Integration Scheme Facatory in
// SchemeInitializor.cpp.
#pragma once
#define LUE LIB_UTILITIES_EXPORT
......@@ -80,14 +84,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return TimeIntegrationMethod::eAdamsBashforthOrder2;
return std::string("AdamsBashforthOrder2");
}
LUE virtual NekDouble GetTimeStability() const
{
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eAdamsBashforthOrder2;
phase->m_schemeType = eExplicit;
phase->m_numstages = 1;
......@@ -172,14 +180,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("AdamsBashforthOrder3");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eAdamsBashforthOrder3;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eAdamsBashforthOrder3;
phase->m_schemeType = eExplicit;
phase->m_numsteps = 4;
......@@ -275,14 +287,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("AdamsBashforthOrder4");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eAdamsBashforthOrder4;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eAdamsBashforthOrder4;
phase->m_schemeType = eExplicit;
phase->m_numsteps = 5;
......
......@@ -34,6 +34,10 @@
//
///////////////////////////////////////////////////////////////////////////////
// Note : If adding a new integrator be sure to register the
// integrator with the Time Integration Scheme Facatory in
// SchemeInitializor.cpp.
#pragma once
#define LUE LIB_UTILITIES_EXPORT
......@@ -75,9 +79,14 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("AdamsMoultonOrder1");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eAdamsMoultonOrder1;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
......@@ -120,15 +129,19 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("AdamsMoultonOrder2");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eAdamsMoultonOrder2;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_schemeType = eDiagonallyImplicit;
phase->m_method = TimeIntegrationMethod::eAdamsMoultonOrder2;
phase->m_numsteps = 2;
phase->m_numstages = 1;
......
......@@ -34,6 +34,10 @@
//
///////////////////////////////////////////////////////////////////////////////
// Note : If adding a new integrator be sure to register the
// integrator with the Time Integration Scheme Facatory in
// SchemeInitializor.cpp.
#pragma once
#define LUE LIB_UTILITIES_EXPORT
......@@ -75,9 +79,14 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("BDFImplicitOrder1");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eBDFImplicitOrder1;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
......@@ -120,14 +129,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("BDFImplicitOrder2");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eBDFImplicitOrder2;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eBDFImplicitOrder2;
phase->m_schemeType = eDiagonallyImplicit;
phase->m_numsteps = 2;
......
......@@ -33,6 +33,10 @@
//
///////////////////////////////////////////////////////////////////////////////
// Note : If adding a new integrator be sure to register the
// integrator with the Time Integration Scheme Facatory in
// SchemeInitializor.cpp.
#pragma once
#include <LibUtilities/TimeIntegration/TimeIntegrationScheme.h>
......@@ -79,14 +83,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("CNAB");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eCNAB;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eCNAB;
phase->m_schemeType = eIMEX;
phase->m_numsteps = 4;
......
......@@ -34,6 +34,10 @@
//
///////////////////////////////////////////////////////////////////////////////
// Note : If adding a new integrator be sure to register the
// integrator with the Time Integration Scheme Facatory in
// SchemeInitializor.cpp.
#pragma once
#include <LibUtilities/TimeIntegration/TimeIntegrationScheme.h>
......@@ -74,14 +78,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("IMEXdirk_3_4_3");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eIMEXdirk_3_4_3;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eIMEXdirk_3_4_3;
phase->m_schemeType = eDiagonallyImplicit;
phase->m_numsteps = 1;
......@@ -156,14 +164,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("DIRKOrder3");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eDIRKOrder3;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eDIRKOrder3;
phase->m_schemeType = eDiagonallyImplicit;
phase->m_numsteps = 1;
......
......@@ -34,6 +34,10 @@
//
///////////////////////////////////////////////////////////////////////////////
// Note : If adding a new integrator be sure to register the
// integrator with the Time Integration Scheme Facatory in
// SchemeInitializor.cpp.
#pragma once
#define LUE LIB_UTILITIES_EXPORT
......@@ -75,14 +79,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("BackwardEuler");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eBackwardEuler;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eBackwardEuler;
phase->m_schemeType = eDiagonallyImplicit;
phase->m_numsteps = 1;
......@@ -149,14 +157,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("ForwardEuler");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eForwardEuler;
return 2.784;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eForwardEuler;
phase->m_schemeType = eExplicit;
phase->m_numsteps = 1;
......
......@@ -33,6 +33,10 @@
//
///////////////////////////////////////////////////////////////////////////////
// Note : If adding a new integrator be sure to register the
// integrator with the Time Integration Scheme Facatory in
// SchemeInitializor.cpp.
#pragma once
#include <LibUtilities/TimeIntegration/TimeIntegrationScheme.h>
......@@ -74,14 +78,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("IMEXGear");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eIMEXGear;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eIMEXGear;
phase->m_schemeType = eIMEX;
phase->m_numsteps = 3;
......
......@@ -34,6 +34,10 @@
//
///////////////////////////////////////////////////////////////////////////////
// Note : If adding a new integrator be sure to register the
// integrator with the Time Integration Scheme Facatory in
// SchemeInitializor.cpp.
#pragma once
#define LUE LIB_UTILITIES_EXPORT
......@@ -75,14 +79,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("IMEXOrder1");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eIMEXOrder1;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eIMEXOrder1;
phase->m_schemeType = eIMEX;
phase->m_numstages = 1;
......@@ -164,14 +172,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("IMEXOrder2");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eIMEXOrder2;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eIMEXOrder2;
phase->m_schemeType = eIMEX;
phase->m_numsteps = 4;
......@@ -269,14 +281,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return TimeIntegrationMethod::eIMEXOrder3;
return std::string("IMEXOrder3");
}
LUE virtual NekDouble GetTimeStability() const
{
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eIMEXOrder3;
phase->m_schemeType = eIMEX;
phase->m_numsteps = 6;
......@@ -386,15 +402,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return TimeIntegrationMethod::eIMEXOrder4;
return std::string("IMEXOrder4");
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
LUE virtual NekDouble GetTimeStability() const
{
return 1.0;
}
phase->m_method = TimeIntegrationMethod::eIMEXOrder4;
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_schemeType = eIMEX;
phase->m_numsteps = 8;
......
......@@ -34,6 +34,10 @@
//
///////////////////////////////////////////////////////////////////////////////
// Note : If adding a new integrator be sure to register the
// integrator with the Time Integration Scheme Facatory in
// SchemeInitializor.cpp.
#pragma once
#include <LibUtilities/TimeIntegration/TimeIntegrationScheme.h>
......@@ -74,14 +78,18 @@ public:
static std::string className;
LUE TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("IMEXdirk_1_2_1");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eIMEXdirk_1_2_1;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eIMEXdirk_1_2_1;
phase->m_schemeType = eIMEX;
phase->m_numsteps = 1;
......@@ -160,14 +168,18 @@ public:
static std::string className;
LUE TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return TimeIntegrationMethod::eIMEXdirk_1_2_2;
return std::string("IMEXdirk_1_2_2");
}
LUE virtual NekDouble GetTimeStability() const
{
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eIMEXdirk_1_2_2;
phase->m_schemeType = eIMEX;
phase->m_numsteps = 1;
......@@ -246,14 +258,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return TimeIntegrationMethod::eIMEXdirk_2_2_2;
return std::string("IMEXdirk_2_2_2");
}
LUE virtual NekDouble GetTimeStability() const
{
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eIMEXdirk_2_2_2;
phase->m_schemeType = eIMEX;
phase->m_numsteps = 1;
......@@ -342,14 +358,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("IMEXdirk_2_3_2");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eIMEXdirk_2_3_2;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eIMEXdirk_2_3_2;
phase->m_schemeType = eIMEX;
phase->m_numsteps = 1;
......@@ -438,14 +458,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return std::string("IMEXdirk_2_3_3");
}
LUE virtual NekDouble GetTimeStability() const
{
return TimeIntegrationMethod::eIMEXdirk_2_3_3;
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eIMEXdirk_2_3_3;
phase->m_schemeType = eIMEX;
phase->m_numsteps = 1;
......@@ -533,14 +557,18 @@ public:
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
LUE virtual std::string GetName() const
{
return TimeIntegrationMethod::eIMEXdirk_3_4_3;
return std::string("IMEXdirk_3_4_3");
}
LUE virtual NekDouble GetTimeStability() const
{
return 1.0;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eIMEXdirk_3_4_3;
phase->m_schemeType = eIMEX;
phase->m_numsteps = 1;
......@@ -642,14 +670,18 @@ public:
static std::string className;