1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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::FacePostProcessing
28 Records particle face quantities on used-specified face zone
37 \*---------------------------------------------------------------------------*/
39 #ifndef FacePostProcessing_H
40 #define FacePostProcessing_H
42 #include "CloudFunctionObject.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class FacePostProcessing Declaration
52 \*---------------------------------------------------------------------------*/
54 template<class CloudType>
55 class FacePostProcessing
57 public CloudFunctionObject<CloudType>
63 //- Convenience typedef for parcel type
64 typedef typename CloudType::parcelType parcelType;
68 labelList faceZoneIDs_;
70 //- Surface output format
71 const word surfaceFormat_;
73 //- Flag to indicate whether data should be reset/cleared on writing
80 List<scalarField> mass_;
82 //- Mass total storage
83 List<scalarField> massTotal_;
86 List<scalarField> massFlux_;
88 //- Flag to indicate whether data should be written to file
91 //- Output file pointer per zone
92 PtrList<OFstream> outputFilePtr_;
98 // Private Member Functions
100 //- Helper function to create log files
103 const word& zoneName,
112 // Protected Member Functions
114 //- Write post-processing info
120 //- Runtime type information
121 TypeName("facePostProcessing");
126 //- Construct from dictionary
127 FacePostProcessing(const dictionary& dict, CloudType& owner);
130 FacePostProcessing(const FacePostProcessing<CloudType>& ppm);
132 //- Construct and return a clone
133 virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
135 return autoPtr<CloudFunctionObject<CloudType> >
137 new FacePostProcessing<CloudType>(*this)
143 virtual ~FacePostProcessing();
150 //- Return const access to the reset on write flag
151 inline const Switch& resetOnWrite() const;
157 virtual void postFace
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 } // End namespace Foam
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 #include "FacePostProcessingI.H"
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 # include "FacePostProcessing.C"
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 // ************************************************************************* //