Flow123d
release_3.0.0-973-g92f55e826
flow123d
src
mesh
boundaries.h
Go to the documentation of this file.
1
/*!
2
*
3
* Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4
*
5
* This program is free software; you can redistribute it and/or modify it under
6
* the terms of the GNU General Public License version 3 as published by the
7
* Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8
*
9
* This program is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
*
13
*
14
* @file boundaries.h
15
* @brief
16
*/
17
18
#ifndef BOUNDARIES_H
19
#define BOUNDARIES_H
20
21
#include "
mesh/edges.h
"
// for Edge
22
#include "
mesh/region.hh
"
// for Region
23
#include "
mesh/sides.h
"
// for SideIter
24
#include "
system/system.hh
"
// for MessageType::Err, xprintf
25
26
class
Element
;
27
class
Mesh
;
28
namespace
flow
{
template
<
class
T>
class
VectorId; }
29
template
<
int
spacedim>
class
ElementAccessor
;
30
31
32
33
/**
34
* Setting boundary conditions should have two staps.
35
* 1) Denote by numbers segments of mesh boundary. Possibly every side can be boundary.
36
* 2) Assign particular type and values of BC on every boundary segment.
37
*
38
* So in future Boundary should keep only side and segment and there should be
39
* one Boundary for every external side. Side is external either when it does not
40
* neighbor with another element or when it belongs to an segment.
41
*/
42
43
class
Element
;
44
45
//=============================================================================
46
// STRUCTURE OF THE BOUNDARY CONDITION
47
//=============================================================================
48
class
Boundary
49
{
50
public
:
51
/**
52
* temporary solution for old type BCD.
53
* Transport BCD refers through IDs to flow BCD, so we have to
54
* store positions of Flow BCD items somewhere.
55
*/
56
static
flow::VectorId<unsigned int>
id_to_bcd
;
57
58
Boundary
();
59
60
/**
61
* Can not make this inline now.
62
*/
63
Edge
*
edge
();
64
65
Element
*
element
();
66
67
Region
region
();
68
69
ElementAccessor<3>
element_accessor
();
70
71
72
inline
SideIter
side
() {
73
if
(
edge
()->n_sides != 1)
xprintf
(
Err
,
"Using side method for boundary, but there is boundary with multiple sides.\n"
);
74
return
edge
()->
side_
[0];
75
}
76
77
// Topology of the mesh
78
unsigned
int
edge_idx_
;
// more then one side can be at one boundary element
79
unsigned
int
bc_ele_idx_
;
// in near future this should replace Boundary itself, when we remove BC data members
80
Mesh
*
mesh_
;
81
82
};
83
#endif
84
//-----------------------------------------------------------------------------
85
// vim: set cindent:
Boundary::id_to_bcd
static flow::VectorId< unsigned int > id_to_bcd
Definition:
boundaries.h:56
Boundary
Definition:
boundaries.h:48
ElementAccessor
Definition:
fe_value_handler.hh:29
system.hh
Boundary::edge_idx_
unsigned int edge_idx_
Definition:
boundaries.h:78
flow
Definition:
output_msh.hh:24
Element
Definition:
elements.h:42
Region
Definition:
region.hh:146
xprintf
#define xprintf(...)
Definition:
system.hh:92
Edge::side_
SideIter * side_
Definition:
edges.h:37
Boundary::element_accessor
ElementAccessor< 3 > element_accessor()
Definition:
boundaries.cc:48
Boundary::side
SideIter side()
Definition:
boundaries.h:72
Boundary::element
Element * element()
Definition:
boundaries.cc:40
Err
@ Err
Definition:
system.hh:64
Mesh
Definition:
mesh.h:80
Edge
Definition:
edges.h:26
Boundary::mesh_
Mesh * mesh_
Definition:
boundaries.h:80
Boundary::edge
Edge * edge()
Definition:
boundaries.cc:44
flow::VectorId< unsigned int >
region.hh
edges.h
Boundary::Boundary
Boundary()
Definition:
boundaries.cc:29
sides.h
Boundary::region
Region region()
Definition:
boundaries.cc:35
SideIter
Definition:
sides.h:131
Boundary::bc_ele_idx_
unsigned int bc_ele_idx_
Definition:
boundaries.h:79
Generated by
1.8.17