Dune Core Modules (2.4.1)

simplex.hh
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
9#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
10
11namespace Dune
12{
13
14 namespace dgf
15 {
16 // SimplexBlock
17 // ------------
18
19 class SimplexBlock
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
Dune namespace.
Definition: alignment.hh:10
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 22, 23:33, 2024)