1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "setUpdater.H"
28 #include "polyTopoChanger.H"
29 #include "polyTopoChange.H"
30 #include "addToRunTimeSelectionTable.H"
31 #include "mapPolyMesh.H"
36 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
40 defineTypeNameAndDebug(setUpdater, 0);
41 addToRunTimeSelectionTable
50 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
54 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
56 // Construct from dictionary
57 Foam::setUpdater::setUpdater
60 const dictionary& dict,
62 const polyTopoChanger& mme
65 polyMeshModifier(name, index, mme, Switch(dict.lookup("active")))
69 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
71 Foam::setUpdater::~setUpdater()
75 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
77 bool Foam::setUpdater::changeTopology() const
79 // I am never cause of changeTopo
84 void Foam::setUpdater::setRefinement(polyTopoChange&) const
88 void Foam::setUpdater::modifyMotionPoints(pointField&) const
92 void Foam::setUpdater::updateMesh(const mapPolyMesh& morphMap)
94 // Mesh has changed topologically. Update all sets.
97 Pout<< "setUpdater::updateMesh(const mapPolyMesh& morphMap)"
101 updateSets<cellSet>(morphMap);
102 updateSets<faceSet>(morphMap);
103 updateSets<pointSet>(morphMap);
107 void Foam::setUpdater::write(Ostream& os) const
109 os << nl << type() << nl;
113 void Foam::setUpdater::writeDict(Ostream& os) const
115 os << nl << name() << nl << token::BEGIN_BLOCK << nl
116 << " type " << type()
117 << token::END_STATEMENT << nl
118 << " active " << active()
119 << token::END_STATEMENT << nl
120 << token::END_BLOCK << endl;
124 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
127 // * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
130 // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
133 // ************************************************************************* //