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
setUpdater
setUpdater.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 "
setUpdater.H
"
27
#include <
dynamicMesh/polyTopoChanger.H
>
28
#include <
dynamicMesh/polyTopoChange.H
>
29
#include <
OpenFOAM/addToRunTimeSelectionTable.H
>
30
#include <
OpenFOAM/mapPolyMesh.H
>
31
#include <
meshTools/cellSet.H
>
32
#include <
meshTools/faceSet.H
>
33
#include <
meshTools/pointSet.H
>
34
35
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
36
37
namespace
Foam
38
{
39
defineTypeNameAndDebug
(setUpdater, 0);
40
addToRunTimeSelectionTable
41
(
42
polyMeshModifier,
43
setUpdater,
44
dictionary
45
);
46
}
47
48
49
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
50
51
52
53
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
54
55
// Construct from dictionary
56
Foam::setUpdater::setUpdater
57
(
58
const
word
&
name
,
59
const
dictionary
& dict,
60
const
label index,
61
const
polyTopoChanger
& mme
62
)
63
:
64
polyMeshModifier
(name, index, mme,
Switch
(dict.
lookup
(
"active"
)))
65
{}
66
67
68
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
69
70
Foam::setUpdater::~setUpdater
()
71
{}
72
73
74
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
75
76
bool
Foam::setUpdater::changeTopology
()
const
77
{
78
// I am never cause of changeTopo
79
return
false
;
80
}
81
82
83
void
Foam::setUpdater::setRefinement
(
polyTopoChange
&)
const
84
{}
85
86
87
void
Foam::setUpdater::modifyMotionPoints
(
pointField
&)
const
88
{}
89
90
91
void
Foam::setUpdater::updateMesh
(
const
mapPolyMesh
& morphMap)
92
{
93
// Mesh has changed topologically. Update all sets.
94
if
(debug)
95
{
96
Pout
<<
"setUpdater::updateMesh(const mapPolyMesh& morphMap)"
97
<<
endl
;
98
}
99
100
updateSets<cellSet>(morphMap);
101
updateSets<faceSet>(morphMap);
102
updateSets<pointSet>(morphMap);
103
}
104
105
106
void
Foam::setUpdater::write
(
Ostream
& os)
const
107
{
108
os <<
nl
<<
type
() <<
nl
;
109
}
110
111
112
void
Foam::setUpdater::writeDict
(
Ostream
& os)
const
113
{
114
os <<
nl
<<
name
() <<
nl
<<
token::BEGIN_BLOCK
<<
nl
115
<<
" type "
<<
type
()
116
<<
token::END_STATEMENT
<<
nl
117
<<
" active "
<< active()
118
<<
token::END_STATEMENT
<<
nl
119
<<
token::END_BLOCK
<<
endl
;
120
}
121
122
123
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
124
125
126
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
127
128
129
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
130
131
132
// ************************ vim: set sw=4 sts=4 et: ************************ //