Dune Core Modules (2.9.1)

general.hh
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
11#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
12
13
14namespace Dune
15{
16
17 namespace dgf
18 {
19
20 // GeneralBlock
21 // ---------
22
23 class GeneralBlock
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
46 int nofsimplex ()
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
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition: type.hh:464
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)