preserveFaceZonesConstraint.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::preserveFaceZonesConstraint
26 
27 Description
28  Constraint to keep/move owner and neighbour of faceZone onto same
29  processor.
30 
31 SourceFiles
32  preserveFaceZonesConstraint.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef preserveFaceZonesConstraint_H
37 #define preserveFaceZonesConstraint_H
38 
40 #include "wordReList.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 namespace decompositionConstraints
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class preserveFaceZonesConstraint Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
57 {
58  // Private data
59 
60  //- List of zones to keep together
61  wordReList zones_;
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("preserveFaceZones");
68 
69 
70  // Constructors
71 
72  //- Construct with generic dictionary with optional entry for type
74  (
75  const dictionary& constraintsDict,
76  const word& type
77  );
78 
79  //- Construct from components
81 
82 
83  //- Destructor
85  {}
86 
87 
88  // Member Functions
89 
90  //- Add my constraints to list of constraints
91  virtual void add
92  (
93  const polyMesh& mesh,
94  boolList& blockedFace,
95  PtrList<labelList>& specifiedProcessorFaces,
96  labelList& specifiedProcessor,
97  List<labelPair>& explicitConnections
98  ) const;
99 
100  //- Apply any additional post-decomposition constraints
101  virtual void apply
102  (
103  const polyMesh& mesh,
104  const boolList& blockedFace,
105  const PtrList<labelList>& specifiedProcessorFaces,
106  const labelList& specifiedProcessor,
107  const List<labelPair>& explicitConnections,
108  labelList& decomposition
109  ) const;
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace decompositionConstraints
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #endif
121 
122 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual void apply(const polyMesh &mesh, const boolList &blockedFace, const PtrList< labelList > &specifiedProcessorFaces, const labelList &specifiedProcessor, const List< labelPair > &explicitConnections, labelList &decomposition) const
Apply any additional post-decomposition constraints.
TypeName("preserveFaceZones")
Runtime type information.
dynamicFvMesh & mesh
A class for handling words, derived from string.
Definition: word.H:59
preserveFaceZonesConstraint(const dictionary &constraintsDict, const word &type)
Construct with generic dictionary with optional entry for type.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:461
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:62
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
virtual void add(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add my constraints to list of constraints.
Namespace for OpenFOAM.