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 | Copyright (C) 2011-2016 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  //- Disallow default bitwise copy construct
62  setUpdater(const setUpdater&);
63 
64  //- Disallow default bitwise assignment
65  void operator=(const setUpdater&);
66 
67 
68 public:
69 
70  //- Runtime type information
71  TypeName("setUpdater");
72 
73 
74  // Constructors
75 
76  //- Construct from dictionary
78  (
79  const word& name,
80  const dictionary& dict,
81  const label index,
82  const polyTopoChanger& mme
83  );
84 
85 
86  //- Destructor
87  virtual ~setUpdater();
88 
89 
90  // Member Functions
91 
92  //- Check for topology change
93  virtual bool changeTopology() const;
94 
95  //- Insert the layer addition/removal instructions
96  // into the topological change
97  virtual void setRefinement(polyTopoChange&) const;
98 
99  //- Modify motion points to comply with the topological change
100  virtual void modifyMotionPoints(pointField& motionPoints) const;
101 
102  //- Force recalculation of locally stored data on topological change
103  virtual void updateMesh(const mapPolyMesh&);
104 
105  //- Write
106  virtual void write(Ostream&) const;
107 
108  //- Write dictionary
109  virtual void writeDict(Ostream&) const;
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace Foam
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 #ifdef NoRepository
119  #include "setUpdaterTemplates.C"
120 #endif
121 
122 
123 #endif
124 
125 // ************************************************************************* //
dictionary dict
virtual void writeDict(Ostream &) const
Write dictionary.
Definition: setUpdater.C:112
virtual void setRefinement(polyTopoChange &) const
Insert the layer addition/removal instructions.
Definition: setUpdater.C:83
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:137
virtual bool changeTopology() const
Check for topology change.
Definition: setUpdater.C:76
virtual ~setUpdater()
Destructor.
Definition: setUpdater.C:70
const word & name() const
Return name of this modifier.
label index() const
Return the index of this modifier.
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
Virtual base class for mesh modifiers.
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
Direct mesh changes based on v1.3 polyTopoChange syntax.
virtual void modifyMotionPoints(pointField &motionPoints) const
Modify motion points to comply with the topological change.
Definition: setUpdater.C:87
virtual void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.
Definition: setUpdater.C:91
virtual void write(Ostream &) const
Write.
Definition: setUpdater.C:106
Namespace for OpenFOAM.