5#ifndef DUNE_DGF_PERIODICFACETRANSBLOCK_HH
6#define DUNE_DGF_PERIODICFACETRANSBLOCK_HH
11#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
23 struct PeriodicFaceTransformationBlock
31 std::vector< T > fields_;
34 Matrix (
int rows,
int cols )
37 fields_( rows * cols )
40 const T &operator() (
int i,
int j )
const
42 return fields_[ i * cols_ + j ];
45 T &operator() (
int i,
int j )
47 return fields_[ i * cols_ + j ];
61 struct AffineTransformation
63 Matrix< double > matrix;
64 std::vector< double > shift;
66 explicit AffineTransformation (
int dimworld )
67 : matrix( dimworld, dimworld ),
73 std::vector< AffineTransformation > transformations_;
76 PeriodicFaceTransformationBlock (
const PeriodicFaceTransformationBlock & );
80 PeriodicFaceTransformationBlock ( std::istream &in,
int dimworld );
82 const AffineTransformation &transformation (
int i )
const
84 assert( i < numTransformations() );
85 return transformations_[ i ];
88 int numTransformations ()
const
90 return transformations_.size();
94 void match (
char what );
103 inline std::ostream &
104 operator<< ( std::ostream &out,
const PeriodicFaceTransformationBlock::AffineTransformation &trafo )
106 for(
int i = 0; i < trafo.matrix.rows(); ++i )
108 out << (i > 0 ?
", " :
"");
109 for(
int j = 0; j < trafo.matrix.cols(); ++j )
110 out << (j > 0 ?
" " :
"") << trafo.matrix( i, j );
113 for(
unsigned int i = 0; i < trafo.shift.size(); ++i )
114 out <<
" " << trafo.shift[ i ];
Dune namespace.
Definition: alignedallocator.hh:13