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