1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2009-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::InflowBoundaryModel
30 Templated inflow boundary model class
34 NewInflowBoundaryModel.C
36 \*---------------------------------------------------------------------------*/
38 #ifndef InflowBoundaryModel_H
39 #define InflowBoundaryModel_H
41 #include "IOdictionary.H"
43 #include "runTimeSelectionTables.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class InflowBoundaryModel Declaration
52 \*---------------------------------------------------------------------------*/
54 template<class CloudType>
55 class InflowBoundaryModel
59 //- The cloud dictionary
60 const dictionary& dict_;
62 // Reference to the owner cloud class
65 //- The coefficients dictionary
66 const dictionary coeffDict_;
71 //- Runtime type information
72 TypeName("InflowBoundaryModel");
74 //- Declare runtime constructor selection table
75 declareRunTimeSelectionTable
81 const dictionary& dict,
90 //- Construct from dictionary
93 const dictionary& dict,
100 virtual ~InflowBoundaryModel();
104 static autoPtr<InflowBoundaryModel<CloudType> > New
106 const dictionary& dict,
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) \
138 defineNamedTemplateTypeNameAndDebug(InflowBoundaryModel<CloudType>, 0); \
140 defineTemplateRunTimeSelectionTable \
142 InflowBoundaryModel<CloudType>, \
147 #define makeInflowBoundaryModelType(SS, CloudType, ParcelType) \
149 defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
151 InflowBoundaryModel<CloudType<ParcelType> >:: \
152 adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
153 add##SS##CloudType##ParcelType##ConstructorToTable_;
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 # include "InflowBoundaryModel.C"
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 // ************************************************************************* //