dune-grid  2.2.0
vertex.hh
Go to the documentation of this file.
1 #ifndef DUNE_DGF_VERTEXBLOCK_HH
2 #define DUNE_DGF_VERTEXBLOCK_HH
3 
4 #include <iostream>
5 #include <vector>
6 
8 
9 namespace Dune
10 {
11 
12  namespace dgf
13  {
14 
16  : public BasicBlock
17  {
18  int dimvertex; // the dimension of the vertices (determined from DGF file)
19  int dimworld; // the dimension of the world (either dimvertex or given by user)
20  bool goodline; // active line describes a vertex
21  int vtxoffset;
22  int nofParam;
23 
24  public:
25  // initialize vertex block
26  VertexBlock ( std :: istream &in, int &pdimworld );
27 
28  int get ( std :: vector< std :: vector< double > > &vtx,
29  std :: vector< std :: vector< double > > &param,
30  int &nofp );
31 
32  // some information
33  bool ok () const
34  {
35  return goodline;
36  }
37 
38  int offset () const
39  {
40  return vtxoffset;
41  }
42 
43  private:
44  // get dimworld
45  int getDimWorld ();
46 
47  // get next vertex
48  bool next ( std :: vector< double > &point, std :: vector< double > &param );
49  };
50 
51  } // end namespace dgf
52 
53 } // end namespace Dune
54 
55 #endif
56