initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / lagrangian / dsmc / submodels / InflowBoundaryModel / InflowBoundaryModel / InflowBoundaryModel.H
bloba86f857946e56252cb70693a54db3befb7cf95b5
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::InflowBoundaryModel
29 Description
30     Templated inflow boundary model class
32 SourceFiles
33     InflowBoundaryModel.C
34     NewInflowBoundaryModel.C
36 \*---------------------------------------------------------------------------*/
38 #ifndef InflowBoundaryModel_H
39 #define InflowBoundaryModel_H
41 #include "IOdictionary.H"
42 #include "autoPtr.H"
43 #include "runTimeSelectionTables.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 namespace Foam
50 /*---------------------------------------------------------------------------*\
51                      Class InflowBoundaryModel Declaration
52 \*---------------------------------------------------------------------------*/
54 template<class CloudType>
55 class InflowBoundaryModel
57     // Private data
59         //- The cloud dictionary
60         const dictionary& dict_;
62         // Reference to the owner cloud class
63         CloudType& owner_;
65         //- The coefficients dictionary
66         const dictionary coeffDict_;
69 public:
71     //- Runtime type information
72     TypeName("InflowBoundaryModel");
74     //- Declare runtime constructor selection table
75     declareRunTimeSelectionTable
76     (
77         autoPtr,
78         InflowBoundaryModel,
79         dictionary,
80         (
81             const dictionary& dict,
82             CloudType& owner
83         ),
84         (dict, owner)
85     );
88     // Constructors
90         //- Construct from dictionary
91         InflowBoundaryModel
92         (
93             const dictionary& dict,
94             CloudType& owner,
95             const word& type
96         );
99     //- Destructor
100     virtual ~InflowBoundaryModel();
103     //- Selector
104     static autoPtr<InflowBoundaryModel<CloudType> > New
105     (
106         const dictionary& dict,
107         CloudType& owner
108     );
111     // Access
113         //- Return const access the owner cloud object
114         inline const CloudType& owner() const;
116         //- Return non-const access the owner cloud object for manipulation
117         inline CloudType& owner();
119         //- Return the owner cloud dictionary
120         inline const dictionary& dict() const;
122         //- Return the coefficients dictionary
123         inline const dictionary& coeffDict() const;
125     //- Introduce particles
126     virtual void inflow() = 0;
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 } // End namespace Foam
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 #define makeInflowBoundaryModel(CloudType)                                    \
137                                                                               \
138     defineNamedTemplateTypeNameAndDebug(InflowBoundaryModel<CloudType>, 0);   \
139                                                                               \
140     defineTemplateRunTimeSelectionTable                                       \
141     (                                                                         \
142         InflowBoundaryModel<CloudType>,                                       \
143         dictionary                                                            \
144     );
147 #define makeInflowBoundaryModelType(SS, CloudType, ParcelType)                \
148                                                                               \
149     defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0);       \
150                                                                               \
151     InflowBoundaryModel<CloudType<ParcelType> >::                             \
152         adddictionaryConstructorToTable<SS<CloudType<ParcelType> > >          \
153             add##SS##CloudType##ParcelType##ConstructorToTable_;
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 #ifdef NoRepository
159 #   include "InflowBoundaryModel.C"
160 #endif
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 #endif
166 // ************************************************************************* //