1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of cfMesh.
11 cfMesh 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 cfMesh 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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
28 Functions used for exchanging data between processors
32 \*---------------------------------------------------------------------------*/
34 #ifndef helperFunctionsFrontalMarking_H
35 #define helperFunctionsFrontalMarking_H
37 #include "labelList.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 //- template implementation of the fron-marking algorithm
49 //- labelListType contains indices of elements satisfying the filtering criteria
50 //- startingIndex is the first element from where the search is started
51 //- neiOp determines which neighbouring elements are available. It requires
52 //- an operator neiOp(const label, DynList<label>&) to be defined
53 //- filterOp determines which neighbouring elements shall be stored
54 //- in the result and used in the front. It requires an operator
55 //- bool filterOp(const label) which return true if the element shall be part
57 template<class labelListType, class neiOp, class filterOp>
60 labelListType& result,
61 const label startingIndex,
62 const neiOp& neighbourCalculator,
63 const filterOp& selector
66 //- templated implementation of functionality for finding discrete groups
67 //- of elements depending on the user-defined criteria
68 //- the first argument is the result of the operation. Each element is assigned
69 //- to a group amd the ones failing the critearia are set to -1
70 //- neiOp is the functionality for determining neighbours of the currently
71 //- processed front element. This class requires an operator
72 //- neiOp(const label, DynList<label>&)
73 //- filterOp represents the user-defined criteria and shall have an operator
74 //- bool filterOp(const label)
75 template<class labelListType, class neiOp, class filterOp>
78 labelListType& elementInGroup,
79 const neiOp& neighbourCalculator,
80 const filterOp& selector
83 } // End namespace help
85 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87 } // End namespace Foam
90 # include "helperFunctionsFrontalMarking.C"
93 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97 // ************************************************************************* //