initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / lagrangian / intermediate / submodels / Kinematic / InjectionModel / NoInjection / NoInjection.H
blob935dca80e177a9ea1a3940579a4d263d92f2c7c1
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-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::NoInjection
28 Description
29     Place holder for 'none' option
31 SourceFiles
32     NoInjection.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef NoInjection_H
37 #define NoInjection_H
39 #include "InjectionModel.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                        Class NoInjection Declaration
48 \*---------------------------------------------------------------------------*/
50 template<class CloudType>
51 class NoInjection
53     public InjectionModel<CloudType>
55 protected:
57     // Protected member functions
59         //- Number of parcels to introduce over the time step relative to SOI
60         label parcelsToInject
61         (
62             const scalar,
63             const scalar
64         ) const;
66         //- Volume of parcels to introduce over the time step relative to SOI
67         scalar volumeToInject
68         (
69             const scalar,
70             const scalar
71         ) const;
74 public:
76     //- Runtime type information
77     TypeName("none");
80     // Constructors
82         //- Construct from components
83         NoInjection
84         (
85             const dictionary&,
86             CloudType&
87         );
90     //- Destructor
91     virtual ~NoInjection();
94     // Member Functions
96         //- Flag to indicate whether model activates injection model
97         bool active() const;
99         //- Return the end-of-injection time
100         scalar timeEnd() const;
103         // Injection geometry
105             //- Set the injection position and owner cell
106             virtual void setPositionAndCell
107             (
108                 const label parcelI,
109                 const label nParcels,
110                 const scalar time,
111                 vector& position,
112                 label& cellOwner
113             );
115             virtual void setProperties
116             (
117                 const label parcelI,
118                 const label nParcels,
119                 const scalar time,
120                 typename CloudType::parcelType& parcel
121             );
123             //- Flag to identify whether model fully describes the parcel
124             virtual bool fullyDescribed() const;
126             //- Return flag to identify whether or not injection of parcelI is
127             //  permitted
128             virtual bool validInjection(const label parcelI);
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 } // End namespace Foam
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 #ifdef NoRepository
139 #   include "NoInjection.C"
140 #endif
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 #endif
146 // ************************************************************************* //