|
|
|
setUpdater.CGo to the documentation of this file.00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software; you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM; if not, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 \*---------------------------------------------------------------------------*/ 00026 00027 #include "setUpdater.H" 00028 #include "polyTopoChanger.H" 00029 #include "polyTopoChange.H" 00030 #include "addToRunTimeSelectionTable.H" 00031 #include "mapPolyMesh.H" 00032 #include "cellSet.H" 00033 #include "faceSet.H" 00034 #include "pointSet.H" 00035 00036 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // 00037 00038 namespace Foam 00039 { 00040 defineTypeNameAndDebug(setUpdater, 0); 00041 addToRunTimeSelectionTable 00042 ( 00043 polyMeshModifier, 00044 setUpdater, 00045 dictionary 00046 ); 00047 } 00048 00049 00050 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // 00051 00052 00053 00054 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // 00055 00056 // Construct from dictionary 00057 Foam::setUpdater::setUpdater 00058 ( 00059 const word& name, 00060 const dictionary& dict, 00061 const label index, 00062 const polyTopoChanger& mme 00063 ) 00064 : 00065 polyMeshModifier(name, index, mme, Switch(dict.lookup("active"))) 00066 {} 00067 00068 00069 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // 00070 00071 Foam::setUpdater::~setUpdater() 00072 {} 00073 00074 00075 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // 00076 00077 bool Foam::setUpdater::changeTopology() const 00078 { 00079 // I am never cause of changeTopo 00080 return false; 00081 } 00082 00083 00084 void Foam::setUpdater::setRefinement(polyTopoChange&) const 00085 {} 00086 00087 00088 void Foam::setUpdater::modifyMotionPoints(pointField&) const 00089 {} 00090 00091 00092 void Foam::setUpdater::updateMesh(const mapPolyMesh& morphMap) 00093 { 00094 // Mesh has changed topologically. Update all sets. 00095 if (debug) 00096 { 00097 Pout<< "setUpdater::updateMesh(const mapPolyMesh& morphMap)" 00098 << endl; 00099 } 00100 00101 updateSets<cellSet>(morphMap); 00102 updateSets<faceSet>(morphMap); 00103 updateSets<pointSet>(morphMap); 00104 } 00105 00106 00107 void Foam::setUpdater::write(Ostream& os) const 00108 { 00109 os << nl << type() << nl; 00110 } 00111 00112 00113 void Foam::setUpdater::writeDict(Ostream& os) const 00114 { 00115 os << nl << name() << nl << token::BEGIN_BLOCK << nl 00116 << " type " << type() 00117 << token::END_STATEMENT << nl 00118 << " active " << active() 00119 << token::END_STATEMENT << nl 00120 << token::END_BLOCK << endl; 00121 } 00122 00123 00124 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // 00125 00126 00127 // * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * // 00128 00129 00130 // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // 00131 00132 00133 // ************************************************************************* // |