Commit 45ef448c authored by Chris Cantwell's avatar Chris Cantwell

Merge branch 'ticket/139-TimeIntegrationRefactor' into 'master'

Ticket/139 time integration refactor

Closes #139

See merge request !1034
parents c9a38aec 925ddb6c
Pipeline #1265 failed with stages
in 9 minutes and 15 seconds
Changelog
=========
v5.1.0
------
**Library**
- Refactored time integration code using factory pattern (!1034)
v5.0.0
------
**Library**
......
......@@ -5,7 +5,7 @@
<parameters>--points 100 --timesteps 100 --method 2</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.0798986</value>
<value tolerance="1e-12">0.0789181</value>
</metric>
</metrics>
</test>
......@@ -30,6 +30,15 @@
//
// Description: Collection of templated functions for vector mathematics
//
// Note: For those unfamiliar with the vector routines notation, it is
// reverse polish notation (RPN). For example:
//
// In the function "Vvtvp()", it is "Vvt" means vector vector times,
// which in infix notation is "v * v". So "Vvtvp" is:
//
// RPN: vector vector times vector plus
// Infix: ( vector * vector ) + vector
//
///////////////////////////////////////////////////////////////////////////////
#ifndef NEKTAR_LIB_LIBUTILITIES_BASSICUTILS_VECTORMATH_HPP
......@@ -40,18 +49,14 @@
namespace Vmath
{
/***************** Math routines ***************/
/// \brief Fill a vector with a constant value
template<class T> LIB_UTILITIES_EXPORT void Fill( int n, const T alpha, T *x, const int incx );
/// \brief Generates a number from ~Normal(0,1)
template<class T> LIB_UTILITIES_EXPORT T ran2 (long* idum);
/// \brief Fills a vector with white noise.
template<class T> LIB_UTILITIES_EXPORT void FillWhiteNoise(
int n, const T eps, T *x, const int incx, int seed = 9999);
......@@ -136,37 +141,40 @@ namespace Vmath
T *y, const int incy);
/********** Triad routines ***********************/
/// \brief vvtvp (vector times vector plus vector): z = w*x + y
template<class T> LIB_UTILITIES_EXPORT void Vvtvp(int n,
const T *w, const int incw,
const T *x, const int incx,
const T *y, const int incy,
T *z, const int incz);
template<class T> LIB_UTILITIES_EXPORT void Vvtvp( int n,
const T *w, const int incw,
const T *x, const int incx,
const T *y, const int incy,
T *z, const int incz );
/// \brief vvtvm (vector times vector plus vector): z = w*x - y
template<class T> LIB_UTILITIES_EXPORT void Vvtvm(int n, const T *w, const int incw, const T *x,
const int incx, const T *y, const int incy,
T *z, const int incz);
/// \brief svtvp (scalar times vector plus vector): z = alpha*x + y
/// \brief Svtvp (scalar times vector plus vector): z = alpha*x + y
template<class T> LIB_UTILITIES_EXPORT void Svtvp(int n, const T alpha, const T *x,
const int incx, const T *y, const int incy,
T *z, const int incz);
/// \brief svtvp (scalar times vector plus vector): z = alpha*x - y
template<class T> LIB_UTILITIES_EXPORT void Svtvm(int n, const T alpha, const T *x,
const int incx, const T *y, const int incy,
T *z, const int incz);
/// \brief Svtvm (scalar times vector minus vector): z = alpha*x - y
template<class T> LIB_UTILITIES_EXPORT void Svtvm ( int n, const T alpha, const T *x,
const int incx, const T *y, const int incy,
T *z, const int incz );
/// \brief vvtvvtp (vector times vector plus vector times vector):
// z = v*w + x*y
template<class T> LIB_UTILITIES_EXPORT void Vvtvvtp (int n,
const T* v, int incv,
const T* w, int incw,
const T* x, int incx,
const T* y, int incy,
T* z, int incz);
//
// @param n Number of items in each vector.
template<class T> LIB_UTILITIES_EXPORT void Vvtvvtp ( int n,
const T* v, int incv,
const T* w, int incw,
const T* x, int incx,
const T* y, int incy,
T* z, int incz );
/// \brief vvtvvtm (vector times vector minus vector times vector):
// z = v*w - x*y
template<class T> LIB_UTILITIES_EXPORT void Vvtvvtm (int n,
......
......@@ -258,15 +258,30 @@ SET(PolylibSources
)
SET(TimeIntegrationHeaders
./TimeIntegration/AdamsBashforthTimeIntegrationSchemes.h
./TimeIntegration/AdamsMoultonTimeIntegrationSchemes.h
./TimeIntegration/BDFImplicitTimeIntegrationSchemes.h
./TimeIntegration/EulerTimeIntegrationSchemes.h
./TimeIntegration/CNABTimeIntegrationScheme.h
./TimeIntegration/DIRKTimeIntegrationSchemes.h
./TimeIntegration/IMEXGearTimeIntegrationScheme.h
./TimeIntegration/IMEXTimeIntegrationSchemes.h
./TimeIntegration/IMEXdirkTimeIntegrationSchemes.h
./TimeIntegration/MCNABTimeIntegrationScheme.h
./TimeIntegration/RungeKuttaTimeIntegrationSchemes.h
./TimeIntegration/TimeIntegrationScheme.h
./TimeIntegration/TimeIntegrationWrapper.h
./TimeIntegration/TimeIntegrationSchemeData.h
./TimeIntegration/TimeIntegrationSolution.h
)
SET(TimeIntegrationSources
./TimeIntegration/SchemeInitializer.cpp
./TimeIntegration/TimeIntegrationScheme.cpp
./TimeIntegration/TimeIntegrationWrapper.cpp
./TimeIntegration/TimeIntegrationSchemeData.cpp
./TimeIntegration/TimeIntegrationSolution.cpp
)
SET(BaseHeaders
LibUtilitiesDeclspec.h
)
......
///////////////////////////////////////////////////////////////////////////////
//
// File: AdamsMoultonTimeIntegrationSchemes.h
//
// For more information, please see: http://www.nektar.info
//
// The MIT License
//
// Copyright (c) 2018 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial College London (UK), and Scientific
// Computing and Imaging Institute, University of Utah (USA).
//
// License for the specific language governing rights and limitations under
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: Combined header file for all Adams Moulton based time
// integration schemes.
//
///////////////////////////////////////////////////////////////////////////////
#pragma once
#define LUE LIB_UTILITIES_EXPORT
#include <LibUtilities/TimeIntegration/EulerTimeIntegrationSchemes.h>
#include <LibUtilities/TimeIntegration/TimeIntegrationScheme.h>
namespace Nektar
{
namespace LibUtilities
{
///////////////////////////////////////////////////////////////////////////////
// Adams Bashforth Order 2
class AdamsMoultonOrder1TimeIntegrationScheme : public TimeIntegrationScheme
{
public:
AdamsMoultonOrder1TimeIntegrationScheme() : TimeIntegrationScheme()
{
m_integration_phases = TimeIntegrationSchemeDataVector(1);
m_integration_phases[0] = TimeIntegrationSchemeDataSharedPtr(
new TimeIntegrationSchemeData(this));
AdamsMoultonOrder1TimeIntegrationScheme::SetupSchemeData(
m_integration_phases[0]);
}
virtual ~AdamsMoultonOrder1TimeIntegrationScheme()
{
}
static TimeIntegrationSchemeSharedPtr create()
{
TimeIntegrationSchemeSharedPtr p = MemoryManager<
AdamsMoultonOrder1TimeIntegrationScheme>::AllocateSharedPtr();
return p;
}
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
{
return TimeIntegrationMethod::eAdamsMoultonOrder1;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
BackwardEulerTimeIntegrationScheme::SetupSchemeData(phase);
}
}; // end class AdamsMoultonOrder1TimeIntegrationScheme
///////////////////////////////////////////////////////////////////////////////
// Adams Bashforth Order 2
class AdamsMoultonOrder2TimeIntegrationScheme : public TimeIntegrationScheme
{
public:
AdamsMoultonOrder2TimeIntegrationScheme() : TimeIntegrationScheme()
{
m_integration_phases = TimeIntegrationSchemeDataVector(2);
m_integration_phases[0] = TimeIntegrationSchemeDataSharedPtr(
new TimeIntegrationSchemeData(this));
m_integration_phases[1] = TimeIntegrationSchemeDataSharedPtr(
new TimeIntegrationSchemeData(this));
ForwardEulerTimeIntegrationScheme::SetupSchemeData(
m_integration_phases[0]);
AdamsMoultonOrder2TimeIntegrationScheme::SetupSchemeData(
m_integration_phases[1]);
}
virtual ~AdamsMoultonOrder2TimeIntegrationScheme()
{
}
static TimeIntegrationSchemeSharedPtr create()
{
TimeIntegrationSchemeSharedPtr p = MemoryManager<
AdamsMoultonOrder2TimeIntegrationScheme>::AllocateSharedPtr();
return p;
}
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
{
return TimeIntegrationMethod::eAdamsMoultonOrder2;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_schemeType = eDiagonallyImplicit;
phase->m_method = TimeIntegrationMethod::eAdamsMoultonOrder2;
phase->m_numsteps = 2;
phase->m_numstages = 1;
phase->m_A = Array<OneD, Array<TwoD, NekDouble>>(1);
phase->m_B = Array<OneD, Array<TwoD, NekDouble>>(1);
phase->m_A[0] =
Array<TwoD, NekDouble>(phase->m_numstages, phase->m_numstages, 0.5);
phase->m_B[0] =
Array<TwoD, NekDouble>(phase->m_numsteps, phase->m_numstages, 0.0);
phase->m_U =
Array<TwoD, NekDouble>(phase->m_numstages, phase->m_numsteps, 0.0);
phase->m_V =
Array<TwoD, NekDouble>(phase->m_numsteps, phase->m_numsteps, 0.0);
phase->m_B[0][0][0] = 0.5;
phase->m_B[0][1][0] = 1.0;
phase->m_U[0][0] = 1.0;
phase->m_U[0][1] = 0.5;
phase->m_V[0][0] = 1.0;
phase->m_V[0][1] = 0.5;
phase->m_numMultiStepValues = 1;
phase->m_numMultiStepDerivs = 1;
phase->m_timeLevelOffset = Array<OneD, unsigned int>(phase->m_numsteps);
phase->m_timeLevelOffset[0] = 0;
phase->m_timeLevelOffset[1] = 0;
phase->m_firstStageEqualsOldSolution =
phase->CheckIfFirstStageEqualsOldSolution(phase->m_A, phase->m_B,
phase->m_U, phase->m_V);
phase->m_lastStageEqualsNewSolution =
phase->CheckIfLastStageEqualsNewSolution(phase->m_A, phase->m_B,
phase->m_U, phase->m_V);
ASSERTL1(phase->VerifyIntegrationSchemeType(phase->m_schemeType,
phase->m_A, phase->m_B,
phase->m_U, phase->m_V),
"Time integration scheme coefficients do not match its type");
}
}; // end class AdamsMoultonOrder2TimeIntegrationScheme
} // end namespace LibUtilities
} // end namespace Nektar
///////////////////////////////////////////////////////////////////////////////
//
// File: BDFImplicitTimeIntegrationSchemes.h
//
// For more information, please see: http://www.nektar.info
//
// The MIT License
//
// Copyright (c) 2018 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial College London (UK), and Scientific
// Computing and Imaging Institute, University of Utah (USA).
//
// License for the specific language governing rights and limitations under
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: Combined header file for all BDF Implicit based time integration
// schemes.
//
///////////////////////////////////////////////////////////////////////////////
#pragma once
#define LUE LIB_UTILITIES_EXPORT
#include <LibUtilities/TimeIntegration/EulerTimeIntegrationSchemes.h>
#include <LibUtilities/TimeIntegration/TimeIntegrationScheme.h>
namespace Nektar
{
namespace LibUtilities
{
///////////////////////////////////////////////////////////////////////////////
// BDF Implicit Order 1
class BDFImplicitOrder1TimeIntegrationScheme : public TimeIntegrationScheme
{
public:
BDFImplicitOrder1TimeIntegrationScheme() : TimeIntegrationScheme()
{
m_integration_phases = TimeIntegrationSchemeDataVector(1);
m_integration_phases[0] = TimeIntegrationSchemeDataSharedPtr(
new TimeIntegrationSchemeData(this));
BDFImplicitOrder1TimeIntegrationScheme::SetupSchemeData(
m_integration_phases[0]);
}
virtual ~BDFImplicitOrder1TimeIntegrationScheme()
{
}
static TimeIntegrationSchemeSharedPtr create()
{
TimeIntegrationSchemeSharedPtr p = MemoryManager<
BDFImplicitOrder1TimeIntegrationScheme>::AllocateSharedPtr();
return p;
}
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
{
return TimeIntegrationMethod::eBDFImplicitOrder1;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
BackwardEulerTimeIntegrationScheme::SetupSchemeData(phase);
}
}; // end class BDFImplicitOrder1TimeIntegrationScheme
///////////////////////////////////////////////////////////////////////////////
// BDF Implicit Order 2
class BDFImplicitOrder2TimeIntegrationScheme : public TimeIntegrationScheme
{
public:
BDFImplicitOrder2TimeIntegrationScheme() : TimeIntegrationScheme()
{
m_integration_phases = TimeIntegrationSchemeDataVector(2);
m_integration_phases[0] = TimeIntegrationSchemeDataSharedPtr(
new TimeIntegrationSchemeData(this));
m_integration_phases[1] = TimeIntegrationSchemeDataSharedPtr(
new TimeIntegrationSchemeData(this));
BackwardEulerTimeIntegrationScheme::SetupSchemeData(
m_integration_phases[0]);
BDFImplicitOrder2TimeIntegrationScheme::SetupSchemeData(
m_integration_phases[1]);
}
virtual ~BDFImplicitOrder2TimeIntegrationScheme()
{
}
static TimeIntegrationSchemeSharedPtr create()
{
TimeIntegrationSchemeSharedPtr p = MemoryManager<
BDFImplicitOrder2TimeIntegrationScheme>::AllocateSharedPtr();
return p;
}
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
{
return TimeIntegrationMethod::eBDFImplicitOrder2;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eBDFImplicitOrder2;
phase->m_schemeType = eDiagonallyImplicit;
phase->m_numsteps = 2;
phase->m_numstages = 1;
phase->m_A = Array<OneD, Array<TwoD, NekDouble>>(1);
phase->m_B = Array<OneD, Array<TwoD, NekDouble>>(1);
NekDouble third = 1.0 / 3.0;
phase->m_A[0] = Array<TwoD, NekDouble>(phase->m_numstages,
phase->m_numstages, 2 * third);
phase->m_B[0] =
Array<TwoD, NekDouble>(phase->m_numsteps, phase->m_numstages, 0.0);
phase->m_U =
Array<TwoD, NekDouble>(phase->m_numstages, phase->m_numsteps, 0.0);
phase->m_V =
Array<TwoD, NekDouble>(phase->m_numsteps, phase->m_numsteps, 0.0);
phase->m_B[0][0][0] = 2 * third;
phase->m_B[0][1][0] = 0.0;
phase->m_U[0][0] = 4 * third;
phase->m_U[0][1] = -third;
phase->m_V[0][0] = 4 * third;
phase->m_V[0][1] = -third;
phase->m_V[1][0] = 1.0;
phase->m_numMultiStepValues = 2;
phase->m_numMultiStepDerivs = 0;
phase->m_timeLevelOffset = Array<OneD, unsigned int>(phase->m_numsteps);
phase->m_timeLevelOffset[0] = 0;
phase->m_timeLevelOffset[1] = 1;
phase->m_firstStageEqualsOldSolution =
phase->CheckIfFirstStageEqualsOldSolution(phase->m_A, phase->m_B,
phase->m_U, phase->m_V);
phase->m_lastStageEqualsNewSolution =
phase->CheckIfLastStageEqualsNewSolution(phase->m_A, phase->m_B,
phase->m_U, phase->m_V);
phase->m_firstStageEqualsOldSolution =
phase->CheckIfFirstStageEqualsOldSolution(phase->m_A, phase->m_B,
phase->m_U, phase->m_V);
phase->m_lastStageEqualsNewSolution =
phase->CheckIfLastStageEqualsNewSolution(phase->m_A, phase->m_B,
phase->m_U, phase->m_V);
ASSERTL1(phase->VerifyIntegrationSchemeType(phase->m_schemeType,
phase->m_A, phase->m_B,
phase->m_U, phase->m_V),
"Time integration scheme coefficients do not match its type");
}
}; // end class BDFImplicitOrder2TimeIntegrator
} // end namespace LibUtilities
} // end namespace Nektar
///////////////////////////////////////////////////////////////////////////////
//
// File: CNABTimeIntegrationScheme.h
//
// For more information, please see: http://www.nektar.info
//
// The MIT License
//
// Copyright (c) 2018 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial College London (UK), and Scientific
// Computing and Imaging Institute, University of Utah (USA).
//
// License for the specific language governing rights and limitations under
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: Header file of time integration scheme wrappers
//
///////////////////////////////////////////////////////////////////////////////
#pragma once
#include <LibUtilities/TimeIntegration/TimeIntegrationScheme.h>
#include <LibUtilities/TimeIntegration/IMEXdirkTimeIntegrationSchemes.h>
#define LUE LIB_UTILITIES_EXPORT
namespace Nektar
{
namespace LibUtilities
{
class CNABTimeIntegrationScheme : public TimeIntegrationScheme
{
public:
CNABTimeIntegrationScheme() : TimeIntegrationScheme()
{
m_integration_phases = TimeIntegrationSchemeDataVector(3);
m_integration_phases[0] = TimeIntegrationSchemeDataSharedPtr(
new TimeIntegrationSchemeData(this));
m_integration_phases[1] = TimeIntegrationSchemeDataSharedPtr(
new TimeIntegrationSchemeData(this));
m_integration_phases[2] = TimeIntegrationSchemeDataSharedPtr(
new TimeIntegrationSchemeData(this));
IMEXdirk_3_4_3TimeIntegrationScheme::SetupSchemeData(
m_integration_phases[0]); // dirk 3 4 3
IMEXdirk_3_4_3TimeIntegrationScheme::SetupSchemeData(
m_integration_phases[1]); // dirk 3 4 3
CNABTimeIntegrationScheme::SetupSchemeData(
m_integration_phases[2]); // CNAB
}
virtual ~CNABTimeIntegrationScheme()
{
}
static TimeIntegrationSchemeSharedPtr create()
{
TimeIntegrationSchemeSharedPtr p =
MemoryManager<CNABTimeIntegrationScheme>::AllocateSharedPtr();
return p;
}
static std::string className;
LUE virtual TimeIntegrationMethod GetIntegrationMethod() const
{
return TimeIntegrationMethod::eCNAB;
}
LUE static void SetupSchemeData(TimeIntegrationSchemeDataSharedPtr &phase)
{
phase->m_method = TimeIntegrationMethod::eCNAB;
phase->m_schemeType = eIMEX;
phase->m_numsteps = 4;
phase->m_numstages = 1;
phase->m_A = Array<OneD, Array<TwoD, NekDouble>>(2);
phase->m_B = Array<OneD, Array<TwoD, NekDouble>>(2);
NekDouble secondth = 1.0 / 2.0;
phase->m_A[0] = Array<TwoD, NekDouble>(phase->m_numstages,
phase->m_numstages, secondth);
phase->m_B[0] =
Array<TwoD, NekDouble>(phase->m_numsteps, phase->m_numstages, 0.0);
phase->m_A[1] =
Array<TwoD, NekDouble>(phase->m_numstages, phase->m_numstages, 0.0);
phase->m_B[1] =
Array<TwoD, NekDouble>(phase->m_numsteps, phase->m_numstages, 0.0);
phase->m_U = Array<TwoD, NekDouble>(phase->m_numstages,
phase->m_numsteps, secondth);
phase->m_V =
Array<TwoD, NekDouble>(phase->m_numsteps, phase->m_numsteps, 0.0);
phase->m_B[0][0][0] = secondth;
phase->m_B[0][1][0] = 1.0;
phase->m_B[1][2][0] = 1.0;
phase->m_U[0][0] = 2 * secondth;
phase->m_U[0][2] = 3 * secondth;
phase->m_U[0][3] = -1 * secondth;
phase->m_V[0][0] = 2 * secondth;
phase->m_V[0][1] = secondth;
phase->m_V[0][2] = 3 * secondth;
phase->m_V[0][3] = -1 * secondth;
phase->m_V[3][2] = 1.0;
phase->m_numMultiStepValues = 1;
phase->m_numMultiStepDerivs = 3;
phase->m_timeLevelOffset = Array<OneD, unsigned int>(phase->m_numsteps);
phase->m_timeLevelOffset[0] = 0;
phase->m_timeLevelOffset[1] = 0;
phase->m_timeLevelOffset[2] = 0;
phase->m_timeLevelOffset[3] = 1;
phase->m_firstStageEqualsOldSolution =
phase->CheckIfFirstStageEqualsOldSolution(phase->m_A, phase->m_B,
phase->m_U, phase->m_V);
phase->m_lastStageEqualsNewSolution =
phase->CheckIfLastStageEqualsNewSolution(phase->m_A, phase->m_B,
phase->m_U, phase->m_V);
ASSERTL1(phase->VerifyIntegrationSchemeType(phase->m_schemeType,
phase->m_A, phase->m_B,
phase->m_U, phase->m_V),
"Time integration scheme coefficients do not match its type");
}
}; // end class CNABTimeIntegrationScheme
}