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