1#ifndef DUNE_SPGRID_NORMAL_HH
2#define DUNE_SPGRID_NORMAL_HH
4#include <dune/common/fvector.hh>
14 template<
class ct,
int dim >
82 int face ()
const {
return face_; }
86 int sign ()
const {
return 2*(
face() & 1) - 1; }
97 template<
class ct,
int dim >
104 template<
class ct,
int dim >
113 template<
class ct,
int dim >
120 template<
class ct,
int dim >
123 return (a ==
static_cast< FieldVector< ct, dim >
>( b ));
127 template<
class ct,
int dim >
130 return (a !=
static_cast< FieldVector< ct, dim >
>( b ));
134 template<
class ct,
int dim >
137 return (
static_cast< FieldVector< ct, dim >
>( a ) == b);
141 template<
class ct,
int dim >
144 return (
static_cast< FieldVector< ct, dim >
>( a ) != b);
152 template<
class ct,
int dim >
153 inline typename SPNormalVector< ct, dim >::This &
161 template<
class ct,
int dim >
170 template<
class ct,
int dim >
173 return (i_ == other.i_) && (p_ == other.p_);
177 template<
class ct,
int dim >
180 return (i_ != other.i_) || (p_ != other.p_);
184 template<
class ct,
int dim >
188 return (i_ == other.i_ ? p_ * other.p_ :
field_type( 0 ));
192 template<
class ct,
int dim >
196 return p_ * other[ i_ ];
200 template<
class ct,
int dim >
204 return std::abs( p_ );
208 template<
class ct,
int dim >
212 return std::abs( p_ );
216 template<
class ct,
int dim >
224 template<
class ct,
int dim >
228 return std::abs( p_ );
275 return idB.
sign() * idA[ idB.
axis() ];
281 return idA.
sign() * idB[ idA.
axis() ];
Definition: iostream.hh:7
bool operator==(const FieldVector< ct, dim > &a, const SPNormalVector< ct, dim > &b)
Definition: normal.hh:121
SPMesh< dim > operator-(const SPMesh< dim > &mesh, const SPMultiIndex< dim > &shift)
Definition: mesh.hh:245
SPMesh< dim > operator+(const SPMesh< dim > &mesh, const SPMultiIndex< dim > &shift)
Definition: mesh.hh:236
SPMultiIndex< dim > operator*(const SPMultiIndex< dim > &a, const int &b)
Definition: multiindex.hh:260
bool operator!=(const FieldVector< ct, dim > &a, const SPNormalVector< ct, dim > &b)
Definition: normal.hh:128
multiindex
Definition: multiindex.hh:25
field_type two_norm() const
Definition: normal.hh:210
field_type one_norm() const
Definition: normal.hh:202
SPNormalVector(size_type i, const field_type &p)
Definition: normal.hh:29
Dune::FieldVector< field_type, dim > FieldVector
Definition: normal.hh:27
bool operator!=(const This &other) const
Definition: normal.hh:178
ct value_type
Definition: normal.hh:23
field_type operator*(const This &other) const
Definition: normal.hh:186
This & operator/=(const field_type &s)
Definition: normal.hh:163
ct field_type
Definition: normal.hh:22
static const int dimension
Definition: normal.hh:20
bool operator==(const This &other) const
Definition: normal.hh:171
std::size_t size_type
Definition: normal.hh:25
field_type two_norm2() const
Definition: normal.hh:218
This & operator*=(const field_type &s)
Definition: normal.hh:154
field_type infinity_norm() const
Definition: normal.hh:226
int sign() const
Definition: normal.hh:86
SPNormalId()
Definition: normal.hh:70
This operator-() const
Definition: normal.hh:80
SPNormalId(int face)
Definition: normal.hh:72
int face() const
Definition: normal.hh:82
static const int dimension
Definition: normal.hh:68
int axis() const
Definition: normal.hh:84