diff --git a/dune/fem-dg/examples/advdiff/models.hh b/dune/fem-dg/examples/advdiff/models.hh index d2f629a0960a10ffe88ff60d77e343abcd3642b3..12fa7d0994cd74a1ffc32dc27b140276cbf91c3d 100644 --- a/dune/fem-dg/examples/advdiff/models.hh +++ b/dune/fem-dg/examples/advdiff/models.hh @@ -185,7 +185,7 @@ namespace Fem const JacobianRangeType& jacu, FluxRangeType & f) const { - const DomainType& v = velocity( local ); + const DomainType& v = velocity( local, u ); // f = uV; for( int r=0; r<dimRange; ++r ) @@ -197,7 +197,8 @@ namespace Fem * \brief velocity calculation, is called by advection() */ template <class LocalEvaluation> - inline DomainType velocity(const LocalEvaluation& local) const + inline DomainType velocity(const LocalEvaluation& local, + const RangeType& u ) { return local.values( GetVelocity(), local, time_, problem_ ); } diff --git a/dune/fem-dg/examples/poisson/models.hh b/dune/fem-dg/examples/poisson/models.hh index a3db54f75ec6fc9a4aa256096247e662306821e2..8cf8553d4a8696155caec240ce2c0000d058145a 100644 --- a/dune/fem-dg/examples/poisson/models.hh +++ b/dune/fem-dg/examples/poisson/models.hh @@ -177,7 +177,7 @@ namespace Poisson const JacobianRangeType& jac, FluxRangeType& f) const { - const DomainType v = velocity( local ); + const DomainType v = velocity( local, u ); //f = uv; for( int r=0; r<dimRange; ++r ) for( int d=0; d<dimDomain; ++d ) @@ -345,7 +345,8 @@ namespace Poisson * \param[in] local local evaluation */ template <class LocalEvaluation> - DomainType velocity (const LocalEvaluation& local) const + DomainType velocity (const LocalEvaluation& local, + const RangeType& uLeft ) const { return DomainType( problem().constantAdvection() ); } diff --git a/dune/fem-dg/examples/stokes/models.hh b/dune/fem-dg/examples/stokes/models.hh index 3447ff556076a785d56598e6e55d9dcd13b11daf..ebb5ee354fed07f972cb1c881aa4593553e57640 100644 --- a/dune/fem-dg/examples/stokes/models.hh +++ b/dune/fem-dg/examples/stokes/models.hh @@ -120,7 +120,7 @@ namespace Stokes FluxRangeType & f) const { // evaluate velocity V - const DomainType v = velocity( local ); + const DomainType v = velocity( local, u ); //f = uV; for( int r=0; r<dimRange; ++r ) @@ -132,7 +132,8 @@ namespace Stokes * \brief velocity calculation, is called by advection() */ template <class LocalEvaluation> - inline DomainType velocity ( const LocalEvaluation& local ) const + inline DomainType velocity ( const LocalEvaluation& local, + const RangeType& u ) const { DomainType v; problem_.velocity( local.entity().geometry().global( local.position() ), v ); diff --git a/dune/fem-dg/models/defaultmodel.hh b/dune/fem-dg/models/defaultmodel.hh index daf52719dc5f9655f2cb6a40e51680dcf8d95817..5ac29d38d384a034577d6ee98af40f2fd58b8dee 100644 --- a/dune/fem-dg/models/defaultmodel.hh +++ b/dune/fem-dg/models/defaultmodel.hh @@ -342,7 +342,8 @@ namespace Fem * \param[in] local local evaluation */ template <class LocalEvaluation> - DomainType velocity (const LocalEvaluation& local) const + DomainType velocity (const LocalEvaluation& local, + const RangeType& u ) const { return (DomainType)0; } diff --git a/dune/fem-dg/operator/fluxes/advection/upwindflux.hh b/dune/fem-dg/operator/fluxes/advection/upwindflux.hh index 569cb3279c0de931c7523ea58b31c0e387224286..447dd1c098850cc2532ac51c887208d7f5975853 100644 --- a/dune/fem-dg/operator/fluxes/advection/upwindflux.hh +++ b/dune/fem-dg/operator/fluxes/advection/upwindflux.hh @@ -73,7 +73,7 @@ namespace Fem const DomainType normal = left.intersection().integrationOuterNormal(x); // get velocity - const DomainType v = model_.velocity( left ); + const DomainType v = model_.velocity( left, uLeft ); const double upwind = normal * v; if (upwind>0)