dune-grid  2.9.0
vertex.hh
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
2 // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 // vi: set et ts=4 sw=2 sts=2:
5 #ifndef DUNE_DGF_VERTEXBLOCK_HH
6 #define DUNE_DGF_VERTEXBLOCK_HH
7 
8 #include <iostream>
9 #include <vector>
10 
12 
13 namespace Dune
14 {
15 
16  namespace dgf
17  {
18 
20  : public BasicBlock
21  {
22  int dimvertex; // the dimension of the vertices (determined from DGF file)
23  int dimworld; // the dimension of the world (either dimvertex or given by user)
24  bool goodline; // active line describes a vertex
25  int vtxoffset;
26  int nofParam;
27 
28  public:
29  // initialize vertex block
30  VertexBlock ( std :: istream &in, int &pdimworld );
31 
32  int get ( std :: vector< std :: vector< double > > &vtx,
33  std :: vector< std :: vector< double > > &param,
34  int &nofp );
35 
36  // some information
37  bool ok () const
38  {
39  return goodline;
40  }
41 
42  int offset () const
43  {
44  return vtxoffset;
45  }
46 
47  private:
48  // get dimworld
49  int getDimWorld ();
50 
51  // get next vertex
52  bool next ( std :: vector< double > &point, std :: vector< double > &param );
53  };
54 
55  } // end namespace dgf
56 
57 } // end namespace Dune
58 
59 #endif
Include standard header files.
Definition: agrid.hh:60
Definition: basic.hh:31
Definition: vertex.hh:21
int get(std ::vector< std ::vector< double > > &vtx, std ::vector< std ::vector< double > > &param, int &nofp)
Definition: vertex.cc:63
int offset() const
Definition: vertex.hh:42
VertexBlock(std ::istream &in, int &pdimworld)
Definition: vertex.cc:18
bool ok() const
Definition: vertex.hh:37