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

genericPolyPatch.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::genericPolyPatch
00026 
00027 Description
00028     Determines a mapping between patch face centres and mesh cell centres and
00029     processors they're on.
00030 
00031 Note
00032     Storage is not optimal. It stores all face centres and cells on all
00033     processors to keep the addressing calculation simple.
00034 
00035 SourceFiles
00036     genericPolyPatch.C
00037 
00038 \*---------------------------------------------------------------------------*/
00039 
00040 #ifndef genericPolyPatch_H
00041 #define genericPolyPatch_H
00042 
00043 #include <OpenFOAM/polyPatch.H>
00044 
00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00046 
00047 namespace Foam
00048 {
00049 
00050 /*---------------------------------------------------------------------------*\
00051                       Class genericPolyPatch Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class genericPolyPatch
00055 :
00056     public polyPatch
00057 {
00058     // Private data
00059 
00060         word actualTypeName_;
00061         dictionary dict_;
00062 
00063 public:
00064 
00065     //- Runtime type information
00066     TypeName("genericPatch");
00067 
00068 
00069     // Constructors
00070 
00071         //- Construct from components
00072         genericPolyPatch
00073         (
00074             const word& name,
00075             const label size,
00076             const label start,
00077             const label index,
00078             const polyBoundaryMesh& bm
00079         );
00080 
00081         //- Construct from dictionary
00082         genericPolyPatch
00083         (
00084             const word& name,
00085             const dictionary& dict,
00086             const label index,
00087             const polyBoundaryMesh& bm
00088         );
00089 
00090         //- Construct as copy, resetting the boundary mesh
00091         genericPolyPatch
00092         (
00093             const genericPolyPatch&,
00094             const polyBoundaryMesh&
00095         );
00096 
00097         //- Construct given the original patch and resetting the
00098         //  face list and boundary mesh information
00099         genericPolyPatch
00100         (
00101             const genericPolyPatch& pp,
00102             const polyBoundaryMesh& bm,
00103             const label index,
00104             const label newSize,
00105             const label newStart
00106         );
00107 
00108         //- Construct and return a clone, resetting the boundary mesh
00109         virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
00110         {
00111             return autoPtr<polyPatch>(new genericPolyPatch(*this, bm));
00112         }
00113 
00114         //- Construct and return a clone, resetting the face list
00115         //  and boundary mesh
00116         virtual autoPtr<polyPatch> clone
00117         (
00118             const polyBoundaryMesh& bm,
00119             const label index,
00120             const label newSize,
00121             const label newStart
00122         ) const
00123         {
00124             return autoPtr<polyPatch>
00125             (
00126                 new genericPolyPatch(*this, bm, index, newSize, newStart)
00127             );
00128         }
00129 
00130 
00131     // Destructor
00132 
00133         ~genericPolyPatch();
00134 
00135 
00136     // Member functions
00137 
00138         //- Write the polyPatch data as a dictionary
00139         virtual void write(Ostream&) const;
00140 };
00141 
00142 
00143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00144 
00145 } // End namespace Foam
00146 
00147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00148 
00149 #endif
00150 
00151 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines