Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
finiteVolume
fvMesh
fvBoundaryMesh
fvBoundaryMesh.C
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
11
OpenFOAM is free software: you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
\*---------------------------------------------------------------------------*/
25
26
#include <
finiteVolume/fvMesh.H
>
27
#include "
fvBoundaryMesh.H
"
28
29
30
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31
32
namespace
Foam
33
{
34
35
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
36
37
void
fvBoundaryMesh::addPatches(
const
polyBoundaryMesh& basicBdry)
38
{
39
setSize
(basicBdry.size());
40
41
// Set boundary patches
42
fvPatchList
& Patches = *
this
;
43
44
forAll
(Patches, patchI)
45
{
46
Patches.set(patchI,
fvPatch::New
(basicBdry[patchI], *
this
));
47
}
48
}
49
50
51
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
52
53
fvBoundaryMesh::fvBoundaryMesh
54
(
55
const
fvMesh
& m
56
)
57
:
58
fvPatchList
(0),
59
mesh_(m)
60
{}
61
62
63
fvBoundaryMesh::fvBoundaryMesh
64
(
65
const
fvMesh
& m,
66
const
polyBoundaryMesh
& basicBdry
67
)
68
:
69
fvPatchList
(basicBdry.
size
()),
70
mesh_(m)
71
{
72
addPatches(basicBdry);
73
}
74
75
76
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
77
78
void
fvBoundaryMesh::movePoints
()
79
{
80
forAll
(*
this
,
patchi
)
81
{
82
operator[]
(
patchi
).initMovePoints();
83
}
84
85
forAll
(*
this
,
patchi
)
86
{
87
operator[]
(
patchi
).movePoints();
88
}
89
}
90
91
92
lduInterfacePtrsList
fvBoundaryMesh::interfaces
()
const
93
{
94
lduInterfacePtrsList
interfaces
(
size
());
95
96
forAll
(interfaces,
patchi
)
97
{
98
if
(isA<lduInterface>(this->
operator
[](
patchi
)))
99
{
100
interfaces.
set
101
(
102
patchi
,
103
&refCast<const lduInterface>(this->
operator
[](
patchi
))
104
);
105
}
106
}
107
108
return
interfaces
;
109
}
110
111
112
void
fvBoundaryMesh::readUpdate
(
const
polyBoundaryMesh
& basicBdry)
113
{
114
clear
();
115
addPatches(basicBdry);
116
}
117
118
119
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120
121
}
// End namespace Foam
122
123
// ************************ vim: set sw=4 sts=4 et: ************************ //