![]() |
|
00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2005 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 Class 00026 perfectInterface 00027 00028 Description 00029 Hack of attachDetach to couple patches when they perfectly align. 00030 Does not decouple. Used by stitchMesh app. Does geometric matching. 00031 00032 SourceFiles 00033 perfectInterface.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef perfectInterface_H 00038 #define perfectInterface_H 00039 00040 #include "polyMeshModifier.H" 00041 #include "polyPatchID.H" 00042 #include "ZoneIDs.H" 00043 00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00045 00046 namespace Foam 00047 { 00048 00049 // Class forward declarations 00050 class Time; 00051 00052 /*---------------------------------------------------------------------------*\ 00053 Class perfectInterface Declaration 00054 \*---------------------------------------------------------------------------*/ 00055 00056 class perfectInterface 00057 : 00058 public polyMeshModifier 00059 { 00060 // Private data 00061 00062 //- Master face zone ID 00063 faceZoneID faceZoneID_; 00064 00065 //- Master patch ID 00066 polyPatchID masterPatchID_; 00067 00068 //- Slave patch ID 00069 polyPatchID slavePatchID_; 00070 00071 //- Tolerance used for distance comparison (fraction of minimum edge 00072 // length) 00073 static const scalar tol_; 00074 00075 // Private Member Functions 00076 00077 //- Calculate face centres on patch 00078 static pointField calcFaceCentres(const primitivePatch&); 00079 00080 00081 //- Disallow default bitwise copy construct 00082 perfectInterface(const perfectInterface&); 00083 00084 //- Disallow default bitwise assignment 00085 void operator=(const perfectInterface&); 00086 00087 00088 public: 00089 00090 //- Runtime type information 00091 TypeName("perfectInterface"); 00092 00093 00094 // Constructors 00095 00096 //- Construct from components 00097 perfectInterface 00098 ( 00099 const word& name, 00100 const label index, 00101 const polyTopoChanger& mme, 00102 const word& faceZoneName, 00103 const word& masterPatchName, 00104 const word& slavePatchName 00105 ); 00106 00107 //- Construct from dictionary 00108 perfectInterface 00109 ( 00110 const word& name, 00111 const dictionary& dict, 00112 const label index, 00113 const polyTopoChanger& mme 00114 ); 00115 00116 00117 // Destructor 00118 00119 virtual ~perfectInterface(); 00120 00121 00122 // Member Functions 00123 00124 //- Check for topology change 00125 virtual bool changeTopology() const; 00126 00127 //- Insert the layer addition/removal instructions 00128 // into the topological change 00129 virtual void setRefinement(polyTopoChange&) const; 00130 00131 //- Modify motion points to comply with the topological change 00132 virtual void modifyMotionPoints(pointField& motionPoints) const; 00133 00134 //- Force recalculation of locally stored data on topological change 00135 virtual void updateMesh(const mapPolyMesh&); 00136 00137 //- Write 00138 virtual void write(Ostream&) const; 00139 00140 //- Write dictionary 00141 virtual void writeDict(Ostream&) const; 00142 00143 }; 00144 00145 00146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00147 00148 } // End namespace Foam 00149 00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00151 00152 #endif 00153 00154 // ************************************************************************* //