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
29 struct AffineTransformation;
32 std::vector< AffineTransformation > transformations_;
35 PeriodicFaceTransformationBlock (
const PeriodicFaceTransformationBlock & );
39 PeriodicFaceTransformationBlock ( std::istream &in,
int dimworld );
41 const AffineTransformation &transformation (
int i )
const
43 assert( i < numTransformations() );
44 return transformations_[ i ];
47 int numTransformations ()
const
49 return transformations_.size();
53 void match (
char what );
61 class PeriodicFaceTransformationBlock::Matrix
65 std::vector< T > fields_;
68 Matrix (
int rows,
int cols )
71 fields_( rows * cols )
74 const T &operator() (
int i,
int j )
const
76 return fields_[ i * cols_ + j ];
79 T &operator() (
int i,
int j )
81 return fields_[ i * cols_ + j ];
99 struct PeriodicFaceTransformationBlock::AffineTransformation
102 std::vector< double > shift;
104 explicit AffineTransformation (
int dimworld )
105 : matrix( dimworld, dimworld ),
111 inline std::ostream &
112 operator<< ( std::ostream &out,
const PeriodicFaceTransformationBlock::AffineTransformation &trafo )
114 for(
int i = 0; i < trafo.matrix.rows(); ++i )
116 out << (i > 0 ?
", " :
"");
117 for(
int j = 0; j < trafo.matrix.cols(); ++j )
118 out << (j > 0 ?
" " :
"") << trafo.matrix( i, j );
121 for(
unsigned int i = 0; i < trafo.shift.size(); ++i )
122 out <<
" " << trafo.shift[ i ];
Dune namespace.
Definition: alignedallocator.hh:13