setUpdater.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::setUpdater
29
30Description
31 Keeps cell/face/vertex sets uptodate. Both the ones loaded and the ones
32 on disk.
33
34SourceFiles
35 setUpdater.C
36 setUpdaterTemplates.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef setUpdater_H
41#define setUpdater_H
42
43#include "polyMeshModifier.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class setUpdater Declaration
52\*---------------------------------------------------------------------------*/
54class setUpdater
55:
56 public polyMeshModifier
57{
58 // Private Member Functions
59
60 //- Updates all sets
61 template<class Type>
62 void updateSets(const mapPolyMesh& morphMap) const;
63
64 //- No copy construct
65 setUpdater(const setUpdater&) = delete;
66
67 //- No copy assignment
68 void operator=(const setUpdater&) = delete;
69
70
71public:
72
73 //- Runtime type information
74 TypeName("setUpdater");
75
76
77 // Constructors
78
79 //- Construct from dictionary
81 (
82 const word& name,
83 const dictionary& dict,
84 const label index,
85 const polyTopoChanger& mme
86 );
87
88
89 //- Destructor
90 virtual ~setUpdater() = default;
91
92
93 // Member Functions
94
95 //- Check for topology change
96 virtual bool changeTopology() const;
97
98 //- Insert the layer addition/removal instructions
99 // into the topological change
100 virtual void setRefinement(polyTopoChange&) const;
101
102 //- Modify motion points to comply with the topological change
103 virtual void modifyMotionPoints(pointField& motionPoints) const;
104
105 //- Force recalculation of locally stored data on topological change
106 virtual void updateMesh(const mapPolyMesh&);
107
108 //- Write
109 virtual void write(Ostream&) const;
110
111 //- Write dictionary
112 virtual void writeDict(Ostream&) const;
113};
114
115
116// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117
118} // End namespace Foam
119
120// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121#ifdef NoRepository
122 #include "setUpdaterTemplates.C"
123#endif
124
125
126#endif
127
128// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:162
Virtual base class for mesh modifiers.
label index() const
Return the index of this modifier.
const word & name() const
Return name of this modifier.
Direct mesh changes based on v1.3 polyTopoChange syntax.
List of mesh modifiers defining the mesh dynamics.
Keeps cell/face/vertex sets uptodate. Both the ones loaded and the ones on disk.
Definition: setUpdater.H:56
virtual ~setUpdater()=default
Destructor.
virtual bool changeTopology() const
Check for topology change.
Definition: setUpdater.C:67
virtual void writeDict(Ostream &) const
Write dictionary.
Definition: setUpdater.C:103
virtual void setRefinement(polyTopoChange &) const
Insert the layer addition/removal instructions.
Definition: setUpdater.C:74
virtual void modifyMotionPoints(pointField &motionPoints) const
Modify motion points to comply with the topological change.
Definition: setUpdater.C:78
virtual void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.
Definition: setUpdater.C:82
TypeName("setUpdater")
Runtime type information.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
runTime write()
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73