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
dynamicMesh
meshCut
meshModifiers
refinementIterator
refinementIterator.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::refinementIterator
26
27
Description
28
Utility class to do iterating meshCutter until all requests satisfied.
29
30
Needed since cell cutting can only cut cell once in one go so if
31
refinement pattern is not compatible on a cell by cell basis it will
32
refuse to cut.
33
34
Parallel: communicates. All decisions done on 'reduce'd variable.
35
36
SourceFiles
37
refinementIterator.C
38
39
\*---------------------------------------------------------------------------*/
40
41
#ifndef refinementIterator_H
42
#define refinementIterator_H
43
44
#include <
dynamicMesh/edgeVertex.H
>
45
#include <
OpenFOAM/labelList.H
>
46
#include <
OpenFOAM/Map.H
>
47
#include <
OpenFOAM/typeInfo.H
>
48
49
50
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52
namespace
Foam
53
{
54
55
// Forward declaration of classes
56
class
polyMesh;
57
class
refineCell;
58
class
undoableMeshCutter;
59
class
cellLooper;
60
61
/*---------------------------------------------------------------------------*\
62
Class refinementIterator Declaration
63
\*---------------------------------------------------------------------------*/
64
65
class
refinementIterator
66
:
67
public
edgeVertex
68
{
69
// Private data
70
71
//- Reference to mesh
72
polyMesh
& mesh_;
73
74
//- Reference to refinementEngine
75
undoableMeshCutter
& meshRefiner_;
76
77
//- Reference to object to walk individual cells
78
const
cellLooper
& cellWalker_;
79
80
//- Whether to write intermediate meshes
81
bool
writeMesh_;
82
83
84
public
:
85
86
//- Runtime type information
87
ClassName
(
"refinementIterator"
);
88
89
90
// Constructors
91
92
//- Construct from mesh, refinementEngine and cell walking routine.
93
// If writeMesh = true increments runTime and writes intermediate
94
// meshes.
95
refinementIterator
96
(
97
polyMesh
&
mesh
,
98
undoableMeshCutter
& meshRefiner,
99
const
cellLooper
& cellWalker,
100
const
bool
writeMesh =
false
101
);
102
103
104
// Destructor
105
106
~refinementIterator
();
107
108
109
// Member Functions
110
111
//- Try to refine cells in given direction. Constructs intermediate
112
// meshes. Returns map from old to added cells.
113
Map<label>
setRefinement
(
const
List<refineCell>
&);
114
115
};
116
117
118
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119
120
}
// End namespace Foam
121
122
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123
124
#endif
125
126
// ************************ vim: set sw=4 sts=4 et: ************************ //