/usr/include/dune/grid/alugrid/common/transformation.hh is in libdune-grid-dev 2.2.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #ifndef DUNE_ALUGRID_TRANSFORMATION_HH
#define DUNE_ALUGRID_TRANSFORMATION_HH
#include <dune/common/fvector.hh>
#include <dune/common/fmatrix.hh>
#if HAVE_ALUGRID
namespace Dune
{
template< class ctype, int dimw >
struct ALUGridTransformation
{
static const int dimension = dimw;
typedef FieldVector< ctype, dimension > WorldVector;
typedef FieldMatrix< ctype, dimension, dimension > WorldMatrix;
ALUGridTransformation ( const WorldMatrix &matrix, const WorldVector &shift )
: matrix_( matrix ),
shift_( shift )
{}
WorldVector evaluate ( const WorldVector &x ) const
{
WorldVector y = shift_;
matrix_.umv( x, y );
return y;
}
WorldVector evaluateInverse ( const WorldVector &y ) const
{
// Note: We assume the matrix to be orthogonal, here
WorldVector ys = y - shift_;
WorldVector x;
matrix_.mtv( ys, x );
return x;
}
private:
WorldMatrix matrix_;
WorldVector shift_;
};
}
#endif // #if HAVE_ALUGRID
#endif // #ifndef DUNE_ALUGRID_TRANSFORMATION_HH
|