OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

processorMeshes.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-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 Class
00026     Foam::processorMeshes
00027 
00028 Description
00029     Container for processor mesh addressing.
00030 
00031 SourceFiles
00032     processorMeshes.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef processorMeshes_H
00037 #define processorMeshes_H
00038 
00039 #include "PtrList.H"
00040 #include "fvMesh.H"
00041 #include "IOobjectList.H"
00042 #include "labelIOList.H"
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 
00049 
00050 /*---------------------------------------------------------------------------*\
00051                      Class processorMeshes Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class processorMeshes
00055 {
00056     // Private data
00057 
00058         //- Processor databases
00059         PtrList<Time>& databases_;
00060 
00061         const word meshName_;
00062 
00063         //- List of processor meshes
00064         PtrList<fvMesh> meshes_;
00065 
00066         //- List of processor point addressing lists
00067         PtrList<labelIOList> pointProcAddressing_;
00068 
00069         //- List of processor face addressing lists
00070         PtrList<labelIOList> faceProcAddressing_;
00071 
00072         //- List of processor cell addressing lists
00073         PtrList<labelIOList> cellProcAddressing_;
00074 
00075         //- List of processor boundary addressing lists
00076         PtrList<labelIOList> boundaryProcAddressing_;
00077 
00078 
00079     // Private Member Functions
00080 
00081         //- Read all meshes
00082         void read();
00083 
00084         //- Disallow default bitwise copy construct
00085         processorMeshes(const processorMeshes&);
00086 
00087         //- Disallow default bitwise assignment
00088         void operator=(const processorMeshes&);
00089 
00090 
00091 public:
00092 
00093     // Constructors
00094 
00095         //- Construct from components
00096         processorMeshes(PtrList<Time>& databases, const word& meshName);
00097 
00098 
00099     // Member Functions
00100 
00101         //- Update the meshes based on the mesh files saved in
00102         //  time directories
00103         fvMesh::readUpdateState readUpdate();
00104 
00105         //- Reconstruct point position after motion in parallel
00106         void reconstructPoints(fvMesh& mesh);
00107 
00108         PtrList<fvMesh>& meshes()
00109         {
00110             return meshes_;
00111         }
00112         const PtrList<labelIOList>& pointProcAddressing() const
00113         {
00114             return pointProcAddressing_;
00115         }
00116         PtrList<labelIOList>& faceProcAddressing()
00117         {
00118             return faceProcAddressing_;
00119         }
00120         const PtrList<labelIOList>& cellProcAddressing() const
00121         {
00122             return cellProcAddressing_;
00123         }
00124         const PtrList<labelIOList>& boundaryProcAddressing() const
00125         {
00126             return boundaryProcAddressing_;
00127         }
00128 
00129 
00130 };
00131 
00132 
00133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00134 
00135 } // End namespace Foam
00136 
00137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00138 
00139 #endif
00140 
00141 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd