fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / src / lagrangian / intermediate / submodels / Kinematic / PatchInteractionModel / LocalInteraction / patchInteractionData.H
blob7fc83ac2608d9d86f7f07fe9cba1c9bb916f7d51
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by original author
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::patchInteractionData
28 Description
29     Helper class for the LocalInteraction patch interaction model
31 \*---------------------------------------------------------------------------*/
33 #ifndef patchInteractionData_H
34 #define patchInteractionData_H
36 #include "Istream.H"
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 namespace Foam
42 /*---------------------------------------------------------------------------*\
43                     Class patchInteractionData Declaration
44 \*---------------------------------------------------------------------------*/
46 // Forward declaration of classes
47 class patchInteractionData;
49 // Forward declaration of friend functions
50 Istream& operator>>
52     Istream& is,
53     patchInteractionData& pid
57 class patchInteractionData
59     // Private data
61         //- Interaction type name
62         word interactionTypeName_;
64         //- Patch name
65         word patchName_;
67         //- Elasticity coefficient
68         scalar e_;
70         //- Restitution coefficient
71         scalar mu_;
74 public:
76     // Constructor
78         //- Construct null
79         patchInteractionData();
82     // Member functions
84         // Access
86             //- Return const access to the interaction type name
87             const word& interactionTypeName() const;
89             //- Return const access to the patch name
90             const word& patchName() const;
92             //- Return const access to the elasticity coefficient
93             scalar e() const;
95             //- Return const access to the restitution coefficient
96             scalar mu() const;
99         // I-O
101             //- Istream operator
102             friend Istream& operator>>
103             (
104                 Istream& is,
105                 patchInteractionData& pid
106             );
107 /*            {
108                 is.check
109                 (
110                     "Istream& operator>>"
111                     "(Istream&, patchInteractionData&)"
112                 );
114                 const dictionaryEntry entry(dictionary::null, is);
116                 pid.patchName_ = entry.keyword();
117                 entry.lookup("type") >> pid.interactionTypeName_;
118                 pid.e_ = entry.lookupOrDefault<scalar>("e", 1.0);
119                 pid.mu_ = entry.lookupOrDefault<scalar>("mu", 0.0);
121                 if
122                 (
123                     PatchInteractionModel<CloudType>::wordToInteractionType
124                     (
125                         pid.interactionTypeName_
126                     )
127                 == PatchInteractionModel<CloudType>::itOther)
128                 {
129                     FatalErrorIn
130                     (
131                         "friend Istream& operator>>"
132                         "("
133                             "Istream&, "
134                             "patchInteractionData&"
135                         ")"
136                     )   << "Unknown patch interaction type "
137                         << pid.interactionTypeName_
138                         << ". Valid selections are:"
139                         << PatchInteractionModel<CloudType>::
140                         interactionTypeNames_
141                         << endl << abort(FatalError);
142                 }
144                 return is;
145             }
146 */};
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 } // End namespace Foam
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 #endif
157 // ************************************************************************* //