dune-grid
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
grid
io
file
dgfparser
blocks
boundaryseg.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_BOUNDARYSEGBLOCK_HH
6
#define DUNE_DGF_BOUNDARYSEGBLOCK_HH
7
8
#include <cassert>
9
#include <iostream>
10
#include <string>
11
#include <vector>
12
#include <map>
13
14
#include <
dune/grid/io/file/dgfparser/parser.hh
>
15
#include <
dune/grid/io/file/dgfparser/blocks/basic.hh
>
16
17
18
namespace
Dune
19
{
20
21
namespace
dgf
22
{
23
class
BoundarySegBlock
24
:
public
BasicBlock
25
{
26
int
dimworld;
// the dimension of the vertices (is given from user)
27
bool
goodline;
// active line describes a vertex
28
std :: vector< unsigned int > p;
// active vertex
29
int
bndid;
30
typedef
DGFBoundaryParameter::type
BoundaryParameter;
31
BoundaryParameter parameter;
32
bool
simplexgrid;
33
34
public
:
35
typedef
DGFEntityKey< unsigned int>
EntityKey
;
36
typedef
std::pair < int, BoundaryParameter >
BndParam
;
37
38
// initialize vertex block and get first vertex
39
BoundarySegBlock
( std :: istream &in,
int
pnofvtx,
40
int
pdimworld,
bool
psimplexgrid );
41
42
// some information
43
int
get
( std :: map< EntityKey, BndParam > & facemap,
44
bool
fixedsize,
45
int
vtxoffset
46
);
47
48
bool
ok
()
49
{
50
return
goodline;
51
}
52
53
int
nofbound
()
54
{
55
return
noflines
();
56
}
57
58
private
:
59
bool
next();
60
61
// get coordinates of active vertex
62
int
operator[] (
int
i)
63
{
64
assert(
ok
());
65
assert(
linenumber
()>=0);
66
assert(0<=i && i<dimworld+1);
67
return
p[i];
68
}
69
70
int
size()
71
{
72
return
p.size();
73
}
74
75
};
76
77
}
// end namespace dgf
78
79
}
// end namespace Dune
80
81
#endif
basic.hh
parser.hh
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::BasicBlock::linenumber
int linenumber()
Definition
basic.hh:92
Dune::dgf::BoundarySegBlock::ok
bool ok()
Definition
boundaryseg.hh:48
Dune::dgf::BoundarySegBlock::get
int get(std ::map< EntityKey, BndParam > &facemap, bool fixedsize, int vtxoffset)
Definition
boundaryseg.cc:34
Dune::dgf::BoundarySegBlock::BndParam
std::pair< int, BoundaryParameter > BndParam
Definition
boundaryseg.hh:36
Dune::dgf::BoundarySegBlock::BoundarySegBlock
BoundarySegBlock(std ::istream &in, int pnofvtx, int pdimworld, bool psimplexgrid)
Definition
boundaryseg.cc:17
Dune::dgf::BoundarySegBlock::EntityKey
DGFEntityKey< unsigned int > EntityKey
Definition
boundaryseg.hh:35
Dune::dgf::BoundarySegBlock::nofbound
int nofbound()
Definition
boundaryseg.hh:53
Dune::DGFEntityKey
Definition
entitykey.hh:21
Dune::DGFBoundaryParameter::type
std::string type
type of additional boundary parameters
Definition
parser.hh:25
Generated by
1.17.0