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