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
applications
utilities
mesh
generation
blockMesh
block.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::block
26
27
Description
28
creates a single block of cells from point coordinates,
29
numbers of cells in each direction and expansion ratio
30
31
SourceFiles
32
block.C
33
34
\*---------------------------------------------------------------------------*/
35
36
#ifndef block_H
37
#define block_H
38
39
#include <
OpenFOAM/pointField.H
>
40
#include <
OpenFOAM/labelList.H
>
41
42
#include "
blockDescriptor.H
"
43
44
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46
namespace
Foam
47
{
48
49
class
Istream;
50
class
Ostream;
51
52
/*---------------------------------------------------------------------------*\
53
Class block Declaration
54
\*---------------------------------------------------------------------------*/
55
56
class
block
57
{
58
// Private data
59
60
//- block definition
61
blockDescriptor blockDef_;
62
63
//- list of vertices
64
pointField
vertices_;
65
66
//- list of cells
67
labelListList
cells_;
68
69
//- boundary patches
70
labelListListList
boundaryPatches_;
71
72
73
// private member functions
74
75
label vtxLabel(label i, label j, label
k
);
76
77
void
blockPoints();
78
79
void
blockCells();
80
81
void
blockBoundary();
82
83
84
public
:
85
86
// Constructors
87
88
//- Construct from the block definition
89
block
(
const
blockDescriptor&);
90
91
//- Clone
92
autoPtr<block>
clone
()
const
93
{
94
notImplemented
(
"block::clone()"
);
95
return
autoPtr<block>
(NULL);
96
}
97
98
99
// Member Functions
100
101
// Access
102
103
const
blockDescriptor
&
blockDef
()
const
;
104
const
pointField
&
points
()
const
;
105
const
labelListList
&
cells
()
const
;
106
const
labelListListList
&
boundaryPatches
()
const
;
107
108
109
// Ostream Operator
110
111
friend
Ostream
&
operator<<
(
Ostream
&,
const
block
&);
112
};
113
114
115
inline
Istream&
operator>>
(Istream& is, block*)
116
{
117
notImplemented
(
"Istream& operator>>(Istream& is, block*)"
);
118
return
is;
119
}
120
121
122
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123
124
}
// End namespace Foam
125
126
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127
128
#endif
129
130
// ************************ vim: set sw=4 sts=4 et: ************************ //