initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / lagrangian / dsmc / submodels / WallInteractionModel / WallInteractionModel / WallInteractionModel.H
blobe9c7ffd33f001d555b9567a198554091745f683b
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2009-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::WallInteractionModel
28 Description
29     Templated wall interaction model class
31 SourceFiles
32     WallInteractionModel.C
33     NewWallInteractionModel.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef WallInteractionModel_H
38 #define WallInteractionModel_H
40 #include "IOdictionary.H"
41 #include "autoPtr.H"
42 #include "runTimeSelectionTables.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 /*---------------------------------------------------------------------------*\
50                      Class WallInteractionModel Declaration
51 \*---------------------------------------------------------------------------*/
53 template<class CloudType>
54 class WallInteractionModel
56     // Private data
58         //- The cloud dictionary
59         const dictionary& dict_;
61         // reference to the owner cloud class
62         CloudType& owner_;
64         //- The coefficients dictionary
65         const dictionary coeffDict_;
68 public:
70     //- Runtime type information
71     TypeName("WallInteractionModel");
73     //- Declare runtime constructor selection table
74     declareRunTimeSelectionTable
75     (
76         autoPtr,
77         WallInteractionModel,
78         dictionary,
79         (
80             const dictionary& dict,
81             CloudType& owner
82         ),
83         (dict, owner)
84     );
87     // Constructors
89         //- Construct from components
90         WallInteractionModel
91         (
92             const dictionary& dict,
93             CloudType& owner,
94             const word& type
95         );
98     // Destructor
99     virtual ~WallInteractionModel();
102     //- Selector
103     static autoPtr<WallInteractionModel<CloudType> > New
104     (
105         const dictionary& dict,
106         CloudType& owner
107     );
110     // Access
112         //- Return the owner cloud object
113         const CloudType& owner() const;
115         //- Return non-const access to the owner cloud object
116         CloudType& owner();
118         //- Return the dictionary
119         const dictionary& dict() const;
121         //- Return the coefficients dictionary
122         const dictionary& coeffDict() const;
125     // Member Functions
127         //- Apply wall correction
128         virtual void correct
129         (
130             const wallPolyPatch& wpp,
131             const label faceId,
132             vector& U,
133             scalar& Ei,
134             label typeId
135         ) = 0;
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace Foam
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 #define makeWallInteractionModel(CloudType)                                   \
146                                                                               \
147     defineNamedTemplateTypeNameAndDebug(WallInteractionModel<CloudType>, 0);  \
148                                                                               \
149     defineTemplateRunTimeSelectionTable                                       \
150     (                                                                         \
151         WallInteractionModel<CloudType>,                                      \
152         dictionary                                                            \
153     );
156 #define makeWallInteractionModelType(SS, CloudType, ParcelType)               \
157                                                                               \
158     defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0);       \
159                                                                               \
160     WallInteractionModel<CloudType<ParcelType> >::                            \
161         adddictionaryConstructorToTable<SS<CloudType<ParcelType> > >          \
162             add##SS##CloudType##ParcelType##ConstructorToTable_;
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 #ifdef NoRepository
168 #   include "WallInteractionModel.C"
169 #endif
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 #endif
175 // ************************************************************************* //