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