Dune Core Modules (2.4.1)

boundaryseg.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_BOUNDARYSEGBLOCK_HH
4#define DUNE_DGF_BOUNDARYSEGBLOCK_HH
5
6#include <cassert>
7#include <iostream>
8#include <string>
9#include <vector>
10#include <map>
11
12#include <dune/grid/io/file/dgfparser/parser.hh>
13#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
14
15
16namespace Dune
17{
18
19 namespace dgf
20 {
21 class BoundarySegBlock
22 : public BasicBlock
23 {
24 int dimworld; // the dimension of the vertices (is given from user)
25 bool goodline; // active line describes a vertex
26 std :: vector< unsigned int > p; // active vertex
27 int bndid;
28 typedef DGFBoundaryParameter::type BoundaryParameter;
29 BoundaryParameter parameter;
30 bool simplexgrid;
31
32 public:
33 typedef DGFEntityKey< unsigned int> EntityKey;
34 typedef std::pair < int, BoundaryParameter > BndParam;
35
36 // initialize vertex block and get first vertex
37 BoundarySegBlock ( std :: istream &in, int pnofvtx,
38 int pdimworld, bool psimplexgrid );
39
40 // some information
41 int get( std :: map< EntityKey, BndParam > & facemap,
42 bool fixedsize,
43 int vtxoffset
44 );
45
46 bool ok()
47 {
48 return goodline;
49 }
50
51 int nofbound()
52 {
53 return noflines();
54 }
55
56 private:
57 bool next();
58
59 // get coordinates of active vertex
60 int operator[] (int i)
61 {
62 assert(ok());
63 assert(linenumber()>=0);
64 assert(0<=i && i<dimworld+1);
65 return p[i];
66 }
67
68 int size()
69 {
70 return p.size();
71 }
72
73 };
74
75 } // end namespace dgf
76
77} // end namespace Dune
78
79#endif
Dune namespace.
Definition: alignment.hh:10
std::string type
type of additional boundary parameters
Definition: parser.hh:23
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 22, 23:33, 2024)