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

PatchPostProcessing.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) 2008-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::PatchPostProcessing
00026 
00027 Description
00028     Standard post-processing
00029 
00030 SourceFiles
00031     PatchPostProcessing.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef PatchPostProcessing_H
00036 #define PatchPostProcessing_H
00037 
00038 #include <lagrangianIntermediate/PostProcessingModel.H>
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 /*---------------------------------------------------------------------------*\
00046                     Class PatchPostProcessing Declaration
00047 \*---------------------------------------------------------------------------*/
00048 
00049 template<class CloudType>
00050 class PatchPostProcessing
00051 :
00052     public PostProcessingModel<CloudType>
00053 {
00054     // Private data
00055 
00056         typedef typename CloudType::parcelType parcelType;
00057 
00058         //- Reference to the mesh
00059         const polyMesh& mesh_;
00060 
00061         //- Maximum number of parcels to store
00062         label maxStoredParcels_;
00063 
00064         //- List of patch names
00065         wordList patchNames_;
00066 
00067         //- List of output data per patch
00068         List<DynamicList<string> > patchData_;
00069 
00070         //- Mapping from local to global patch ids
00071         labelList patchIds_;
00072 
00073 
00074     // Private member functions
00075 
00076         //- Returns local patchI if patch is in patchIds_ list
00077         label applyToPatch(const label globalPatchI) const;
00078 
00079 
00080 protected:
00081 
00082     // Protected member functions
00083 
00084         //- Write post-processing info
00085         void write();
00086 
00087 
00088 public:
00089 
00090     //- Runtime type information
00091     TypeName("PatchPostProcessing");
00092 
00093 
00094     // Constructors
00095 
00096         //- Construct from dictionary
00097         PatchPostProcessing(const dictionary& dict, CloudType& owner);
00098 
00099 
00100     //- Destructor
00101     virtual ~PatchPostProcessing();
00102 
00103 
00104     // Member Functions
00105 
00106         // Access
00107 
00108             //- Return const access to the mesh
00109             inline const polyMesh& mesh() const;
00110 
00111             //- Return maximum number of parcels to store per patch
00112             inline label maxStoredParcels() const;
00113 
00114             //- Return const access to the list of patch names
00115             inline const wordList& patchNames() const;
00116 
00117             //- Return const mapping from local to global patch ids
00118             inline const labelList& patchIds() const;
00119 
00120 
00121         // Evaluation
00122 
00123             //- Flag to indicate whether model activates post-processing model
00124             virtual bool active() const;
00125 
00126             //- Gather post-processing info on patch
00127             virtual void postPatch
00128             (
00129                 const parcelType& p,
00130                 const label patchI
00131             );
00132 };
00133 
00134 
00135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00136 
00137 } // End namespace Foam
00138 
00139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00140 
00141 #include "PatchPostProcessingI.H"
00142 
00143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00144 
00145 #ifdef NoRepository
00146 #   include "PatchPostProcessing.C"
00147 #endif
00148 
00149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00150 
00151 #endif
00152 
00153 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines