1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "setUpdater.H"
27 #include "polyTopoChanger.H"
28 #include "polyTopoChange.H"
29 #include "addToRunTimeSelectionTable.H"
30 #include "mapPolyMesh.H"
35 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
39 defineTypeNameAndDebug(setUpdater, 0);
40 addToRunTimeSelectionTable
49 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
53 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
55 // Construct from dictionary
56 Foam::setUpdater::setUpdater
59 const dictionary& dict,
61 const polyTopoChanger& mme
64 polyMeshModifier(name, index, mme, Switch(dict.lookup("active")))
68 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
70 Foam::setUpdater::~setUpdater()
74 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
76 bool Foam::setUpdater::changeTopology() const
78 // I am never cause of changeTopo
83 void Foam::setUpdater::setRefinement(polyTopoChange&) const
87 void Foam::setUpdater::modifyMotionPoints(pointField&) const
91 void Foam::setUpdater::updateMesh(const mapPolyMesh& morphMap)
93 // Mesh has changed topologically. Update all sets.
96 Pout<< "setUpdater::updateMesh(const mapPolyMesh& morphMap)"
100 updateSets<cellSet>(morphMap);
101 updateSets<faceSet>(morphMap);
102 updateSets<pointSet>(morphMap);
106 void Foam::setUpdater::write(Ostream& os) const
108 os << nl << type() << nl;
112 void Foam::setUpdater::writeDict(Ostream& os) const
114 os << nl << name() << nl << token::BEGIN_BLOCK << nl
115 << " type " << type()
116 << token::END_STATEMENT << nl
117 << " active " << active()
118 << token::END_STATEMENT << nl
119 << token::END_BLOCK << endl;
123 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
126 // * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
129 // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
132 // ************************************************************************* //