FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

repatchPolyTopoChanger.H

Go 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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::repatchPolyTopoChanger
00026 
00027 Description
00028     A mesh which allows changes in the patch distribution of the
00029     boundary faces.  The change in patching is set using changePatchID. For a
00030     boundary face, a new patch ID is given. 
00031 
00032 SourceFiles
00033     repatchPolyTopoChanger.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef repatchPolyTopoChanger_H
00038 #define repatchPolyTopoChanger_H
00039 
00040 #include <OpenFOAM/polyMesh.H>
00041 #include <dynamicMesh/polyTopoChange.H>
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 /*---------------------------------------------------------------------------*\
00049                        Class repatchPolyTopoChanger Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 class repatchPolyTopoChanger
00053 {
00054     // Private data
00055 
00056         //- The polyMesh to be repatched
00057         polyMesh& mesh_;
00058 
00059         //- Topological change to accumulated all mesh changes
00060         autoPtr<polyTopoChange> meshModPtr_;
00061 
00062 
00063     // Private Member Functions
00064 
00065         //- Demand driven access to polyTopoChange
00066         polyTopoChange& meshMod();
00067 
00068         //- Disallow default bitwise copy construct
00069         repatchPolyTopoChanger(const repatchPolyTopoChanger&);
00070 
00071         //- Disallow default bitwise assignment
00072         void operator=(const repatchPolyTopoChanger&);
00073 
00074 
00075 public:
00076 
00077     // Constructors
00078 
00079         //- Construct for given mesh
00080         explicit repatchPolyTopoChanger(polyMesh& mesh);
00081 
00082 
00083     // Destructor
00084 
00085         virtual ~repatchPolyTopoChanger()
00086         {}
00087 
00088 
00089     // Member Functions
00090 
00091         //- Change patches.
00092         void changePatches(const List<polyPatch*>& patches);
00093 
00094         //- Change patch ID for a boundary face. Note: patchID should be in new
00095         //  numbering.
00096         void changePatchID
00097         (
00098             const label faceID,
00099             const label patchID
00100         );
00101 
00102         //- Set zone ID for a face
00103         void setFaceZone
00104         (
00105             const label faceID,
00106             const label zoneID,
00107             const bool zoneFlip
00108         );
00109 
00110         //- Change anchor point (zero'th point of face) for a boundary face.
00111         void changeAnchorPoint
00112         (
00113             const label faceID,
00114             const label fp
00115         );
00116 
00117 
00118         //- Re-patch the mesh
00119         void repatch();
00120 };
00121 
00122 
00123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00124 
00125 } // End namespace Foam
00126 
00127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00128 
00129 #endif
00130 
00131 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines