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

lagrangianFieldDecomposer.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::lagrangianFieldDecomposer
00026 
00027 Description
00028     Lagrangian field decomposer.
00029 
00030 SourceFiles
00031     lagrangianFieldDecomposer.C
00032     lagrangianFieldDecomposerDecomposeFields.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef lagrangianFieldDecomposer_H
00037 #define lagrangianFieldDecomposer_H
00038 
00039 #include <lagrangian/Cloud.H>
00040 #include <lagrangian/indexedParticle.H>
00041 #include <lagrangian/passiveParticle.H>
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 class IOobjectList;
00049 
00050 /*---------------------------------------------------------------------------*\
00051                     Class lagrangianFieldDecomposer Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class lagrangianFieldDecomposer
00055 {
00056     // Private data
00057 
00058         //- Reference to processor mesh
00059         const polyMesh& procMesh_;
00060 
00061         //- Lagrangian positions for this processor
00062         Cloud<passiveParticle> positions_;
00063 
00064         //- The indices of the particles on this processor
00065         labelList particleIndices_;
00066 
00067 
00068     // Private Member Functions
00069 
00070         //- Disallow default bitwise copy construct
00071         lagrangianFieldDecomposer(const lagrangianFieldDecomposer&);
00072 
00073         //- Disallow default bitwise assignment
00074         void operator=(const lagrangianFieldDecomposer&);
00075 
00076 
00077 public:
00078 
00079     // Constructors
00080 
00081         //- Construct from components
00082         lagrangianFieldDecomposer
00083         (
00084             const polyMesh& mesh,
00085             const polyMesh& procMesh,
00086             const labelList& cellProcAddressing,
00087             const word& cloudName,
00088             const Cloud<indexedParticle>& lagrangianPositions,
00089             const List<SLList<indexedParticle*>*>& cellParticles
00090         );
00091 
00092 
00093     // Member Functions
00094 
00095         // Read the fields and hold on the pointer list
00096         template<class Type>
00097         static void readFields
00098         (
00099             const label cloudI,
00100             const IOobjectList& lagrangianObjects,
00101             PtrList<PtrList<IOField<Type> > >& lagrangianFields
00102 //            PtrList<IOField<Type> >& lagrangianFields
00103         );
00104 
00105         //- Decompose volume field
00106         template<class Type>
00107         tmp<IOField<Type> > decomposeField
00108         (
00109             const word& cloudName,
00110             const IOField<Type>& field
00111         ) const;
00112 
00113         template<class GeoField>
00114         void decomposeFields
00115         (
00116             const word& cloudName,
00117             const PtrList<GeoField>& fields
00118         ) const;
00119 };
00120 
00121 
00122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00123 
00124 } // End namespace Foam
00125 
00126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00127 
00128 #ifdef NoRepository
00129 #   include "lagrangianFieldDecomposerDecomposeFields.C"
00130 #endif
00131 
00132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00133 
00134 #endif
00135 
00136 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines