preserveBafflesConstraint.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-2020 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::preserveBafflesConstraint
26 
27 Description
28  Detects baffles and keeps owner and neighbour on same processor.
29 
30 SourceFiles
31  preserveBafflesConstraint.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef preserveBafflesConstraint_H
36 #define preserveBafflesConstraint_H
37 
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 namespace decompositionConstraints
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class preserveBafflesConstraint Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
55 {
56  // Private Data
57 
58 public:
59 
60  //- Runtime type information
61  TypeName("preserveBaffles");
62 
63 
64  // Constructors
65 
66  //- Construct with generic dictionary with optional entry for type
68  (
69  const dictionary& constraintsDict,
70  const word& type
71  );
72 
73  //- Construct from components
75 
76 
77  //- Destructor
79  {}
80 
81 
82  // Member Functions
83 
84  //- Add my constraints to list of constraints
85  virtual void add
86  (
87  const polyMesh& mesh,
88  boolList& blockedFace,
89  PtrList<labelList>& specifiedProcessorFaces,
90  labelList& specifiedProcessor,
91  List<labelPair>& explicitConnections
92  ) const;
93 
94  //- Apply any additional post-decomposition constraints
95  virtual void apply
96  (
97  const polyMesh& mesh,
98  const boolList& blockedFace,
99  const PtrList<labelList>& specifiedProcessorFaces,
100  const labelList& specifiedProcessor,
101  const List<labelPair>& explicitConnections,
102  labelList& decomposition
103  ) const;
104 };
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace decompositionConstraints
110 } // End namespace Foam
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #endif
115 
116 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
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.
Detects baffles and keeps owner and neighbour on same processor.
dynamicFvMesh & mesh
A class for handling words, derived from string.
Definition: word.H:59
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
TypeName("preserveBaffles")
Runtime type information.
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.