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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::setUpdater
29 
30 Description
31  Keeps cell/face/vertex sets uptodate. Both the ones loaded and the ones
32  on disk.
33 
34 SourceFiles
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 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class setUpdater Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class 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 
71 public:
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 // ************************************************************************* //
Foam::setUpdater::modifyMotionPoints
virtual void modifyMotionPoints(pointField &motionPoints) const
Modify motion points to comply with the topological change.
Definition: setUpdater.C:78
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::setUpdater::writeDict
virtual void writeDict(Ostream &) const
Write dictionary.
Definition: setUpdater.C:103
Foam::polyTopoChanger
List of mesh modifiers defining the mesh dynamics.
Definition: polyTopoChanger.H:62
Foam::polyTopoChange
Direct mesh changes based on v1.3 polyTopoChange syntax.
Definition: polyTopoChange.H:99
Foam::polyMeshModifier::index
label index() const
Return the index of this modifier.
Definition: polyMeshModifier.H:156
Foam::setUpdater::~setUpdater
virtual ~setUpdater()=default
Destructor.
Foam::setUpdater::setRefinement
virtual void setRefinement(polyTopoChange &) const
Insert the layer addition/removal instructions.
Definition: setUpdater.C:74
Foam::Field< vector >
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::setUpdater::updateMesh
virtual void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.
Definition: setUpdater.C:82
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::setUpdater
Keeps cell/face/vertex sets uptodate. Both the ones loaded and the ones on disk.
Definition: setUpdater.H:53
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::setUpdater::write
virtual void write(Ostream &) const
Write.
Definition: setUpdater.C:97
Foam::polyMeshModifier
Virtual base class for mesh modifiers.
Definition: polyMeshModifier.H:68
Foam::polyMeshModifier::name
const word & name() const
Return name of this modifier.
Definition: polyMeshModifier.H:150
Foam::setUpdater::TypeName
TypeName("setUpdater")
Runtime type information.
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:161
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::setUpdater::changeTopology
virtual bool changeTopology() const
Check for topology change.
Definition: setUpdater.C:67
polyMeshModifier.H
setUpdaterTemplates.C