Flow123d
release_2.2.0-41-g0958a8d
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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/mesh.h"
22
#include "
mesh/mesh_types.hh
"
23
#include "
mesh/sides.h
"
24
#include "
mesh/edges.h
"
25
#include "
mesh/region.hh
"
26
#include "
system/sys_vector.hh
"
27
28
29
30
/**
31
* Setting boundary conditions should have two staps.
32
* 1) Denote by numbers segments of mesh boundary. Possibly every side can be boundary.
33
* 2) Assign particular type and values of BC on every boundary segment.
34
*
35
* So in future Boundary should keep only side and segment and there should be
36
* one Boundary for every external side. Side is external either when it does not
37
* neighbor with another element or when it belongs to an segment.
38
*/
39
40
class
Element
;
41
42
//=============================================================================
43
// STRUCTURE OF THE BOUNDARY CONDITION
44
//=============================================================================
45
class
Boundary
46
{
47
public
:
48
/**
49
* temporary solution for old type BCD.
50
* Transport BCD refers through IDs to flow BCD, so we have to
51
* store positions of Flow BCD items somewhere.
52
*/
53
static
flow::VectorId<unsigned int>
id_to_bcd
;
54
55
Boundary
();
56
57
/**
58
* Can not make this inline now.
59
*/
60
Edge
*
edge
();
61
62
Element
*
element
();
63
64
Region
region
();
65
66
ElementAccessor<3>
element_accessor
();
67
68
69
inline
SideIter
side
() {
70
if
(
edge
()->n_sides != 1)
xprintf
(
Err
,
"Using side method for boundary, but there is boundary with multiple sides.\n"
);
71
return
edge
()->
side_
[0];
72
}
73
74
// Topology of the mesh
75
unsigned
int
edge_idx_
;
// more then one side can be at one boundary element
76
unsigned
int
bc_ele_idx_
;
// in near future this should replace Boundary itself, when we remove BC data members
77
Mesh
*
mesh_
;
78
79
};
80
#endif
81
//-----------------------------------------------------------------------------
82
// vim: set cindent:
flow::VectorId< unsigned int >
ElementAccessor
Definition:
output_element.hh:25
Mesh
Definition:
mesh.h:97
Edge
Definition:
edges.h:26
Boundary::region
Region region()
Definition:
boundaries.cc:34
Region
Definition:
region.hh:145
Boundary
Definition:
boundaries.h:45
Boundary::side
SideIter side()
Definition:
boundaries.h:69
Boundary::Boundary
Boundary()
Definition:
boundaries.cc:28
SideIter
Definition:
sides.h:117
Boundary::edge
Edge * edge()
Definition:
boundaries.cc:43
xprintf
#define xprintf(...)
Definition:
system.hh:92
Boundary::element
Element * element()
Definition:
boundaries.cc:39
Element
Definition:
elements.h:39
Boundary::edge_idx_
unsigned int edge_idx_
Definition:
boundaries.h:75
Boundary::bc_ele_idx_
unsigned int bc_ele_idx_
Definition:
boundaries.h:76
edges.h
region.hh
sides.h
sys_vector.hh
Vector classes to support both Iterator, index and Id access and creating co-located vectors...
Err
Definition:
system.hh:64
Boundary::mesh_
Mesh * mesh_
Definition:
boundaries.h:77
Edge::side_
SideIter * side_
Definition:
edges.h:37
mesh_types.hh
Boundary::element_accessor
ElementAccessor< 3 > element_accessor()
Definition:
boundaries.cc:47
Boundary::id_to_bcd
static flow::VectorId< unsigned int > id_to_bcd
Definition:
boundaries.h:53
Generated by
1.8.11