dune-grid  2.2.1
cube.hh
Go to the documentation of this file.
1 #ifndef DUNE_DGF_CUBEBLOCK_HH
2 #define DUNE_DGF_CUBEBLOCK_HH
3 
4 #include <cassert>
5 #include <iostream>
6 #include <vector>
7 
9 
10 
11 namespace Dune
12 {
13 
14  namespace dgf
15  {
16 
17  class CubeBlock
18  : public BasicBlock
19  {
20  unsigned int nofvtx;
21  int dimgrid;
22  bool goodline; // active line describes a vertex
23  std :: vector< unsigned int > map; // active vertex
24  int nofparams;
25  int vtxoffset;
26 
27  public:
28  CubeBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid );
29 
30  int get ( std :: vector< std :: vector< unsigned int> > &simplex,
31  std :: vector< std :: vector< double > > &params,
32  int &nofp );
33 
34  // some information
35  bool ok ()
36  {
37  return goodline;
38  }
39 
40  int nofsimplex ()
41  {
42  return noflines();
43  }
44 
45  private:
46  // get the dimension of the grid
47  int getDimGrid ();
48  // get next simplex
49  bool next ( std :: vector< unsigned int > &simplex,
50  std :: vector< double > &param );
51  };
52 
53  } // end namespace dgf
54 
55 } // end namespace Dune
56 
57 #endif
58