holds method enumeration + some helpers git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@2170 e10b68d5-8a6e-419e-a041-bce267b0401d
44 lines
681 B
C
44 lines
681 B
C
//==============================================================================
|
|
//!
|
|
//! \file TimeIntUtils.h
|
|
//!
|
|
//! \date Nov 28 2012
|
|
//!
|
|
//! \author Arne Morten Kvarving / SINTEF
|
|
//!
|
|
//! \brief Various helpers for time integration
|
|
//!
|
|
//==============================================================================
|
|
|
|
#include "TimeIntUtils.h"
|
|
|
|
namespace TimeIntegration {
|
|
|
|
int Order(Method method)
|
|
{
|
|
if (method == EULER || method == BE)
|
|
return 1;
|
|
|
|
if (method == HEUN || method == BDF2)
|
|
return 2;
|
|
|
|
if (method == RK3)
|
|
return 3;
|
|
|
|
if (method == RK4)
|
|
return 3;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
int Steps(Method method)
|
|
{
|
|
if (method == BDF2)
|
|
return 2;
|
|
|
|
return 1;
|
|
}
|
|
|
|
}
|