1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
28 FaceCellWave plus data
33 \*---------------------------------------------------------------------------*/
38 #include "FaceCellWave.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class MeshWaveName Declaration
47 \*---------------------------------------------------------------------------*/
49 TemplateName(MeshWave);
52 /*---------------------------------------------------------------------------*\
53 Class MeshWave Declaration
54 \*---------------------------------------------------------------------------*/
63 //- Wall information for all faces
64 List<Type> allFaceInfo_;
66 //- Wall information for all cells
67 List<Type> allCellInfo_;
69 //- Wave calculation engine.
70 FaceCellWave<Type> calc_;
72 // Private Member Functions
74 //- Disallow default bitwise copy construct
75 MeshWave(const MeshWave&);
77 //- Disallow default bitwise assignment
78 void operator=(const MeshWave&);
84 //- Construct from mesh and list of changed faces with the Type
85 // for these faces. Iterates until nothing changes or maxIter reached.
90 const labelList& initialChangedFaces,
91 const List<Type>& changedFacesInfo,
95 //- Construct from mesh, list of changed faces with the Type
96 // for these faces and initial field.
97 // Iterates until nothing changes or maxIter reached.
101 const polyMesh& mesh,
102 const labelList& initialChangedFaces,
103 const List<Type>& changedFacesInfo,
104 const List<Type>& allCellInfo,
112 const List<Type>& allFaceInfo() const
118 const List<Type>& allCellInfo() const
124 //- Iterate until no changes or maxIter reached. Returns number of
125 // unset cells (see getUnsetCells)
126 label iterate(const label maxIter)
128 return calc_.iterate(maxIter);
131 //- Get number of unvisited cells, i.e. cells that were not (yet)
132 // reached from walking across mesh. This can happen from
133 // - not enough iterations done
134 // - a disconnected mesh
135 // - a mesh without walls in it
136 label getUnsetCells() const
138 return calc_.getUnsetCells();
141 //- Get number of unvisited faces
142 label getUnsetFaces() const
144 return calc_.getUnsetFaces();
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 } // End namespace Foam
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 # include "MeshWave.C"
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 // ************************************************************************* //