dune-fem  2.8-git
row.hh
Go to the documentation of this file.
1 #ifndef DUNE_FEM_SOLVER_RUNGEKUTTA_ROW_HH
2 #define DUNE_FEM_SOLVER_RUNGEKUTTA_ROW_HH
3 
4 //- system includes
5 #include <sstream>
6 #include <vector>
7 
8 //- dune-common includes
9 #include <dune/common/exceptions.hh>
10 
11 //- dune-fem includes
12 #include <dune/fem/io/parameter.hh>
16 
17 namespace DuneODE
18 {
19 
20  // ROWRungeKuttaSolver
21  // ------------------------
22 
24  template< class HelmholtzOperator, class NonlinearSolver, class TimeStepControl = ImplicitRungeKuttaTimeStepControl >
26  : public BasicROWRungeKuttaSolver< HelmholtzOperator, NonlinearSolver, TimeStepControl >
27  {
30 
31  public:
32  typedef HelmholtzOperator HelmholtzOperatorType;
34 
35  typedef typename TimeStepControlType::TimeProviderType TimeProviderType;
36  typedef typename TimeStepControlType::ParameterType TimeStepControlParameterType;
39 
49  TimeProviderType &timeProvider, int order,
50  const TimeStepControlParameterType& tscParam,
51  const NonlinearSolverParameterType& parameter )
52  : BaseType( helmholtzOp, timeProvider, butcherTable( order ), TimeStepControlType( timeProvider, tscParam ), parameter )
53  {}
54 
56  TimeProviderType &timeProvider, int order,
58  : BaseType( helmholtzOp, timeProvider, butcherTable( order ), TimeStepControlType( timeProvider, parameter ),
59  NonlinearSolverParameterType( parameter ) )
60  {}
61 
70  TimeProviderType &timeProvider,
71  const TimeStepControlParameterType& tscParam,
72  const NonlinearSolverParameterType& parameter )
73  : BaseType( helmholtzOp, timeProvider, butcherTable( 3 ), TimeStepControlType( timeProvider, tscParam ), parameter )
74  {}
75 
77  TimeProviderType &timeProvider,
79  : BaseType( helmholtzOp, timeProvider, butcherTable( 3 ), TimeStepControlType( timeProvider, parameter ),
80  ParameterType( parameter ), NonlinearSolverParameterType( parameter ) )
81  {}
82 
83  protected:
85  {
86  switch( order )
87  {
88  case 2:
89  return row2ButcherTable();
90  case 3:
91  return row3ButcherTable();
92  default:
93  DUNE_THROW( NotImplemented, "ROW Runge-Kutta method of order " << order << " not implemented." );
94  }
95  }
96  };
97 
98 } // namespace DuneODE
99 
100 #endif // #ifndef DUNE_FEM_SOLVER_RUNGEKUTTA_ROW_HH
Definition: multistep.hh:17
ROWSimpleButcherTable< double > row3ButcherTable()
Definition: butchertable.cc:371
ROWSimpleButcherTable< double > row2ButcherTable()
Definition: butchertable.cc:350
static ParameterContainer & container()
Definition: io/parameter.hh:193
ROW RungeKutta ODE solver.
Definition: basicrow.hh:56
TimeStepControl TimeStepControlType
Definition: basicrow.hh:66
NonlinearSolver::ParameterType NonlinearSolverParameterType
Definition: basicrow.hh:69
Definition: butchertable.hh:91
ROW RungeKutta ODE solver.
Definition: row.hh:27
TimeStepControlType::TimeProviderType TimeProviderType
Definition: row.hh:35
HelmholtzOperator HelmholtzOperatorType
Definition: row.hh:32
NonlinearSolverParameterType ParameterType
Definition: row.hh:38
TimeStepControlType::ParameterType TimeStepControlParameterType
Definition: row.hh:36
ROWRungeKuttaSolver(HelmholtzOperatorType &helmholtzOp, TimeProviderType &timeProvider, const TimeStepControlParameterType &tscParam, const NonlinearSolverParameterType &parameter)
constructor
Definition: row.hh:69
static ROWSimpleButcherTable< double > butcherTable(int order)
Definition: row.hh:84
ROWRungeKuttaSolver(HelmholtzOperatorType &helmholtzOp, TimeProviderType &timeProvider, int order, const TimeStepControlParameterType &tscParam, const NonlinearSolverParameterType &parameter)
constructor
Definition: row.hh:48
BaseType::NonlinearSolverParameterType NonlinearSolverParameterType
Definition: row.hh:37
ROWRungeKuttaSolver(HelmholtzOperatorType &helmholtzOp, TimeProviderType &timeProvider, const Dune::Fem::ParameterReader &parameter=Dune::Fem::Parameter::container())
Definition: row.hh:76
ROWRungeKuttaSolver(HelmholtzOperatorType &helmholtzOp, TimeProviderType &timeProvider, int order, const Dune::Fem::ParameterReader &parameter=Dune::Fem::Parameter::container())
Definition: row.hh:55
BaseType::TimeStepControlType TimeStepControlType
Definition: row.hh:33