Skip to content
Snippets Groups Projects
Commit c38333e5 authored by Robert K's avatar Robert K
Browse files

[bugfix][Fluxes] correctly implement necessary constructors for

parameter forwarding.
parent 1cd29c38
No related branches found
No related tags found
1 merge request!6Latest improvements in dune-fem-dg
......@@ -34,12 +34,9 @@ namespace Fem
{
typedef LLFAdvFlux< ModelImp > BaseType;
public:
typedef typename BaseType::ParameterType ParameterType;
typedef typename BaseType::IdEnum IdEnum;
typedef typename BaseType::ModelType ModelType;
DGAdvectionFlux( const ModelType& mod, const ParameterType& parameters = Dune::Fem::Parameter::container() )
: BaseType( mod, parameters )
template< class ... Args>
DGAdvectionFlux( Args&&... args )
: BaseType( std::forward<Args>(args)... )
{}
};
......@@ -56,13 +53,9 @@ namespace Fem
{
typedef NoFlux< ModelImp > BaseType;
public:
typedef typename BaseType::ParameterType ParameterType;
typedef typename BaseType::IdEnum IdEnum;
typedef typename BaseType::ModelType ModelType;
DGAdvectionFlux( const ModelType& mod,
const ParameterType& parameters = ParameterType() )
: BaseType( mod, parameters )
template< class ... Args>
DGAdvectionFlux( Args&&... args )
: BaseType( std::forward<Args>(args)... )
{}
};
......@@ -79,13 +72,9 @@ namespace Fem
{
typedef UpwindFlux< ModelImp > BaseType;
public:
typedef typename BaseType::ParameterType ParameterType;
typedef typename BaseType::IdEnum IdEnum;
typedef typename BaseType::ModelType ModelType;
DGAdvectionFlux( const ModelType& mod,
const ParameterType& parameters = ParameterType() )
: BaseType( mod )
template< class ... Args>
DGAdvectionFlux( Args&&... args )
: BaseType( std::forward<Args>(args)... )
{}
};
......@@ -118,13 +107,13 @@ namespace Fem
/**
* \brief Constructor
*/
DGAdvectionFlux (const ModelType& mod,
const ParameterType& parameters = ParameterType() )
: BaseType( mod, parameters ),
method_( parameters.getMethod() ),
flux_none_( mod, parameters ),
flux_llf_( mod, parameters ),
flux_upwind_( mod )
template< class ... Args>
DGAdvectionFlux( Args&&... args )
: BaseType( std::forward<Args>(args)... ),
method_( this->parameter().getMethod() ),
flux_none_( this->model(), this->parameter() ),
flux_llf_( this->model(), this->parameter() ),
flux_upwind_( this->model(), this->parameter() )
{}
/**
......
......@@ -27,13 +27,9 @@ namespace Fem
{
typedef EulerFluxImpl< Model, EulerNumFlux::EulerFlux<Model,EulerNumFlux::EulerFluxType::LLF > > BaseType ;
public:
typedef typename BaseType::ParameterType ParameterType;
typedef typename BaseType::IdEnum IdEnum;
typedef typename BaseType::ModelType ModelType;
DGAdvectionFlux( const Model& mod,
const ParameterType& parameters = ParameterType() )
: BaseType( mod, parameters )
template< class ... Args>
DGAdvectionFlux( Args&&... args )
: BaseType( std::forward<Args>(args)... )
{}
static std::string name () { return "LLF (Dennis)"; }
};
......@@ -50,13 +46,9 @@ namespace Fem
{
typedef EulerFluxImpl< Model, EulerNumFlux::EulerFlux<Model,EulerNumFlux::EulerFluxType::HLL > > BaseType ;
public:
typedef typename BaseType::ParameterType ParameterType;
typedef typename BaseType::IdEnum IdEnum;
typedef typename BaseType::ModelType ModelType;
DGAdvectionFlux( const Model& mod,
const ParameterType& parameters = ParameterType() )
: BaseType( mod, parameters )
template< class ... Args>
DGAdvectionFlux( Args&&... args )
: BaseType( std::forward<Args>(args)... )
{}
static std::string name () { return "HLL (Dennis)"; }
};
......@@ -73,13 +65,9 @@ namespace Fem
{
typedef EulerFluxImpl< Model, EulerNumFlux::EulerFlux<Model,EulerNumFlux::EulerFluxType::HLLC > > BaseType ;
public:
typedef typename BaseType::ParameterType ParameterType;
typedef typename BaseType::IdEnum IdEnum;
typedef typename BaseType::ModelType ModelType;
DGAdvectionFlux( const Model& mod,
const ParameterType& parameters = ParameterType() )
: BaseType( mod, parameters )
template< class ... Args>
DGAdvectionFlux( Args&&... args )
: BaseType( std::forward<Args>(args)... )
{}
static std::string name () { return "HLLC (Dennis)"; }
};
......@@ -111,13 +99,13 @@ namespace Fem
/**
* \copydoc DGAdvectionFluxBase::DGAdvectionFluxBase()
*/
DGAdvectionFlux( const ModelType& mod,
const ParameterType& parameters = ParameterType() )
: BaseType( mod, parameters ),
method_( parameters.getMethod() ),
flux_llf_( mod ),
flux_hll_( mod ),
flux_hllc_( mod )
template< class ... Args>
DGAdvectionFlux( Args&&... args )
: BaseType( std::forward<Args>(args)... ),
method_( this->parameter().getMethod() ),
flux_llf_(this->model() ),
flux_hll_( this->model() ),
flux_hllc_( this->model() )
{}
/**
......
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