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

pointFieldReconstructor.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::pointFieldReconstructor
00027 
00028 Description
00029     Point field reconstructor.
00030 
00031 SourceFiles
00032     pointFieldReconstructor.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef pointFieldReconstructor_H
00037 #define pointFieldReconstructor_H
00038 
00039 #include "pointMesh.H"
00040 #include "pointFields.H"
00041 #include "pointPatchFieldMapperPatchRef.H"
00042 #include "IOobjectList.H"
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 
00049 /*---------------------------------------------------------------------------*\
00050               Class pointFieldReconstructor Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class pointFieldReconstructor
00054 {
00055     // Private data
00056 
00057         //- Reconstructed mesh reference
00058         const pointMesh& mesh_;
00059 
00060         //- List of processor meshes
00061         const PtrList<pointMesh>& procMeshes_;
00062 
00063         //- List of processor point addressing lists
00064         const PtrList<labelIOList>& pointProcAddressing_;
00065 
00066         //- List of processor boundary addressing lists
00067         const PtrList<labelIOList>& boundaryProcAddressing_;
00068 
00069         //- Point patch addressing
00070         labelListListList patchPointAddressing_;
00071 
00072 
00073     // Private Member Functions
00074 
00075         //- Disallow default bitwise copy construct
00076         pointFieldReconstructor
00077         (
00078             const pointFieldReconstructor&
00079         );
00080 
00081         //- Disallow default bitwise assignment
00082         void operator=(const pointFieldReconstructor&);
00083 
00084 
00085 public:
00086 
00087         class pointPatchFieldReconstructor
00088         :
00089             public pointPatchFieldMapper
00090         {
00091             label size_;
00092 
00093         public:
00094 
00095             // Constructors
00096 
00097                 //- Construct given size
00098                 pointPatchFieldReconstructor(const label size)
00099                 :
00100                     size_(size)
00101                 {}
00102 
00103 
00104             // Member functions
00105 
00106                 label size() const
00107                 {
00108                     return size_;
00109                 }
00110 
00111                 bool direct() const
00112                 {
00113                     return true;
00114                 }
00115 
00116                 const unallocLabelList& directAddressing() const
00117                 {
00118                     return unallocLabelList::null();
00119                 }
00120         };
00121 
00122 
00123     // Constructors
00124 
00125         //- Construct from components
00126         pointFieldReconstructor
00127         (
00128             const pointMesh& mesh,
00129             const PtrList<pointMesh>& procMeshes,
00130             const PtrList<labelIOList>& pointProcAddressing,
00131             const PtrList<labelIOList>& boundaryProcAddressing
00132         );
00133 
00134 
00135     // Member Functions
00136 
00137         //- Reconstruct field
00138         template<class Type>
00139         tmp<GeometricField<Type, pointPatchField, pointMesh> >
00140         reconstructField(const IOobject& fieldIoObject);
00141 
00142         //- Reconstruct and write all fields
00143         template<class Type>
00144         void reconstructFields(const IOobjectList& objects);
00145 };
00146 
00147 
00148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00149 
00150 } // End namespace Foam
00151 
00152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00153 
00154 #ifdef NoRepository
00155 #   include "pointFieldReconstructorReconstructFields.C"
00156 #endif
00157 
00158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00159 
00160 #endif
00161 
00162 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd