preserveBafflesConstraint.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  Copyright (C) 2018 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::decompositionConstraints::preserveBaffles
29 
30 Description
31  Detects baffles and keeps owner and neighbour on same processor.
32 
33  \heading Dictionary parameters
34  \table
35  Property | Description | Required | Default
36  type | preserveBaffles | yes |
37  \endtable
38 
39 SourceFiles
40  preserveBafflesConstraint.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef preserveBafflesConstraint_H
45 #define preserveBafflesConstraint_H
46 
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 namespace decompositionConstraints
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class preserveBaffles Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 class preserveBaffles
61 :
62  public decompositionConstraint
63 {
64 public:
65 
66  //- Runtime type information
67  TypeName("preserveBaffles");
68 
69 
70  // Constructors
71 
72  //- Construct with constraint dictionary
73  explicit preserveBaffles(const dictionary& dict);
74 
75  //- Construct from components
77 
78 
79  //- Destructor
80  virtual ~preserveBaffles() = default;
81 
82 
83  // Member Functions
84 
85  //- Add my constraints to list of constraints
86  virtual void add
87  (
88  const polyMesh& mesh,
89  boolList& blockedFace,
90  PtrList<labelList>& specifiedProcessorFaces,
91  labelList& specifiedProcessor,
92  List<labelPair>& explicitConnections
93  ) const;
94 
95  //- Apply any additional post-decomposition constraints
96  virtual void apply
97  (
98  const polyMesh& mesh,
99  const boolList& blockedFace,
100  const PtrList<labelList>& specifiedProcessorFaces,
101  const labelList& specifiedProcessor,
102  const List<labelPair>& explicitConnections,
103  labelList& decomposition
104  ) const;
105 };
106 
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 } // End namespace decompositionConstraints
111 } // End namespace Foam
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #endif
116 
117 // ************************************************************************* //
Foam::decompositionConstraint
Abstract class for handling decomposition constraints.
Definition: decompositionConstraint.H:58
Foam::decompositionConstraints::preserveBaffles::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: preserveBafflesConstraint.C:183
decompositionConstraint.H
Foam::decompositionConstraints::preserveBaffles
Detects baffles and keeps owner and neighbour on same processor.
Definition: preserveBafflesConstraint.H:69
Foam::decompositionConstraints::preserveBaffles::preserveBaffles
preserveBaffles()
Construct from components.
Definition: preserveBafflesConstraint.C:71
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::decompositionConstraints::preserveBaffles::TypeName
TypeName("preserveBaffles")
Runtime type information.
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::decompositionConstraints::preserveBaffles::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: preserveBafflesConstraint.C:88
Foam::List< bool >
Foam::decompositionConstraints::preserveBaffles::~preserveBaffles
virtual ~preserveBaffles()=default
Destructor.