All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
preservePatchesConstraint.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2015-2019 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::decompositionConstraints::preservePatchesConstraint
26 
27 Description
28  Constraint to keep owner and neighbour of (cyclic) patch on same
29  processor.
30 
31 SourceFiles
32  preservePatchesConstraint.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef preservePatchesConstraint_H
37 #define preservePatchesConstraint_H
38 
40 #include "wordReList.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 namespace decompositionConstraints
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class preservePatchesConstraint Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
57 {
58  // Private Data
59 
60  //- List of patches to keep together
61  wordReList patches_;
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("preservePatches");
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 
84  //- Destructor
86  {}
87 
88 
89  // Member Functions
90 
91  //- Add my constraints to list of constraints
92  virtual void add
93  (
94  const polyMesh& mesh,
95  boolList& blockedFace,
96  PtrList<labelList>& specifiedProcessorFaces,
97  labelList& specifiedProcessor,
98  List<labelPair>& explicitConnections
99  ) const;
100 
101  //- Apply any additional post-decomposition constraints
102  virtual void apply
103  (
104  const polyMesh& mesh,
105  const boolList& blockedFace,
106  const PtrList<labelList>& specifiedProcessorFaces,
107  const labelList& specifiedProcessor,
108  const List<labelPair>& explicitConnections,
109  labelList& decomposition
110  ) const;
111 };
112 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace decompositionConstraints
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
TypeName("preservePatches")
Runtime type information.
patches[0]
virtual void add(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add my constraints to list of constraints.
dynamicFvMesh & mesh
A class for handling words, derived from string.
Definition: word.H:59
Constraint to keep owner and neighbour of (cyclic) patch on same processor.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
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.
preservePatchesConstraint(const dictionary &constraintsDict, const word &type)
Construct with generic dictionary with optional entry for type.
Namespace for OpenFOAM.