1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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
29 FaceCellWave plus data
34 \*---------------------------------------------------------------------------*/
39 #include "FaceCellWave.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class MeshWaveName Declaration
48 \*---------------------------------------------------------------------------*/
50 TemplateName(MeshWave);
53 /*---------------------------------------------------------------------------*\
54 Class MeshWave Declaration
55 \*---------------------------------------------------------------------------*/
64 //- Wall information for all faces
65 List<Type> allFaceInfo_;
67 //- Wall information for all cells
68 List<Type> allCellInfo_;
70 //- Wave calculation engine.
71 FaceCellWave<Type> calc_;
73 // Private Member Functions
75 //- Disallow default bitwise copy construct
76 MeshWave(const MeshWave&);
78 //- Disallow default bitwise assignment
79 void operator=(const MeshWave&);
85 //- Construct from mesh and list of changed faces with the Type
86 // for these faces. Iterates until nothing changes or maxIter reached.
91 const labelList& initialChangedFaces,
92 const List<Type>& changedFacesInfo,
96 //- Construct from mesh, list of changed faces with the Type
97 // for these faces and initial field.
98 // Iterates until nothing changes or maxIter reached.
102 const polyMesh& mesh,
103 const labelList& initialChangedFaces,
104 const List<Type>& changedFacesInfo,
105 const List<Type>& allCellInfo,
113 const List<Type>& allFaceInfo() const
119 const List<Type>& allCellInfo() const
125 //- Iterate until no changes or maxIter reached. Returns number of
126 // unset cells (see getUnsetCells)
127 label iterate(const label maxIter)
129 return calc_.iterate(maxIter);
132 //- Get number of unvisited cells, i.e. cells that were not (yet)
133 // reached from walking across mesh. This can happen from
134 // - not enough iterations done
135 // - a disconnected mesh
136 // - a mesh without walls in it
137 label getUnsetCells() const
139 return calc_.getUnsetCells();
142 //- Get number of unvisited faces
143 label getUnsetFaces() const
145 return calc_.getUnsetFaces();
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 } // End namespace Foam
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 # include "MeshWave.C"
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 // ************************************************************************* //