Skip to content
Snippets Groups Projects
Commit 205db864 authored by Robert K's avatar Robert K Committed by Tobias Malkmus
Browse files

Use AnalyticalEuler with proper field type.

parent 636de00b
No related branches found
No related tags found
No related merge requests found
...@@ -82,6 +82,7 @@ namespace Fem ...@@ -82,6 +82,7 @@ namespace Fem
public: public:
EulerModel( const ProblemType& problem ) EulerModel( const ProblemType& problem )
: gamma_( problem.gamma() ) : gamma_( problem.gamma() )
, eulerFlux_()
, problem_( problem ) , problem_( problem )
, fieldRotator_( 1 ) // insert number of fist velocity component , fieldRotator_( 1 ) // insert number of fist velocity component
{} {}
...@@ -115,7 +116,7 @@ namespace Fem ...@@ -115,7 +116,7 @@ namespace Fem
inline double pressure( const RangeType& u ) const inline double pressure( const RangeType& u ) const
{ {
return EulerAnalyticalFlux< dimDomain >().pressure( gamma_ , u ); return eulerFlux_.pressure( gamma_ , u );
} }
inline void conservativeToPrimitive( const double time, inline void conservativeToPrimitive( const double time,
...@@ -134,7 +135,7 @@ namespace Fem ...@@ -134,7 +135,7 @@ namespace Fem
const FluxRangeType& jacu, const FluxRangeType& jacu,
FluxRangeType& f ) const FluxRangeType& f ) const
{ {
EulerAnalyticalFlux<dimDomain>().analyticalFlux( gamma_ , u , f ); eulerFlux_.analyticalFlux( gamma_ , u , f );
} }
template <class LocalEvaluation> template <class LocalEvaluation>
...@@ -161,7 +162,7 @@ namespace Fem ...@@ -161,7 +162,7 @@ namespace Fem
const FluxRangeType& du, const FluxRangeType& du,
RangeType& A ) const RangeType& A ) const
{ {
EulerAnalyticalFlux<dimDomain>().jacobian( gamma_ , u , du , A ); eulerFlux_.jacobian( gamma_ , u , du , A );
} }
...@@ -244,7 +245,7 @@ namespace Fem ...@@ -244,7 +245,7 @@ namespace Fem
// Slip boundary condition // Slip boundary condition
const DomainType normal = local.intersection().integrationOuterNormal( local.localPosition() ); const DomainType normal = local.intersection().integrationOuterNormal( local.localPosition() );
const double p = EulerAnalyticalFlux< dimDomain >().pressure( gamma_ , uLeft ); const double p = eulerFlux_.pressure( gamma_ , uLeft );
gLeft = 0; gLeft = 0;
for ( int i = 0 ; i < dimDomain ; ++i ) for ( int i = 0 ; i < dimDomain ; ++i )
gLeft[i+1] = normal[i] * p; gLeft[i+1] = normal[i] * p;
...@@ -279,7 +280,7 @@ namespace Fem ...@@ -279,7 +280,7 @@ namespace Fem
double& advspeed, double& advspeed,
double& totalspeed ) const double& totalspeed ) const
{ {
advspeed = EulerAnalyticalFlux< dimDomain >().maxSpeed( gamma_ , normal , u ); advspeed = eulerFlux_.maxSpeed( gamma_ , normal , u );
totalspeed = advspeed; totalspeed = advspeed;
} }
...@@ -323,8 +324,8 @@ namespace Fem ...@@ -323,8 +324,8 @@ namespace Fem
return false; return false;
else else
{ {
//std::cout << EulerAnalyticalFlux<dimDomain>().rhoeps(u) << std::endl; //std::cout << eulerFlux_.rhoeps(u) << std::endl;
return (EulerAnalyticalFlux<dimDomain>().rhoeps(u) > 1e-8); return (eulerFlux_.rhoeps(u) > 1e-8);
} }
} }
...@@ -373,6 +374,7 @@ namespace Fem ...@@ -373,6 +374,7 @@ namespace Fem
} }
protected: protected:
const EulerAnalyticalFlux<dimDomain, RangeFieldType > eulerFlux_;
const ThermodynamicsType thermodynamics_; const ThermodynamicsType thermodynamics_;
const ProblemType& problem_; const ProblemType& problem_;
FieldRotator< DomainType, RangeType > fieldRotator_; FieldRotator< DomainType, RangeType > fieldRotator_;
......
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