dune-grid  2.7.1
simplex.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_SIMPLEXBLOCK_HH
4 #define DUNE_DGF_SIMPLEXBLOCK_HH
5 
6 #include <iostream>
7 #include <vector>
8 
10 
11 namespace Dune
12 {
13 
14  namespace dgf
15  {
16  // SimplexBlock
17  // ------------
18 
20  : public BasicBlock
21  {
22  unsigned int nofvtx;
23  int vtxoffset;
24  int dimgrid;
25  bool goodline; // active line describes a vertex
26  int nofparams; // nof parameters
27 
28  public:
29  SimplexBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid );
30 
31  int get ( std :: vector< std :: vector< unsigned int > > &simplex,
32  std :: vector< std :: vector< double > > &params,
33  int &nofp );
34 
35  // cubes -> simplex
36  static int
37  cube2simplex ( std :: vector< std :: vector< double > > &vtx,
38  std :: vector< std :: vector< unsigned int > > &elements,
39  std :: vector< std :: vector< double > > &params );
40 
41  // some information
42  bool ok ()
43  {
44  return goodline;
45  }
46 
47  int nofsimplex ()
48  {
49  return noflines();
50  }
51 
52  private:
53  // get the dimension of the grid
54  int getDimGrid ();
55  // get next simplex
56  bool next ( std :: vector< unsigned int > &simplex,
57  std :: vector< double > &param );
58  };
59 
60  } // end namespace dgf
61 
62 } // end namespace Dune
63 
64 #endif
Include standard header files.
Definition: agrid.hh:59
Definition: basic.hh:29
int & noflines()
Definition: basic.hh:85
Definition: simplex.hh:21
static int cube2simplex(std ::vector< std ::vector< double > > &vtx, std ::vector< std ::vector< unsigned int > > &elements, std ::vector< std ::vector< double > > &params)
Definition: simplex.cc:144
int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< std ::vector< double > > &params, int &nofp)
Definition: simplex.cc:67
SimplexBlock(std ::istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid)
Definition: simplex.cc:17
int nofsimplex()
Definition: simplex.hh:47
bool ok()
Definition: simplex.hh:42