1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2009 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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::PatchPostProcessing
29 Standard post-processing
34 \*---------------------------------------------------------------------------*/
36 #ifndef PatchPostProcessing_H
37 #define PatchPostProcessing_H
39 #include "PostProcessingModel.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class PatchPostProcessing Declaration
48 \*---------------------------------------------------------------------------*/
50 template<class CloudType>
51 class PatchPostProcessing
53 public PostProcessingModel<CloudType>
57 typedef typename CloudType::parcelType parcelType;
59 //- Reference to the mesh
60 const polyMesh& mesh_;
62 //- Maximum number of parcels to store
63 label maxStoredParcels_;
65 //- List of patch names
68 //- List of parcel data per patch
69 List<DynamicList<autoPtr<parcelType> > > patchData_;
71 //- Mapping from local to global patch ids
75 // Private member functions
77 //- Returns local patchI if patch is in patchIds_ list
78 label applyToPatch(const label globalPatchI) const;
83 // Protected member functions
85 //- Write post-processing info
91 //- Runtime type information
92 TypeName("PatchPostProcessing");
97 //- Construct from dictionary
98 PatchPostProcessing(const dictionary& dict, CloudType& owner);
102 virtual ~PatchPostProcessing();
109 //- Return const access to the mesh
110 inline const polyMesh& mesh() const;
112 //- Return maximum number of parcels to store per patch
113 inline label maxStoredParcels() const;
115 //- Return const access to the list of patch names
116 inline const wordList& patchNames() const;
118 //- Return const mapping from local to global patch ids
119 inline const labelList& patchIds() const;
124 //- Flag to indicate whether model activates post-processing model
125 virtual bool active() const;
127 //- Gather post-processing info on patch
128 virtual void postPatch
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 } // End namespace Foam
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 #include "PatchPostProcessingI.H"
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 # include "PatchPostProcessing.C"
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 // ************************************************************************* //