FreeFOAM The Cross-Platform CFD Toolkit
interactionLists.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::interactionLists
26 
27 Description
28 
29 SourceFiles
30  interactionListsI.H
31  interactionLists.C
32  interactionListsIO.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef interactionLists_H
37 #define interactionLists_H
38 
39 #include <OpenFOAM/polyMesh.H>
40 #include <OpenFOAM/vector2D.H>
42 #include <molecule/referredCell.H>
46 
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class interactionLists Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 {
59  // Private data
60 
61  const polyMesh& mesh_;
62 
63  scalar rCutMaxSqr_;
64 
66 
67  referredCellList ril_;
68 
69  List<sendingReferralList> cellSendingReferralLists_;
70 
71  List<receivingReferralList> cellReceivingReferralLists_;
72 
73 
74  // Private Member Functions
75 
76  //- Build referralLists which define how to send information
77  // to referredCells to source cells
78  void buildCellReferralLists();
79 
80  //- Disallow default bitwise copy construct
82 
83  //- Disallow default bitwise assignment
84  void operator=(const interactionLists&);
85 
86 
87 public:
88 
89  // Static data members
90 
91  //- Tolerance for checking that faces on a patch segment
92  static scalar transTol;
93 
94 
95  // Constructors
96 
97  //- Construct and create all information from the mesh
99  (
100  const polyMesh& mesh,
101  scalar rCutMaxSqr,
102  bool pointPointListBuild = false
103  );
104 
105  //- Construct from file
107 
108 
109  // Destructor
110 
112 
113 
114  // Member Functions
115 
117  (
118  const label ptI,
119  const label ptJ
120  ) const;
121 
123  (
124  const label p,
125  const label faceNo
126  ) const;
127 
129  (
130  const label p,
131  const referredCell& refCell
132  ) const;
133 
135  (
136  const vectorList& pointsToTest,
137  const label faceNo
138  ) const;
139 
141  (
142  const vector& p,
143  const label faceNo
144  ) const;
145 
147  (
148  const vector& p,
149  const labelList& faceToTest,
150  const vectorList& points,
151  const vector& faceC,
152  const vector& faceA
153  ) const;
154 
156  (
157  const edge& eI,
158  const edge& eJ
159  ) const;
160 
162  (
163  const edge& eI,
164  const vector& eJs,
165  const vector& eJe
166  ) const;
167 
169  (
170  const labelList& segmentFaces,
171  const labelList& segmentEdges,
172  const labelList& segmentPoints
173  ) const;
174 
176  (
177  const List<referredCell>& referredInteractionList,
178  const labelList& segmentFaces,
179  const labelList& segmentEdges,
180  const labelList& segmentPoints
181  ) const;
182 
183 
184  // Access
185 
186  inline const polyMesh& mesh() const;
187 
188  inline const directInteractionList& dil() const;
189 
190  inline const referredCellList& ril() const;
191  inline referredCellList& ril();
192 
193  inline const List<sendingReferralList>&
194  cellSendingReferralLists() const;
195 
196  inline const List<receivingReferralList>&
198 
199  inline label nInteractingProcs() const;
200 };
201 
202 
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 
205 } // End namespace Foam
206 
207 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208 
209 #include "interactionListsI.H"
210 
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212 
213 #endif
214 
215 // ************************ vim: set sw=4 sts=4 et: ************************ //