DUNE-FEM (unstable)

row.hh
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
10
11//- dune-fem includes
12#include <dune/fem/io/parameter.hh>
13#include <dune/fem/solver/rungekutta/basicrow.hh>
14#include <dune/fem/solver/rungekutta/butchertable.hh>
15#include <dune/fem/solver/rungekutta/timestepcontrol.hh>
16
17namespace 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;
33 typedef typename BaseType::TimeStepControlType TimeStepControlType;
34
35 typedef typename TimeStepControlType::TimeProviderType TimeProviderType;
36 typedef typename TimeStepControlType::ParameterType TimeStepControlParameterType;
37 typedef typename BaseType::NonlinearSolverParameterType NonlinearSolverParameterType;
38 typedef NonlinearSolverParameterType ParameterType;
39
48 ROWRungeKuttaSolver ( HelmholtzOperatorType &helmholtzOp,
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
55 ROWRungeKuttaSolver ( HelmholtzOperatorType &helmholtzOp,
56 TimeProviderType &timeProvider, int order,
57 const Dune::Fem::ParameterReader &parameter = Dune::Fem::Parameter::container() )
58 : BaseType( helmholtzOp, timeProvider, butcherTable( order ), TimeStepControlType( timeProvider, parameter ),
59 NonlinearSolverParameterType( parameter ) )
60 {}
61
69 ROWRungeKuttaSolver ( HelmholtzOperatorType &helmholtzOp,
70 TimeProviderType &timeProvider,
71 const TimeStepControlParameterType& tscParam,
72 const NonlinearSolverParameterType& parameter )
73 : BaseType( helmholtzOp, timeProvider, butcherTable( 3 ), TimeStepControlType( timeProvider, tscParam ), parameter )
74 {}
75
76 ROWRungeKuttaSolver ( HelmholtzOperatorType &helmholtzOp,
77 TimeProviderType &timeProvider,
78 const Dune::Fem::ParameterReader &parameter = Dune::Fem::Parameter::container() )
79 : BaseType( helmholtzOp, timeProvider, butcherTable( 3 ), TimeStepControlType( timeProvider, parameter ),
80 ParameterType( parameter ), NonlinearSolverParameterType( parameter ) )
81 {}
82
83 protected:
84 static ROWSimpleButcherTable< double > butcherTable ( int order )
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
ROW RungeKutta ODE solver.
Definition: basicrow.hh:56
ROW RungeKutta ODE solver.
Definition: row.hh:27
ROWRungeKuttaSolver(HelmholtzOperatorType &helmholtzOp, TimeProviderType &timeProvider, const TimeStepControlParameterType &tscParam, const NonlinearSolverParameterType &parameter)
constructor
Definition: row.hh:69
ROWRungeKuttaSolver(HelmholtzOperatorType &helmholtzOp, TimeProviderType &timeProvider, int order, const TimeStepControlParameterType &tscParam, const NonlinearSolverParameterType &parameter)
constructor
Definition: row.hh:48
A few common exception classes.
#define DUNE_THROW(E, m)
Definition: exceptions.hh:218
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)