dune-grid
2.2.0
|
00001 #ifndef DUNE_DGF_CUBEBLOCK_HH 00002 #define DUNE_DGF_CUBEBLOCK_HH 00003 00004 #include <cassert> 00005 #include <iostream> 00006 #include <vector> 00007 00008 #include <dune/grid/io/file/dgfparser/blocks/basic.hh> 00009 00010 00011 namespace Dune 00012 { 00013 00014 namespace dgf 00015 { 00016 00017 class CubeBlock 00018 : public BasicBlock 00019 { 00020 unsigned int nofvtx; 00021 int dimgrid; 00022 bool goodline; // active line describes a vertex 00023 std :: vector< unsigned int > map; // active vertex 00024 int nofparams; 00025 int vtxoffset; 00026 00027 public: 00028 CubeBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid ); 00029 00030 int get ( std :: vector< std :: vector< unsigned int> > &simplex, 00031 std :: vector< std :: vector< double > > ¶ms, 00032 int &nofp ); 00033 00034 // some information 00035 bool ok () 00036 { 00037 return goodline; 00038 } 00039 00040 int nofsimplex () 00041 { 00042 return noflines(); 00043 } 00044 00045 private: 00046 // get the dimension of the grid 00047 int getDimGrid (); 00048 // get next simplex 00049 bool next ( std :: vector< unsigned int > &simplex, 00050 std :: vector< double > ¶m ); 00051 }; 00052 00053 } // end namespace dgf 00054 00055 } // end namespace Dune 00056 00057 #endif 00058