initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / dynamicMesh / setUpdater / setUpdater.C
blob7b79a808e887026e45a53af70bd7c637a15a7caf
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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"
32 #include "cellSet.H"
33 #include "faceSet.H"
34 #include "pointSet.H"
36 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
38 namespace Foam
40     defineTypeNameAndDebug(setUpdater, 0);
41     addToRunTimeSelectionTable
42     (
43         polyMeshModifier,
44         setUpdater,
45         dictionary
46     );
50 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
54 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
56 // Construct from dictionary
57 Foam::setUpdater::setUpdater
59     const word& name,
60     const dictionary& dict,
61     const label index,
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
80     return false;
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.
95     if (debug)
96     {
97         Pout<< "setUpdater::updateMesh(const mapPolyMesh& morphMap)"
98             << endl;
99     }
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 // ************************************************************************* //