Skip to content
Snippets Groups Projects
Commit 0bf45186 authored by Robert Kloefkorn's avatar Robert Kloefkorn
Browse files

use non-const problem type to make it work with two-stroke-engine.

parent b83a172e
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,7 @@ namespace Dune {
typedef LocalCDGPass< DiscreteModel2Type, Pass1Type, advectPass > Pass2Type;
public:
DGAdvectionDiffusionOperator( GridPartType& gridPart , const ProblemType& problem ) :
DGAdvectionDiffusionOperator( GridPartType& gridPart, ProblemType& problem ) :
model_( problem ),
numflux_( model_ ),
gridPart_( gridPart ),
......@@ -213,7 +213,7 @@ namespace Dune {
typedef typename BaseType :: GridPartType GridPartType;
typedef typename BaseType :: ProblemType ProblemType;
public:
DGAdvectionOperator( GridPartType& gridPart , const ProblemType& problem )
DGAdvectionOperator( GridPartType& gridPart, ProblemType& problem )
: BaseType( gridPart, problem )
{}
......@@ -246,7 +246,7 @@ namespace Dune {
typedef typename BaseType :: ProblemType ProblemType;
public:
DGDiffusionOperator( GridPartType& gridPart , const ProblemType& problem )
DGDiffusionOperator( GridPartType& gridPart, ProblemType& problem )
: BaseType( gridPart, problem )
{}
......@@ -366,7 +366,7 @@ namespace Dune {
};
public:
DGLimitedAdvectionDiffusionOperator( GridPartType& gridPart , const ProblemType& problem )
DGLimitedAdvectionDiffusionOperator( GridPartType& gridPart, ProblemType& problem )
: model_( problem )
, numflux_( model_ )
, gridPart_( gridPart )
......@@ -515,7 +515,7 @@ namespace Dune {
typedef typename BaseType :: GridPartType GridPartType;
typedef typename BaseType :: ProblemType ProblemType ;
DGAdaptationIndicatorOperator( GridPartType& gridPart , const ProblemType& problem )
DGAdaptationIndicatorOperator( GridPartType& gridPart, ProblemType& problem )
: BaseType( gridPart, problem )
{
if ( Fem::Parameter::verbose() )
......
......@@ -89,7 +89,7 @@ namespace Dune {
typedef typename DiscreteModelType :: AdaptationType AdaptationType;
public:
DGAdvectionDiffusionOperatorBase( GridPartType& gridPart , const ProblemType& problem )
DGAdvectionDiffusionOperatorBase( GridPartType& gridPart, ProblemType& problem )
: model_( problem )
, numflux_( model_ )
, gridPart_( gridPart )
......
......@@ -48,7 +48,7 @@ namespace Dune {
typedef typename BaseType :: GridPartType GridPartType;
typedef typename BaseType :: ProblemType ProblemType;
DGAdvectionDiffusionOperator( GridPartType& gridPart , const ProblemType& problem )
DGAdvectionDiffusionOperator( GridPartType& gridPart, ProblemType& problem )
: BaseType( gridPart, problem )
{}
......@@ -85,7 +85,7 @@ namespace Dune {
typedef typename BaseType :: GridPartType GridPartType;
typedef typename BaseType :: ProblemType ProblemType ;
DGAdvectionOperator( GridPartType& gridPart , const ProblemType& problem )
DGAdvectionOperator( GridPartType& gridPart, ProblemType& problem )
: BaseType( gridPart, problem )
{}
......@@ -127,7 +127,7 @@ namespace Dune {
using BaseType::discreteModel_;
public:
DGDiffusionOperator( GridPartType& gridPart , const ProblemType& problem )
DGDiffusionOperator( GridPartType& gridPart, ProblemType& problem )
: BaseType( gridPart, problem )
{}
......@@ -183,7 +183,7 @@ namespace Dune {
typedef typename BaseType :: GridPartType GridPartType;
typedef typename BaseType :: ProblemType ProblemType ;
DGAdaptationIndicatorOperator( GridPartType& gridPart , const ProblemType& problem )
DGAdaptationIndicatorOperator( GridPartType& gridPart, ProblemType& problem )
: BaseType( gridPart, problem )
{}
......@@ -322,7 +322,7 @@ namespace Dune {
}
public:
DGLimitedAdvectionOperator( GridPartType& gridPart , const ProblemType& problem )
DGLimitedAdvectionOperator( GridPartType& gridPart, ProblemType& problem )
: model_( problem )
, numflux_( model_ )
, gridPart_( gridPart )
......@@ -495,7 +495,7 @@ namespace Dune {
typedef typename BaseType :: ProblemType ProblemType;
public:
DGLimitedAdvectionDiffusionOperator ( GridPartType& gridPart , const ProblemType& problem )
DGLimitedAdvectionDiffusionOperator ( GridPartType& gridPart, ProblemType& problem )
: BaseType( gridPart, problem )
{}
......
......@@ -381,6 +381,12 @@ struct StepperBase
return *problem_;
}
InitialDataType& problem()
{
assert( problem_ );
return *problem_;
}
virtual const ModelType& model() const = 0 ;
protected:
......@@ -434,7 +440,7 @@ protected:
// InitialDataType is a Dune::Operator that evaluates to $u_0$ and also has a
// method that gives you the exact solution.
const InitialDataType* problem_;
InitialDataType* problem_;
// Initial flux for advection discretization (UpwindFlux)
AdaptationHandlerType* adaptationHandler_;
......
......@@ -4,6 +4,7 @@
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
#include <dune/fem/gridpart/idgridpart.hh>
#include <dune/fem/solver/odesolver.hh>
#include <dune/fem/solver/pardginverseoperators.hh>
#include <dune/fem-dg/operator/dg/dgoperatorchoice.hh>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment