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

adjust to changes in the main routine.

parent 5e1db071
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,10 @@ ...@@ -14,7 +14,10 @@
// local includes // local includes
#include <dune/fem-dg/operator/fluxes/diffusionflux.hh> #include <dune/fem-dg/operator/fluxes/diffusionflux.hh>
#include <dune/fem-dg/stepper/base.hh>
// overload default stepper traits
#include "steppertraits.hh"
#include <dune/fem-dg/stepper/advectiondiffusionstepper.hh>
#include "problems/problem.hh" #include "problems/problem.hh"
#include "problems/problemQuasiHeatEqn.hh" #include "problems/problemQuasiHeatEqn.hh"
...@@ -27,6 +30,12 @@ ...@@ -27,6 +30,12 @@
template< class GridType > template< class GridType >
struct ProblemGenerator struct ProblemGenerator
{ {
template <class Traits>
struct Stepper
{
typedef AdvectionDiffusionStepper< GridType, Traits, POLORDER > Type;
};
typedef Dune :: EvolutionProblemInterface< typedef Dune :: EvolutionProblemInterface<
Dune::Fem::FunctionSpace< double, double, GridType::dimension, Dune::Fem::FunctionSpace< double, double, GridType::dimension,
DIMRANGE>, DIMRANGE>,
...@@ -66,8 +75,9 @@ struct ProblemGenerator ...@@ -66,8 +75,9 @@ struct ProblemGenerator
static inline Dune::GridPtr<GridType> static inline Dune::GridPtr<GridType>
initializeGrid( const std::string description ) initializeGrid()
{ {
std::string description( advectionFluxName() + " " + diffusionFluxName() );
// use default implementation // use default implementation
return initialize< GridType > ( description ); return initialize< GridType > ( description );
} }
...@@ -93,12 +103,5 @@ struct ProblemGenerator ...@@ -93,12 +103,5 @@ struct ProblemGenerator
} }
}; };
#include "steppertraits.hh"
//#if ADVECTION && DIFFUSION
#include <dune/fem-dg/stepper/advectiondiffusionstepper.hh>
//#else
//#include <dune/fem-dg/stepper/advectionstepper.hh>
//#endif
#endif // FEMHOWTO_HEATSTEPPER_HH #endif // FEMHOWTO_HEATSTEPPER_HH
...@@ -16,11 +16,17 @@ ...@@ -16,11 +16,17 @@
#include "eulermodel.hh" #include "eulermodel.hh"
#include "problems.hh" #include "problems.hh"
#include <dune/fem-dg/stepper/base.hh> #include <dune/fem-dg/stepper/advectionstepper.hh>
template <class GridType> template <class GridType>
struct ProblemGenerator struct ProblemGenerator
{ {
template <class Traits>
struct Stepper
{
typedef AdvectionStepper< GridType, Traits, POLORDER > Type;
};
typedef ProblemBase< GridType > ProblemType ; typedef ProblemBase< GridType > ProblemType ;
template <class GridPart> template <class GridPart>
...@@ -73,21 +79,10 @@ struct ProblemGenerator ...@@ -73,21 +79,10 @@ struct ProblemGenerator
#endif #endif
} }
static inline std::string diffusionFluxName()
{
#ifdef EULER
return "";
#elif (defined PRIMALDG)
return Dune::Fem::Parameter::getValue< std::string >("dgdiffusionflux.method");
#else
return "LDG";
#endif
}
static inline Dune::GridPtr<GridType> static inline Dune::GridPtr<GridType>
initializeGrid( const std::string description ) initializeGrid()
{ {
std::string description( advectionFluxName() );
// use default implementation // use default implementation
return initialize< GridType >( description ); return initialize< GridType >( description );
} }
......
...@@ -17,12 +17,17 @@ ...@@ -17,12 +17,17 @@
#include "nswaves.hh" #include "nswaves.hh"
#include "ns_model.hh" #include "ns_model.hh"
#include <dune/fem-dg/stepper/base.hh> #include <dune/fem-dg/stepper/advectiondiffusionstepper.hh>
template< class GridType > template< class GridType >
struct ProblemGenerator struct ProblemGenerator
{ {
template < class Traits >
struct Stepper
{
typedef AdvectionDiffusionStepper< GridType, Traits, POLORDER > Type;
};
typedef NSWaves< GridType > ProblemType; typedef NSWaves< GridType > ProblemType;
template< class GridPart > template< class GridPart >
...@@ -94,8 +99,9 @@ struct ProblemGenerator ...@@ -94,8 +99,9 @@ struct ProblemGenerator
} }
static inline Dune::GridPtr<GridType> static inline Dune::GridPtr<GridType>
initializeGrid( const std::string description ) initializeGrid()
{ {
std::string description( advectionFluxName() + " " + diffusionFluxName() );
// use default implementation // use default implementation
return initialize< GridType > ( description ); return initialize< GridType > ( description );
} }
......
#undef ENABLE_MPI
#ifndef FEMHOWTO_POISSONSTEPPER_HH #ifndef FEMHOWTO_POISSONSTEPPER_HH
#define FEMHOWTO_POISSONSTEPPER_HH #define FEMHOWTO_POISSONSTEPPER_HH
#include <config.h> #include <config.h>
...@@ -31,7 +29,7 @@ ...@@ -31,7 +29,7 @@
#include <dune/fem-dg/assemble/primalmatrix.hh> #include <dune/fem-dg/assemble/primalmatrix.hh>
#include <dune/fem-dg/solver/linearsolvers.hh> #include <dune/fem-dg/solver/linearsolvers.hh>
#include <dune/fem-dg/stepper/ellipt.hh> #include <dune/fem-dg/stepper/ellipticalgorithm.hh>
// local includes // local includes
#include "poissonproblem.hh" #include "poissonproblem.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