FreeFOAM The Cross-Platform CFD Toolkit
MeshWave.C
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) 1991-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 Description
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "MeshWave.H"
29 #include <OpenFOAM/polyMesh.H>
32 #include <OpenFOAM/OPstream.H>
33 #include <OpenFOAM/IPstream.H>
35 #include <OpenFOAM/debug.H>
36 #include <OpenFOAM/typeInfo.H>
37 
38 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
39 
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
43 // Iterate, propagating changedFacesInfo across mesh, until no change (or
44 // maxIter reached).
45 template <class Type>
47 (
48  const polyMesh& mesh,
49  const labelList& changedFaces,
50  const List<Type>& changedFacesInfo,
51  const label maxIter
52 )
53 :
54  allFaceInfo_(mesh.nFaces()),
55  allCellInfo_(mesh.nCells()),
56  calc_
57  (
58  mesh,
59  changedFaces,
60  changedFacesInfo,
61  allFaceInfo_,
62  allCellInfo_,
63  maxIter
64  )
65 {}
66 
67 
68 // Iterate, propagating changedFacesInfo across mesh, until no change (or
69 // maxIter reached). Initial cell values specified.
70 template <class Type>
72 (
73  const polyMesh& mesh,
74  const labelList& changedFaces,
75  const List<Type>& changedFacesInfo,
76  const List<Type>& allCellInfo,
77  const label maxIter
78 )
79 :
80  allFaceInfo_(mesh.nFaces()),
81  allCellInfo_(allCellInfo),
82  calc_
83  (
84  mesh,
85  changedFaces,
86  changedFacesInfo,
87  allFaceInfo_,
88  allCellInfo_,
89  maxIter
90  )
91 {}
92 
93 
94 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
95 
96 
97 // ************************ vim: set sw=4 sts=4 et: ************************ //