dune-grid  2.4.1-rc2
cube.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 #ifndef DUNE_DGF_CUBEBLOCK_HH
4 #define DUNE_DGF_CUBEBLOCK_HH
5 
6 #include <cassert>
7 #include <iostream>
8 #include <vector>
9 
11 
12 
13 namespace Dune
14 {
15 
16  namespace dgf
17  {
18 
19  class CubeBlock
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  CubeBlock ( 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 
55  } // end namespace dgf
56 
57 } // end namespace Dune
58 
59 #endif
bool ok()
Definition: cube.hh:37
CubeBlock(std::istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid)
Definition: cube.cc:17
int nofsimplex()
Definition: cube.hh:42
Definition: alugrid/common/declaration.hh:18
Include standard header files.
Definition: agrid.hh:59
int & noflines()
Definition: basic.hh:85
Definition: cube.hh:19
Definition: basic.hh:28