...
 
Commits (3)
Changelog
=========
v5.1.0
------
**Library**
- Refactored time integration code using factory pattern (!1034)
v5.0.0
------
**Library**
......
......@@ -2,7 +2,7 @@
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --TimeIntegrationMethod 8</parameters>
<parameters>--points 100 --timesteps 100 --method 8</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.10135</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --TimeIntegrationMethod 5</parameters>
<parameters>--points 100 --timesteps 100 --method 5</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.0616905</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --TimeIntegrationMethod 6</parameters>
<parameters>--points 100 --timesteps 100 --method 6</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.061634</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --TimeIntegrationMethod 7</parameters>
<parameters>--points 100 --timesteps 100 --method 7</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.499518</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --TimeIntegrationMethod 1</parameters>
<parameters>--points 100 --timesteps 100 --method 1</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.224678</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --TimeIntegrationMethod 2</parameters>
<parameters>--points 100 --timesteps 100 --method 2</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.0789181</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --TimeIntegrationMethod 3</parameters>
<parameters>--points 100 --timesteps 100 --method 3</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.0610636</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --TimeIntegrationMethod 4</parameters>
<parameters>--points 100 --timesteps 100 --method 4</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.0615357</value>
......
......@@ -2,7 +2,7 @@
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --TimeIntegrationMethod 9</parameters>
<parameters>--points 100 --timesteps 100 --method 9</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.134315</value>
......
......@@ -193,12 +193,12 @@ int main( int argc, char *argv[] )
po::options_description desc("Usage:");
desc.add_options()
("help,h", "Produce this help message.")
("Npoints,p", po::value<int>(),
("points,p", po::value<int>(),
"Number of grid points to be used.")
("Ntimesteps,t", po::value<int>(),
("timesteps,t", po::value<int>(),
"Number of timesteps to be used.")
("TimeIntegrationMethod,m", po::value<int>(),
"TimeIntegrationMethod is a number in the range [1,8].\n"
("method,m", po::value<int>(),
"TimeIntegrationMethod is a number in the range [1,9].\n"
"It defines the time-integration method to be used:\n"
"- 1: 1st order multi-step IMEX scheme\n"
" (Euler Backwards/Euler Forwards)\n"
......@@ -226,16 +226,16 @@ int main( int argc, char *argv[] )
return 1;
}
if( !vm.count("Npoints") || !vm.count("Ntimesteps") || !vm.count("TimeIntegrationMethod") || vm.count("help") )
if( !vm.count("points") || !vm.count("timesteps") || !vm.count("method") || vm.count("help") )
{
cout << "Please specify points, timesteps and method.\n\n";
cout << desc;
return 1;
}
int nPoints = vm["Npoints"].as<int>();
int nTimesteps = vm["Ntimesteps"].as<int>();
int nMethod = vm["TimeIntegrationMethod"].as<int>();
int nPoints = vm["points"].as<int>();
int nTimesteps = vm["timesteps"].as<int>();
int nMethod = vm["method"].as<int>();
// Open a file for writing the solution
ofstream outfile;
......
......@@ -207,14 +207,11 @@ protected:
{
}
friend std::ostream &operator<<(std::ostream &os,
LUE friend std::ostream &operator<<(std::ostream &os,
const TimeIntegrationScheme &rhs);
friend std::ostream &operator<<(std::ostream &os,
LUE friend std::ostream &operator<<(std::ostream &os,
const TimeIntegrationSchemeSharedPtr &rhs);
// friend std::ostream &operator<<(std::ostream &os,
// const TimeIntegrationSchemeData &rhs);
/**
* \brief Explicit integration of an ODE.
*
......
......@@ -52,7 +52,7 @@ namespace Nektar
{
namespace LibUtilities
{
// FIXME: Dd: this probably should be in Scheme, not SchemeData...
bool TimeIntegrationSchemeData::VerifyIntegrationSchemeType(
TimeIntegrationSchemeType type,
const Array<OneD, const Array<TwoD, NekDouble>> &A,
......@@ -60,7 +60,7 @@ bool TimeIntegrationSchemeData::VerifyIntegrationSchemeType(
const Array<TwoD, const NekDouble> &U,
const Array<TwoD, const NekDouble> &V)
{
boost::ignore_unused(U, V);
boost::ignore_unused(B, U, V);
int IMEXdim = A.num_elements();
int dim = A[0].GetRows();
......@@ -815,11 +815,16 @@ bool TimeIntegrationSchemeData::CheckIfLastStageEqualsNewSolution(
return true;
}
bool TimeIntegrationSchemeData::CheckTimeIntegrateArguments( // const NekDouble
// timestep,
ConstTripleArray &y_old, ConstSingleArray &t_old, TripleArray &y_new,
SingleArray &t_new, const TimeIntegrationSchemeOperators &op) const
bool TimeIntegrationSchemeData::CheckTimeIntegrateArguments(
ConstTripleArray &y_old,
ConstSingleArray &t_old,
TripleArray &y_new,
SingleArray &t_new,
const TimeIntegrationSchemeOperators &op) const
{
#ifndef DEBUG
boost::ignore_unused(y_old, t_old, y_new, t_new, op);
#endif
boost::ignore_unused(op);
// Check if arrays are all of consistent size
......