setUpdater.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
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::setUpdater
26 
27 Description
28  Keeps cell/face/vertex sets uptodate. Both the ones loaded and the ones
29  on disk.
30 
31 SourceFiles
32  setUpdater.C
33  setUpdaterTemplates.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef setUpdater_H
38 #define setUpdater_H
39 
40 #include "polyMeshModifier.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class setUpdater Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class setUpdater
52 :
53  public polyMeshModifier
54 {
55  // Private Member Functions
56 
57  //- Updates all sets
58  template<class Type>
59  void updateSets(const mapPolyMesh& morphMap) const;
60 
61 
62 public:
63 
64  //- Runtime type information
65  TypeName("setUpdater");
66 
67 
68  // Constructors
69 
70  //- Construct from dictionary
72  (
73  const word& name,
74  const dictionary& dict,
75  const label index,
76  const polyTopoChanger& mme
77  );
78 
79  //- Disallow default bitwise copy construction
80  setUpdater(const setUpdater&) = delete;
81 
82 
83  //- Destructor
84  virtual ~setUpdater();
85 
86 
87  // Member Functions
88 
89  //- Check for topology change
90  virtual bool changeTopology() const;
91 
92  //- Insert the layer addition/removal instructions
93  // into the topological change
94  virtual void setRefinement(polyTopoChange&) const;
95 
96  //- Modify motion points to comply with the topological change
97  virtual void modifyMotionPoints(pointField& motionPoints) const;
98 
99  //- Force recalculation of locally stored data on topological change
100  virtual void updateMesh(const mapPolyMesh&);
101 
102  //- Write
103  virtual void write(Ostream&) const;
104 
105  //- Write dictionary
106  virtual void writeDict(Ostream&) const;
107 
108 
109  // Member Operators
110 
111  //- Disallow default bitwise assignment
112  void operator=(const setUpdater&) = delete;
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 // ************************************************************************* //
dictionary dict
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual void write(Ostream &) const
Write.
Definition: setUpdater.C:106
virtual ~setUpdater()
Destructor.
Definition: setUpdater.C:70
virtual void writeDict(Ostream &) const
Write dictionary.
Definition: setUpdater.C:112
TypeName("setUpdater")
Runtime type information.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
List of mesh modifiers defining the mesh dynamics.
A class for handling words, derived from string.
Definition: word.H:59
void operator=(const setUpdater &)=delete
Disallow default bitwise assignment.
Virtual base class for mesh modifiers.
setUpdater(const word &name, const dictionary &dict, const label index, const polyTopoChanger &mme)
Construct from dictionary.
Definition: setUpdater.C:57
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
Keeps cell/face/vertex sets uptodate. Both the ones loaded and the ones on disk.
Definition: setUpdater.H:50
virtual bool changeTopology() const
Check for topology change.
Definition: setUpdater.C:76
virtual void modifyMotionPoints(pointField &motionPoints) const
Modify motion points to comply with the topological change.
Definition: setUpdater.C:87
Direct mesh changes based on v1.3 polyTopoChange syntax.
const word & name() const
Return name of this modifier.
label index() const
Return the index of this modifier.
virtual void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.
Definition: setUpdater.C:91
virtual void setRefinement(polyTopoChange &) const
Insert the layer addition/removal instructions.
Definition: setUpdater.C:83
Namespace for OpenFOAM.