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

[cleanup] use BoundaryIdProvider to access boundary ids.

parent 1b92b362
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,8 @@ namespace Fem
typedef typename Traits::ThermodynamicsType ThermodynamicsType;
typedef Dune::Fem::BoundaryIdProvider < GridType > BoundaryIdProviderType;
// for Euler equations diffusion is disabled
static const bool hasAdvection = true;
static const bool hasDiffusion = false;
......@@ -170,10 +172,16 @@ namespace Fem
enum { Inflow = 1, Outflow = 2, Reflection = 3 , Slip = 4 };
enum { MaxBnd = Slip };
template <class LocalEvaluation>
int getBoundaryId( const LocalEvaluation& local ) const
{
return BoundaryIdProviderType::boundaryId( local.intersection() );
}
template <class LocalEvaluation>
inline bool hasBoundaryValue( const LocalEvaluation& local ) const
{
const int bndId = problem_.boundaryId( local.intersection().boundaryId() );
const int bndId = problem_.boundaryId( getBoundaryId( local ) );
// on slip boundary we use boundaryFlux
return bndId != Slip;
}
......@@ -188,7 +196,7 @@ namespace Fem
//uRight = uLeft;
// 5 and 6 is also Reflection
//const int bndId = (it.boundaryId() > MaxBnd) ? MaxBnd : it.boundaryId();
const int bndId = problem_.boundaryId( local.intersection().boundaryId() );
const int bndId = problem_.boundaryId( getBoundaryId( local ) );
assert( bndId > 0 );
if( bndId == Inflow )
......
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