helperFunctionsFrontalMarking.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | cfMesh: A library for mesh generation
4  \\ / O peration |
5  \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6  \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of cfMesh.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  helperFunctionsPar
26 
27 Description
28  Functions used for exchanging data between processors
29 
30 SourceFiles
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef helperFunctionsFrontalMarking_H
35 #define helperFunctionsFrontalMarking_H
36 
37 #include "labelList.H"
38 #include "LongList.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 namespace help
46 {
47 
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
56 //- of the front
57 template<class labelListType, class neiOp, class filterOp>
58 void frontalMarking
59 (
60  labelListType& result,
61  const label startingIndex,
62  const neiOp& neighbourCalculator,
63  const filterOp& selector
64 );
65 
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>
77 (
78  labelListType& elementInGroup,
79  const neiOp& neighbourCalculator,
80  const filterOp& selector
81 );
82 
83 } // End namespace help
84 
85 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86 
87 } // End namespace Foam
88 
89 #ifdef NoRepository
91 #endif
92 
93 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94 
95 #endif
96 
97 // ************************************************************************* //
LongList.H
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::help::groupMarking
label groupMarking(labelListType &elementInGroup, const neiOp &neighbourCalculator, const filterOp &selector)
Definition: helperFunctionsFrontalMarking.C:155
labelList.H
Foam::help::frontalMarking
void frontalMarking(labelListType &result, const label startingIndex, const neiOp &neighbourCalculator, const filterOp &selector)
Definition: helperFunctionsFrontalMarking.C:50
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
helperFunctionsFrontalMarking.C