1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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::LocalInteraction
29 Patch interaction specified on a patch-by-patch basis
31 \*---------------------------------------------------------------------------*/
33 #ifndef LocalInteraction_H
34 #define LocalInteraction_H
36 #include "PatchInteractionModel.H"
37 #include "patchInteractionData.H"
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 /*---------------------------------------------------------------------------*\
44 Class LocalInteraction Declaration
45 \*---------------------------------------------------------------------------*/
47 template<class CloudType>
48 class LocalInteraction
50 public PatchInteractionModel<CloudType>
54 //- List of participating patches
55 const List<patchInteractionData> patchData_;
57 //- List of participating patch ids
58 List<label> patchIds_;
61 // Private member functions
63 //- Returns local patchI if patch is in patchIds_ list
64 label applyToPatch(const label globalPatchI) const;
70 //- Runtime type information
71 TypeName("LocalInteraction");
76 //- Construct from dictionary
77 LocalInteraction(const dictionary& dict, CloudType& cloud);
81 virtual ~LocalInteraction();
86 //- Flag to indicate whether model activates patch interaction model
87 virtual bool active() const;
89 //- Apply velocity correction
90 // Returns true if particle remains in same cell
101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103 } // End namespace Foam
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 # include "LocalInteraction.C"
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 // ************************************************************************* //