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
fvMeshLduAddressing.H
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
Class
25
Foam::fvMeshLduAddressing
26
27
Description
28
Foam::fvMeshLduAddressing
29
30
SourceFiles
31
fvMeshLduAddressing.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef fvMeshLduAddressing_H
36
#define fvMeshLduAddressing_H
37
38
#include <
OpenFOAM/lduAddressing.H
>
39
#include "
fvMesh.H
"
40
41
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42
43
namespace
Foam
44
{
45
46
/*---------------------------------------------------------------------------*\
47
Class fvMeshLduAddressing Declaration
48
\*---------------------------------------------------------------------------*/
49
50
class
fvMeshLduAddressing
51
:
52
public
lduAddressing
53
{
54
// Private data
55
56
//- Lower as a subList of allOwner
57
labelList::subList
lowerAddr_;
58
59
//- Upper as a reference to neighbour
60
const
labelList
& upperAddr_;
61
62
//- Patch addressing as a list of sublists
63
List<const unallocLabelList*>
patchAddr_;
64
65
//- Patch field evaluation schedule
66
const
lduSchedule
& patchSchedule_;
67
68
69
// Private Member Functions
70
71
//- Disallow default bitwise copy construct
72
fvMeshLduAddressing
(
const
fvMeshLduAddressing
&);
73
74
//- Disallow default bitwise assignment
75
void
operator=(
const
fvMeshLduAddressing
&);
76
77
78
public
:
79
80
// Constructors
81
82
//- Construct from components
83
fvMeshLduAddressing
(
const
fvMesh
&
mesh
)
84
:
85
lduAddressing
(mesh.nCells()),
86
lowerAddr_
87
(
88
labelList
::subList
89
(
90
mesh.faceOwner(),
91
mesh.nInternalFaces()
92
)
93
),
94
upperAddr_(mesh.faceNeighbour()),
95
patchAddr_(mesh.
boundary
().
size
()),
96
patchSchedule_(mesh.globalData().
patchSchedule
())
97
{
98
forAll
(mesh.
boundary
(), patchI)
99
{
100
patchAddr_[patchI] = &mesh.
boundary
()[patchI].faceCells();
101
}
102
}
103
104
105
// Destructor
106
107
~fvMeshLduAddressing
()
108
{}
109
110
111
// Member Functions
112
113
//- Return lower addressing (i.e. lower label = upper triangle)
114
const
unallocLabelList
&
lowerAddr
()
const
115
{
116
return
lowerAddr_;
117
}
118
119
//- Return upper addressing (i.e. upper label)
120
const
unallocLabelList
&
upperAddr
()
const
121
{
122
return
upperAddr_;
123
}
124
125
//- Return patch addressing
126
const
unallocLabelList
&
patchAddr
(
const
label i)
const
127
{
128
return
*patchAddr_[i];
129
}
130
131
// Return patch field evaluation schedule
132
const
lduSchedule
&
patchSchedule
()
const
133
{
134
return
patchSchedule_;
135
}
136
};
137
138
139
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141
}
// End namespace Foam
142
143
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144
145
#endif
146
147
// ************************ vim: set sw=4 sts=4 et: ************************ //