diff --git a/dune/fem-dg/test/navierstokes/ns_model.hh b/dune/fem-dg/test/navierstokes/ns_model.hh index d632f787dbc6a1dfd102b6676fbcb98d6c98de35..813d8778651ea4d81b14eaecba082d899df4dbaa 100644 --- a/dune/fem-dg/test/navierstokes/ns_model.hh +++ b/dune/fem-dg/test/navierstokes/ns_model.hh @@ -8,6 +8,7 @@ // local includes #include <dune/fem-dg/models/defaultmodel.hh> #include <dune/fem-dg/operator/limiter/limitpass.hh> +#include "thermodynamics.hh" #include "ns_model_spec.hh" @@ -18,10 +19,11 @@ namespace Dune { // NAVIER-STOKES EQNS // ////////////////////////////////////////////////////// -template< class GridPart > +template< class GridPart, class Problem > class NSModelTraits { public: + typedef Problem ProblemType; typedef GridPart GridPartType; typedef typename GridPart :: GridType GridType; enum { dimDomain = GridType :: dimensionworld }; @@ -57,12 +59,12 @@ class NSModelTraits template< class GridPartType , class ProblemImp > -class NSModel : public DefaultModel < NSModelTraits< GridPartType > > +class NSModel : public DefaultModel < NSModelTraits< GridPartType, ProblemImp > > { public: typedef ProblemImp ProblemType; typedef typename GridPartType::GridType GridType; - typedef NSModelTraits< GridPartType > Traits; + typedef NSModelTraits< GridPartType, ProblemType > Traits; typedef NSFlux< Traits > FluxType ; diff --git a/dune/fem-dg/test/navierstokes/ns_model_spec.hh b/dune/fem-dg/test/navierstokes/ns_model_spec.hh index 7837f2a30dbd82854753871f1fa30a021a4c6383..ca3bc70019ebd0110c03064efee65a2bcde9882a 100644 --- a/dune/fem-dg/test/navierstokes/ns_model_spec.hh +++ b/dune/fem-dg/test/navierstokes/ns_model_spec.hh @@ -21,6 +21,7 @@ class NSFlux enum { dimGradRange = dimRange * dimDomain }; public: + typedef typename Traits::ProblemType ProblemType; typedef typename Traits::DomainType DomainType; typedef typename Traits::RangeType RangeType; typedef Dune::FieldVector< double, dimGradRange > GradientRangeType; @@ -31,7 +32,7 @@ public: ConvertedJacobianRangeType; typedef Dune::FieldMatrix< double, dimDomain, dimDomain > VelocityGradientType; - NSFlux( const NSProblemType& problem ) + NSFlux( const ProblemType& problem ) : eulerFlux_() , problem_( problem ) , gamma_( problem.gamma() ) @@ -78,7 +79,7 @@ public: protected: const EulerAnalyticalFlux<dimDomain> eulerFlux_; - const NSProblemType& problem_; + const ProblemType& problem_; const double gamma_; const double R_d_inv_; const double Re_inv_; diff --git a/dune/fem-dg/test/navierstokes/problemcreator.hh b/dune/fem-dg/test/navierstokes/problemcreator.hh index a48b3c56fc7772ae7a7fe2b99b2a2eafcb6cb4b5..bde82df5149ade067eb112362b9edbbf6d1c32a0 100644 --- a/dune/fem-dg/test/navierstokes/problemcreator.hh +++ b/dune/fem-dg/test/navierstokes/problemcreator.hh @@ -14,7 +14,7 @@ // local includes #include <dune/fem-dg/operator/fluxes/eulerfluxes.hh> #include <dune/fem-dg/operator/fluxes/diffusionflux.hh> -#include "problemtype.hh" +#include "nswaves.hh" #include "ns_model.hh" #include <dune/fem-dg/stepper/base.hh> @@ -23,12 +23,12 @@ template< class GridType > struct ProblemGenerator { - typedef NSProblemType ProblemType; + typedef NSWaves< GridType > ProblemType; template< class GridPart > struct Traits { - typedef ProblemType InitialDataType; + typedef ProblemType InitialDataType; typedef Dune::NSModel< GridPart, InitialDataType > ModelType; // choice of diffusion flux (see diffusionflux.hh for methods) static const Dune :: DGDiffusionFluxIdentifier PrimalDiffusionFluxId