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
autoMesh
autoHexMesh
autoHexMeshDriver
refinementParameters
refinementParameters.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::refinementParameters
26
27
Description
28
Simple container to keep together refinement specific information.
29
30
SourceFiles
31
refinementParameters.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef refinementParameters_H
36
#define refinementParameters_H
37
38
#include <
OpenFOAM/dictionary.H
>
39
#include <
OpenFOAM/pointField.H
>
40
#include <
OpenFOAM/Switch.H
>
41
42
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44
namespace
Foam
45
{
46
47
// Class forward declarations
48
class
polyMesh;
49
50
/*---------------------------------------------------------------------------*\
51
Class refinementParameters Declaration
52
\*---------------------------------------------------------------------------*/
53
54
class
refinementParameters
55
{
56
// Private data
57
58
//- Total number of cells
59
const
label maxGlobalCells_;
60
61
//- Per processor max number of cells
62
const
label maxLocalCells_;
63
64
//- When to stop refining
65
const
label minRefineCells_;
66
67
//- Curvature
68
scalar curvature_;
69
70
//- Number of layers between different refinement levels
71
const
label nBufferLayers_;
72
73
//- Areas to keep
74
const
pointField
keepPoints_;
75
76
//- FaceZone faces allowed which have owner and neighbour in same
77
// cellZone?
78
Switch
allowFreeStandingZoneFaces_;
79
80
//- Allowed load unbalance
81
scalar maxLoadUnbalance_;
82
83
84
// Private Member Functions
85
86
//- Disallow default bitwise copy construct
87
refinementParameters
(
const
refinementParameters
&);
88
89
//- Disallow default bitwise assignment
90
void
operator=(
const
refinementParameters
&);
91
92
93
public
:
94
95
// Constructors
96
97
//- Construct from dictionary - old syntax
98
refinementParameters
(
const
dictionary
& dict,
const
label dummy);
99
100
//- Construct from dictionary - new syntax
101
refinementParameters
(
const
dictionary
& dict);
102
103
104
// Member Functions
105
106
// Access
107
108
//- Total number of cells
109
label
maxGlobalCells
()
const
110
{
111
return
maxGlobalCells_;
112
}
113
114
//- Per processor max number of cells
115
label
maxLocalCells
()
const
116
{
117
return
maxLocalCells_;
118
}
119
120
//- When to stop refining
121
label
minRefineCells
()
const
122
{
123
return
minRefineCells_;
124
}
125
126
//- Curvature
127
scalar
curvature
()
const
128
{
129
return
curvature_;
130
}
131
132
//- Number of layers between different refinement levels
133
label
nBufferLayers
()
const
134
{
135
return
nBufferLayers_;
136
}
137
138
//- Areas to keep
139
const
pointField
&
keepPoints
()
const
140
{
141
return
keepPoints_;
142
}
143
144
//- Are zone faces allowed only inbetween different cell zones
145
// or also just free standing?
146
bool
allowFreeStandingZoneFaces
()
const
147
{
148
return
allowFreeStandingZoneFaces_;
149
}
150
151
//- Allowed load unbalance
152
scalar
maxLoadUnbalance
()
const
153
{
154
return
maxLoadUnbalance_;
155
}
156
157
158
// Other
159
160
//- Checks that cells are in mesh. Returns cells they are in.
161
labelList
findCells
(
const
polyMesh
&)
const
;
162
163
};
164
165
166
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167
168
}
// End namespace Foam
169
170
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171
172
#endif
173
174
// ************************ vim: set sw=4 sts=4 et: ************************ //