All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
setUpdater.C
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-2018 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 \*---------------------------------------------------------------------------*/
25 
26 #include "setUpdater.H"
27 #include "polyTopoChanger.H"
28 #include "polyTopoChange.H"
30 #include "mapPolyMesh.H"
31 #include "cellSet.H"
32 #include "faceSet.H"
33 #include "pointSet.H"
34 
35 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
36 
37 namespace Foam
38 {
39  defineTypeNameAndDebug(setUpdater, 0);
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
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 
71 {}
72 
73 
74 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
75 
77 {
78  // I am never cause of changeTopo
79  return false;
80 }
81 
82 
84 {}
85 
86 
88 {}
89 
90 
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 
107 {
108  os << nl << type() << nl;
109 }
110 
111 
113 {
114  os << nl << name() << nl << token::BEGIN_BLOCK << nl
115  << " type " << type()
117  << " active " << active()
119  << token::END_BLOCK << endl;
120 }
121 
122 
123 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
124 
125 
126 // * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
127 
128 
129 // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
130 
131 
132 // ************************************************************************* //
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
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
virtual ~setUpdater()
Destructor.
Definition: setUpdater.C:70
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
Definition: Switch.H:60
virtual void writeDict(Ostream &) const
Write dictionary.
Definition: setUpdater.C:112
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
Macros for easy insertion into run-time selection tables.
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.
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:54
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
static const char nl
Definition: Ostream.H:260
defineTypeNameAndDebug(combustionModel, 0)
virtual bool changeTopology() const
Check for topology change.
Definition: setUpdater.C:76
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
virtual void modifyMotionPoints(pointField &motionPoints) const
Modify motion points to comply with the topological change.
Definition: setUpdater.C:87
prefixOSstream Pout(cout, "Pout")
Definition: IOstreams.H:53
Direct mesh changes based on v1.3 polyTopoChange syntax.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
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.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:812