1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 Foam::PatchPostProcessing
28 Standard post-processing
33 \*---------------------------------------------------------------------------*/
35 #ifndef PatchPostProcessing_H
36 #define PatchPostProcessing_H
38 #include "CloudFunctionObject.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class PatchPostProcessing Declaration
47 \*---------------------------------------------------------------------------*/
49 template<class CloudType>
50 class PatchPostProcessing
52 public CloudFunctionObject<CloudType>
56 typedef typename CloudType::particleType parcelType;
58 //- Maximum number of parcels to store - set as a scalar for I/O
59 scalar maxStoredParcels_;
61 //- List of patch indices to post-process
64 //- List of output data per patch
65 List<DynamicList<string> > patchData_;
68 // Private Member Functions
70 //- Returns local patchI if patch is in patchIds_ list
71 label applyToPatch(const label globalPatchI) const;
76 // Protected Member Functions
78 //- Write post-processing info
84 //- Runtime type information
85 TypeName("patchPostProcessing");
90 //- Construct from dictionary
91 PatchPostProcessing(const dictionary& dict, CloudType& owner);
94 PatchPostProcessing(const PatchPostProcessing<CloudType>& ppm);
96 //- Construct and return a clone
97 virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
99 return autoPtr<CloudFunctionObject<CloudType> >
101 new PatchPostProcessing<CloudType>(*this)
107 virtual ~PatchPostProcessing();
114 //- Return maximum number of parcels to store per patch
115 inline label maxStoredParcels() const;
117 //- Return const mapping from local to global patch ids
118 inline const labelList& patchIDs() const;
124 virtual void postPatch(const parcelType& p, const label patchI);
127 virtual void postFace(const parcelType& p);
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 } // End namespace Foam
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 #include "PatchPostProcessingI.H"
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 # include "PatchPostProcessing.C"
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 // ************************************************************************* //