dune-grid
2.2.0
|
00001 #ifndef DUNE_DGF_VERTEXBLOCK_HH 00002 #define DUNE_DGF_VERTEXBLOCK_HH 00003 00004 #include <iostream> 00005 #include <vector> 00006 00007 #include <dune/grid/io/file/dgfparser/blocks/basic.hh> 00008 00009 namespace Dune 00010 { 00011 00012 namespace dgf 00013 { 00014 00015 class VertexBlock 00016 : public BasicBlock 00017 { 00018 int dimvertex; // the dimension of the vertices (determined from DGF file) 00019 int dimworld; // the dimension of the world (either dimvertex or given by user) 00020 bool goodline; // active line describes a vertex 00021 int vtxoffset; 00022 int nofParam; 00023 00024 public: 00025 // initialize vertex block 00026 VertexBlock ( std :: istream &in, int &pdimworld ); 00027 00028 int get ( std :: vector< std :: vector< double > > &vtx, 00029 std :: vector< std :: vector< double > > ¶m, 00030 int &nofp ); 00031 00032 // some information 00033 bool ok () const 00034 { 00035 return goodline; 00036 } 00037 00038 int offset () const 00039 { 00040 return vtxoffset; 00041 } 00042 00043 private: 00044 // get dimworld 00045 int getDimWorld (); 00046 00047 // get next vertex 00048 bool next ( std :: vector< double > &point, std :: vector< double > ¶m ); 00049 }; 00050 00051 } // end namespace dgf 00052 00053 } // end namespace Dune 00054 00055 #endif 00056