dune-grid 3.0-git
boundaryseg.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_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
14
15
16namespace Dune
17{
18
19 namespace dgf
20 {
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:
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
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
Include standard header files.
Definition agrid.hh:60
Definition basic.hh:29
int & noflines()
Definition basic.hh:85
int linenumber()
Definition basic.hh:90
Definition boundaryseg.hh:23
bool ok()
Definition boundaryseg.hh:46
int get(std ::map< EntityKey, BndParam > &facemap, bool fixedsize, int vtxoffset)
Definition boundaryseg.cc:33
std::pair< int, BoundaryParameter > BndParam
Definition boundaryseg.hh:34
DGFEntityKey< unsigned int > EntityKey
Definition boundaryseg.hh:33
int nofbound()
Definition boundaryseg.hh:51
Definition entitykey.hh:19
std::string type
type of additional boundary parameters
Definition parser.hh:23