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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2015-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::decompositionConstraints::preserveFaceZones
28 
29 Description
30  Constraint to keep/move owner and neighbour of faceZone onto same
31  processor.
32 
33  \heading Dictionary parameters
34  \table
35  Property | Description | Required | Default
36  type | preserveFaceZones | yes |
37  zones | List of face zone names or regexs | yes |
38  \endtable
39 
40 SourceFiles
41  preserveFaceZonesConstraint.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef preserveFaceZonesConstraint_H
46 #define preserveFaceZonesConstraint_H
47 
49 #include "wordRes.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 namespace decompositionConstraints
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class preserveFaceZones Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 class preserveFaceZones
63 :
64  public decompositionConstraint
65 {
66  // Private data
67 
68  //- List of zones to keep together
69  wordRes zones_;
70 
71 
72 public:
73 
74  //- Runtime type information
75  TypeName("preserveFaceZones");
76 
77 
78  // Constructors
79 
80  //- Construct with constraint dictionary
81  explicit preserveFaceZones(const dictionary& dict);
82 
83  //- Construct from components
84  explicit preserveFaceZones(const UList<wordRe>& zones);
85 
86 
87  //- Destructor
88  virtual ~preserveFaceZones() = default;
89 
90 
91  // Member Functions
92 
93  //- Add my constraints to list of constraints
94  virtual void add
95  (
96  const polyMesh& mesh,
97  boolList& blockedFace,
98  PtrList<labelList>& specifiedProcessorFaces,
99  labelList& specifiedProcessor,
100  List<labelPair>& explicitConnections
101  ) const;
102 
103  //- Apply any additional post-decomposition constraints
104  virtual void apply
105  (
106  const polyMesh& mesh,
107  const boolList& blockedFace,
108  const PtrList<labelList>& specifiedProcessorFaces,
109  const labelList& specifiedProcessor,
110  const List<labelPair>& explicitConnections,
111  labelList& decomposition
112  ) const;
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace decompositionConstraints
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #endif
124 
125 // ************************************************************************* //
Foam::decompositionConstraints::preserveFaceZones::TypeName
TypeName("preserveFaceZones")
Runtime type information.
wordRes.H
Foam::decompositionConstraints::preserveFaceZones::apply
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.
Definition: preserveFaceZonesConstraint.C:131
Foam::decompositionConstraint
Abstract class for handling decomposition constraints.
Definition: decompositionConstraint.H:58
decompositionConstraint.H
Foam::decompositionConstraints::preserveFaceZones::preserveFaceZones
preserveFaceZones(const dictionary &dict)
Construct with constraint dictionary.
Definition: preserveFaceZonesConstraint.C:54
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::decompositionConstraints::preserveFaceZones::add
virtual void add(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add my constraints to list of constraints.
Definition: preserveFaceZonesConstraint.C:90
Foam::decompositionConstraints::preserveFaceZones
Constraint to keep/move owner and neighbour of faceZone onto same processor.
Definition: preserveFaceZonesConstraint.H:76
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::List< bool >
Foam::UList
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:103
Foam::wordRes
A List of wordRe with additional matching capabilities.
Definition: wordRes.H:51
Foam::decompositionConstraints::preserveFaceZones::~preserveFaceZones
virtual ~preserveFaceZones()=default
Destructor.