3#ifndef DUNE_DGF_PERIODICFACETRANSBLOCK_HH
4#define DUNE_DGF_PERIODICFACETRANSBLOCK_HH
9#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
21 struct PeriodicFaceTransformationBlock
27 struct AffineTransformation;
30 std::vector< AffineTransformation > transformations_;
33 PeriodicFaceTransformationBlock (
const PeriodicFaceTransformationBlock & );
37 PeriodicFaceTransformationBlock ( std::istream &in,
int dimworld );
39 const AffineTransformation &transformation (
int i )
const
41 assert( i < numTransformations() );
42 return transformations_[ i ];
45 int numTransformations ()
const
47 return transformations_.size();
51 void match (
char what );
59 class PeriodicFaceTransformationBlock::Matrix
63 std::vector< T > fields_;
66 Matrix (
int rows,
int cols )
69 fields_( rows * cols )
72 const T &operator() (
int i,
int j )
const
74 return fields_[ i * cols_ + j ];
77 T &operator() (
int i,
int j )
79 return fields_[ i * cols_ + j ];
97 struct PeriodicFaceTransformationBlock::AffineTransformation
100 std::vector< double > shift;
102 explicit AffineTransformation (
int dimworld )
103 : matrix( dimworld, dimworld ),
109 inline std::ostream &
110 operator<< ( std::ostream &out,
const PeriodicFaceTransformationBlock::AffineTransformation &trafo )
112 for(
int i = 0; i < trafo.matrix.rows(); ++i )
114 out << (i > 0 ?
", " :
"");
115 for(
int j = 0; j < trafo.matrix.cols(); ++j )
116 out << (j > 0 ?
" " :
"") << trafo.matrix( i, j );
119 for(
unsigned int i = 0; i < trafo.shift.size(); ++i )
120 out <<
" " << trafo.shift[ i ];
Dune namespace.
Definition: alignment.hh:11