Dune Core Modules (2.8.0)

general.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_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
4#define DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
5
6#include <iostream>
7#include <vector>
8
9#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
10
11
12namespace Dune
13{
14
15 namespace dgf
16 {
17
18 // GeneralBlock
19 // ---------
20
21 class GeneralBlock
22 : public BasicBlock
23 {
24 unsigned int nofvtx;
25 int dimgrid;
26 bool goodline; // active line describes a vertex
27 std :: vector< unsigned int > map; // active vertex
28 int nofparams;
29 int vtxoffset;
30
31 public:
32 GeneralBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid );
33
34 int get ( std :: vector< std :: vector< unsigned int> > &simplex,
35 std :: vector< std :: vector< double > > &params,
36 int &nofp );
37
38 // some information
39 bool ok ()
40 {
41 return goodline;
42 }
43
44 int nofsimplex ()
45 {
46 return noflines();
47 }
48
49 private:
50 // get the dimension of the grid
51 int getDimGrid ();
52 // get next simplex
53 bool next ( std :: vector< unsigned int > &simplex,
54 std :: vector< double > &param );
55 };
56
57 } // end namespace dgf
58
59} // end namespace Dune
60
61#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition: type.hh:461
Dune namespace.
Definition: alignedallocator.hh:11
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)