initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / lagrangian / intermediate / submodels / Kinematic / PostProcessingModel / PatchPostProcessing / PatchPostProcessing.H
blob2df16c132424a414f9615e5bd3a766bbe1f0cdfd
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2008-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::PatchPostProcessing
28 Description
29     Standard post-processing
31 SourceFiles
32     PatchPostProcessing.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef PatchPostProcessing_H
37 #define PatchPostProcessing_H
39 #include "PostProcessingModel.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                     Class PatchPostProcessing Declaration
48 \*---------------------------------------------------------------------------*/
50 template<class CloudType>
51 class PatchPostProcessing
53     public PostProcessingModel<CloudType>
55     // Private data
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
66         wordList patchNames_;
68         //- List of parcel data per patch
69         List<DynamicList<autoPtr<parcelType> > > patchData_;
71         //- Mapping from local to global patch ids
72         labelList patchIds_;
75     // Private member functions
77         //- Returns local patchI if patch is in patchIds_ list
78         label applyToPatch(const label globalPatchI) const;
81 protected:
83     // Protected member functions
85         //- Write post-processing info
86         void write();
89 public:
91     //- Runtime type information
92     TypeName("PatchPostProcessing");
95     // Constructors
97         //- Construct from dictionary
98         PatchPostProcessing(const dictionary& dict, CloudType& owner);
101     //- Destructor
102     virtual ~PatchPostProcessing();
105     // Member Functions
107         // Access
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;
122         // Evaluation
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
129             (
130                 const parcelType& p,
131                 const label patchI
132             );
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 } // End namespace Foam
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 #include "PatchPostProcessingI.H"
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 #ifdef NoRepository
147 #   include "PatchPostProcessing.C"
148 #endif
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 #endif
154 // ************************************************************************* //