dune-grid 2.9.0
general.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_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
6#define DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
7
8#include <iostream>
9#include <vector>
10
12
13
14namespace Dune
15{
16
17 namespace dgf
18 {
19
20 // GeneralBlock
21 // ---------
22
24 : public BasicBlock
25 {
26 unsigned int nofvtx;
27 int dimgrid;
28 bool goodline; // active line describes a vertex
29 std :: vector< unsigned int > map; // active vertex
30 int nofparams;
31 int vtxoffset;
32
33 public:
34 GeneralBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid );
35
36 int get ( std :: vector< std :: vector< unsigned int> > &simplex,
37 std :: vector< std :: vector< double > > &params,
38 int &nofp );
39
40 // some information
41 bool ok ()
42 {
43 return goodline;
44 }
45
47 {
48 return noflines();
49 }
50
51 private:
52 // get the dimension of the grid
53 int getDimGrid ();
54 // get next simplex
55 bool next ( std :: vector< unsigned int > &simplex,
56 std :: vector< double > &param );
57 };
58
59 } // end namespace dgf
60
61} // end namespace Dune
62
63#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
Include standard header files.
Definition: agrid.hh:60
Definition: basic.hh:31
int & noflines()
Definition: basic.hh:87
Definition: general.hh:25
GeneralBlock(std ::istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid)
Definition: general.cc:19
int nofsimplex()
Definition: general.hh:46
int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< std ::vector< double > > &params, int &nofp)
Definition: general.cc:101
bool ok()
Definition: general.hh:41