1#ifndef RUNGEKUTTA_ODE_SOLVER_HH
2#define RUNGEKUTTA_ODE_SOLVER_HH
13#include <dune/fem/io/parameter.hh>
14#include <dune/fem/misc/mpimanager.hh>
15#include <dune/fem/operator/common/spaceoperatorif.hh>
16#include <dune/fem/operator/dghelmholtz.hh>
18#include <dune/fem/solver/odesolverinterface.hh>
19#include <dune/fem/solver/timeprovider.hh>
21#include <dune/fem/solver/newtoninverseoperator.hh>
22#include <dune/fem/solver/krylovinverseoperators.hh>
24#include <dune/fem/solver/rungekutta/timestepcontrol.hh>
25#include <dune/fem/solver/rungekutta/explicit.hh>
26#include <dune/fem/solver/rungekutta/implicit.hh>
27#include <dune/fem/solver/rungekutta/semiimplicit.hh>
35 using ODEParameters = ImplicitRungeKuttaSolverParameters ;
47 template<
class Destination >
48 using ExplicitOdeSolver = ExplicitRungeKuttaSolver< Destination >;
55 template <
class Destination>
56 using ParDGHelmholtz = DGHelmholtzOperator< SpaceOperatorInterface<Destination> >;
58 template <
class Destination>
59 using ParDGNewtonInverse = NewtonInverseOperator<
60 typename ParDGHelmholtz< Destination > :: JacobianOperatorType,
61 KrylovInverseOperator< Destination > >;
63 template<
class Destination>
64 class ImplicitOdeSolver
65 :
public ImplicitRungeKuttaSolver<
66 ParDGHelmholtz< Destination >, ParDGNewtonInverse< Destination > >
69 typedef SpaceOperatorInterface<Destination> OperatorType;
70 typedef ParDGHelmholtz< Destination > HelmholtzOperatorType;
71 typedef ImplicitRungeKuttaSolver< HelmholtzOperatorType, ParDGNewtonInverse< Destination > > BaseType;
74 using BaseType :: helmholtzOp_;
75 std::unique_ptr< HelmholtzOperatorType > helmOpPtr_;
77 HelmholtzOperatorType* createHelmholtzOperator( OperatorType& op )
79 return new HelmholtzOperatorType( op ) ;
83 ImplicitOdeSolver( OperatorType& op, TimeProviderBase& tp,
int order,
84 const ParameterReader ¶meter = Parameter::container() )
85 : BaseType( *createHelmholtzOperator( op ), tp, order, parameter )
88 helmOpPtr_.reset( &helmholtzOp_ );
97 template<
class Destination>
98 class SemiImplicitOdeSolver
99 :
public SemiImplicitRungeKuttaSolver<
100 SpaceOperatorInterface<Destination>,
101 ParDGHelmholtz< Destination >, ParDGNewtonInverse< Destination > >
104 typedef SpaceOperatorInterface<Destination> OperatorType;
105 typedef ParDGHelmholtz< Destination > HelmholtzOperatorType;
106 typedef SemiImplicitRungeKuttaSolver< OperatorType, HelmholtzOperatorType, ParDGNewtonInverse< Destination > > BaseType;
109 using BaseType :: helmholtzOp_;
110 std::unique_ptr< HelmholtzOperatorType > helmOpPtr_;
112 HelmholtzOperatorType* createHelmholtzOperator( OperatorType& op )
114 return new HelmholtzOperatorType( op ) ;
118 SemiImplicitOdeSolver( OperatorType& explOp, OperatorType& implOp, TimeProviderBase& tp,
int order,
119 const ParameterReader ¶meter = Parameter::container() )
120 : BaseType( explOp, *createHelmholtzOperator( implOp ), tp, order, parameter )
123 helmOpPtr_.reset( &helmholtzOp_ );
Dune namespace.
Definition: alignedallocator.hh:13