/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . Class Foam::PointEdgeWave Description Wave propagation of information through grid. Every iteration information goes through one layer of edges. Templated on information that is transferred. Templated on information that is transferred. Handles parallel and cyclics. Only parallel reasonably tested. Cyclics hardly tested. Note: whether to propagate depends on the return value of Type::update which returns true (i.e. propagate) if the value changes by more than a certain tolerance. Note: parallel is done in two steps: -# transfer patch points in offset notation, i.e. every patch point is denoted by a patchface label and an index in this face. Receiving end uses that fact that f[0] is shared and order is reversed. -# do all non-local shared points by means of reduce of data on them. Note: cyclics is with offset in patchface as well. Patch is divided into two sub patches and the point-point addressing is never explicitly calculated but instead use is made of the face-face correspondence. (it probably is more efficient to calculate a point-point correspondence at the start and then reuse this; task to be done) SourceFiles PointEdgeWave.C \*---------------------------------------------------------------------------*/ #ifndef PointEdgeWave_H #define PointEdgeWave_H #include "label.H" #include "boolList.H" #include "scalarField.H" #include "pointFields.H" #include "tensor.H" #include "primitivePatch.H" #include "PtrList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { // Forward declaration of classes class polyMesh; /*---------------------------------------------------------------------------*\ Class PointEdgeWaveName Declaration \*---------------------------------------------------------------------------*/ TemplateName(PointEdgeWave); /*---------------------------------------------------------------------------*\ Class PointEdgeWave Declaration \*---------------------------------------------------------------------------*/ template class PointEdgeWave : public PointEdgeWaveName { // Private static data //- Relative tolerance. Stop propagation if relative changes // less than this tolerance (responsability for checking this is // up to Type implementation) static scalar propagationTol_; // Private data //- Reference to mesh const polyMesh& mesh_; //- Wall information for all points List& allPointInfo_; //- Information on all mesh edges List& allEdgeInfo_; //- Has point changed boolList changedPoint_; //- List of changed points labelList changedPoints_; //- Number of changed points label nChangedPoints_; //- Edges that have changed boolList changedEdge_; labelList changedEdges_; label nChangedEdges_; //- Number of cyclic patches label nCyclicPatches_; //- For every cyclic patch two primitivePatches PtrList cycHalves_; //- Number of evaluations label nEvals_; //- Number of unvisited edges/points label nUnvisitedPoints_; label nUnvisitedEdges_; // Private Member Functions //- Add value to all elements of labelList static void offset(const label val, labelList& elems); //- Adapt pointInfo for leaving domain void leaveDomain ( const polyPatch& meshPatch, const primitivePatch& patch, const List