dune-grid
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
grid
io
file
dgfparser
blocks
simplex.hh
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright © 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
11
#include <
dune/grid/io/file/dgfparser/blocks/basic.hh
>
12
13
namespace
Dune
14
{
15
16
namespace
dgf
17
{
18
// SimplexBlock
19
// ------------
20
21
class
SimplexBlock
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 > > ¶ms,
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 > > ¶ms );
42
43
// some information
44
bool
ok
()
45
{
46
return
goodline;
47
}
48
49
int
nofsimplex
()
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 > ¶m );
60
};
61
62
}
// end namespace dgf
63
64
}
// end namespace Dune
65
66
#endif
basic.hh
Dune::GridView::elements
IteratorRange<... > elements(const GV &gv)
Iterates over all elements / cells (entities with codimension 0) of a GridView.
Dune
Include standard header files.
Definition
agrid.hh:60
Dune::dgf
Definition
basic.cc:12
Dune::dgf::BasicBlock::BasicBlock
BasicBlock(std::istream &in, const char *id)
Definition
basic.cc:17
Dune::dgf::BasicBlock::noflines
int & noflines()
Definition
basic.hh:87
Dune::dgf::SimplexBlock::cube2simplex
static int cube2simplex(std ::vector< std ::vector< double > > &vtx, std ::vector< std ::vector< unsigned int > > &elements, std ::vector< std ::vector< double > > ¶ms)
Definition
simplex.cc:145
Dune::dgf::SimplexBlock::get
int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< std ::vector< double > > ¶ms, int &nofp)
Definition
simplex.cc:68
Dune::dgf::SimplexBlock::SimplexBlock
SimplexBlock(std ::istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid)
Definition
simplex.cc:18
Dune::dgf::SimplexBlock::nofsimplex
int nofsimplex()
Definition
simplex.hh:49
Dune::dgf::SimplexBlock::ok
bool ok()
Definition
simplex.hh:44
Generated by
1.17.0