Commit 701a6daf authored by Janick Gerstenberger's avatar Janick Gerstenberger

suppress unused variable warnings

parent 0744ed73
#ifndef DUNE_VOF_COMMON_COMMOPERATION_HH
#define DUNE_VOF_COMMON_COMMOPERATION_HH
#include <dune/common/unused.hh>
namespace Dune
{
namespace VoF
......@@ -17,7 +20,7 @@ namespace Dune
struct Copy
{
template< class T >
T operator()( T a, T b ) const { return a; }
T operator()( T a, DUNE_UNUSED T b ) const { return a; }
};
}
......
......@@ -4,6 +4,8 @@
#include <cmath>
#include <dune/common/fvector.hh>
#include <dune/common/unused.hh>
template < class ctype, int dim >
struct Hills
......@@ -19,7 +21,7 @@ struct Hills
return evaluate ( x, 0.0, u );
}
void evaluate ( const DomainType &x, double t, RangeType &u ) const
void evaluate ( const DomainType &x, DUNE_UNUSED double t, RangeType &u ) const
{
double z = 0.5;
for ( int i = 0; i < dim-1; ++i )
......@@ -29,7 +31,7 @@ struct Hills
u = ( x[dim-1] < z ) ? RangeType( 1.0 ) : RangeType( 0.0 );
}
void velocityField ( const DomainType &x, const double t, DomainType &rot ) const {}
void velocityField ( DUNE_UNUSED const DomainType &x, DUNE_UNUSED const double t, DUNE_UNUSED DomainType &rot ) const {}
};
......
......@@ -4,6 +4,8 @@
#include <cmath>
#include <dune/common/fvector.hh>
#include <dune/common/unused.hh>
template < class ctype, int dim >
struct LinearWall
......@@ -24,7 +26,7 @@ struct LinearWall
return pos + t * speed_;
}
void velocityField ( const DomainType &x, const double t, DomainType &rot ) const
void velocityField ( DUNE_UNUSED const DomainType &x, DUNE_UNUSED const double t, DomainType &rot ) const
{
rot = 0;
rot[ 0 ] = speed_;
......
......@@ -4,6 +4,7 @@
#include <cmath>
#include <dune/common/fvector.hh>
#include <dune/common/unused.hh>
template < class ctype, int dim >
struct RotatingCircle {};
......@@ -37,12 +38,12 @@ struct RotatingCircle < ctype, 2 >
return center;
}
ctype radius( const double t ) const
ctype radius( DUNE_UNUSED const double t ) const
{
return 0.15;
}
void velocityField ( const DomainType &x, const double t, DomainType &r ) const
void velocityField ( const DomainType &x, DUNE_UNUSED const double t, DomainType &r ) const
{
DomainType center = rotationCenter();
r[ 0 ] = x[ 1 ] - center[ 1 ];
......@@ -51,7 +52,7 @@ struct RotatingCircle < ctype, 2 >
r *= 2 * M_PI / 10;
}
ctype curvature( const DomainType &x ) const
ctype curvature( DUNE_UNUSED const DomainType &x ) const
{
return 1.0 / radius( 0.0 );
}
......@@ -90,7 +91,7 @@ struct RotatingCircle < ctype, 3 >
u = ( dist < 0.15 ) ? RangeType( 1.0 ) : RangeType( 0.0 );
}
void velocityField ( const DomainType &x, const double t, DomainType &rot ) const
void velocityField ( const DomainType &x, DUNE_UNUSED const double t, DomainType &rot ) const
{
DomainType c = x;
c -= DomainType{ 0.5, 0.5, 0.5 };
......
......@@ -3,6 +3,7 @@
//- dune-common includes
#include <dune/common/fvector.hh>
#include <dune/common/unused.hh>
template < class ctype, int dim >
......@@ -23,7 +24,7 @@ struct SFlow< ctype, 2 >
evaluate( x, 0.0, u );
}
void evaluate ( const DomainType &x, double t, RangeType &u ) const
void evaluate ( const DomainType &x, DUNE_UNUSED double t, RangeType &u ) const
{
DomainType y{ 0.5, 0.5 };
double radius = 0.25;
......@@ -32,7 +33,7 @@ struct SFlow< ctype, 2 >
u = ( y.two_norm2() <= radius * radius ) ? 1.0 : 0.0;
}
void velocityField ( const DomainType &x, const double t, DomainType &v ) const
void velocityField ( const DomainType &x, DUNE_UNUSED const double t, DomainType &v ) const
{
DomainType y{ 4 * x[ 0 ] - 2,
4 * x[ 1 ] - 2 };
......@@ -59,7 +60,7 @@ struct SFlow< ctype, 3 >
evaluate( x, 0.0, u );
}
void evaluate ( const DomainType &x, double t, RangeType &u ) const
void evaluate ( const DomainType &x, DUNE_UNUSED double t, RangeType &u ) const
{
DomainType y{ 0.5, 0.5, 0.5 };
double radius = 0.25;
......@@ -68,7 +69,7 @@ struct SFlow< ctype, 3 >
u = ( y.two_norm2() <= radius * radius ) ? 1.0 : 0.0;
}
void velocityField ( const DomainType &x, const double t, DomainType &v ) const
void velocityField ( const DomainType &x, DUNE_UNUSED const double t, DomainType &v ) const
{
DomainType y{ 4 * x[ 0 ] - 2,
4 * x[ 1 ] - 2,
......
......@@ -4,6 +4,7 @@
#include <cmath>
#include <dune/common/fvector.hh>
#include <dune/common/unused.hh>
template< class ctype, int dim > struct Slope;
......@@ -23,17 +24,17 @@ struct Slope< ctype, 2 >
u = val > 0.0 ? 1.0 : 0.0;
}
void evaluate ( const DomainType& x, double t, RangeType& u ) const
void evaluate ( const DomainType& x, DUNE_UNUSED double t, RangeType& u ) const
{
evaluate( x, u );
}
void velocityField ( const DomainType& x, double t, DomainType& v ) const
void velocityField ( DUNE_UNUSED const DomainType& x, DUNE_UNUSED double t, DomainType& v ) const
{
v = 0.0;
}
double curvature ( const DomainType& x ) const
double curvature ( DUNE_UNUSED const DomainType& x ) const
{
return 0.0;
}
......
......@@ -44,7 +44,7 @@ struct SlottedCylinder
u = RangeType( 0.0 );
}
void velocityField ( const DomainType &x, const double t, DomainType &rot ) const
void velocityField ( const DomainType &x, DUNE_UNUSED const double t, DomainType &rot ) const
{
rot = x;
rot -= DomainType{ 0.5, 0.5 };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment