decompositionConstraint.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::decompositionConstraint
26 
27 Description
28 
29 SourceFiles
30  decompositionConstraint.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef decompositionConstraint_H
35 #define decompositionConstraint_H
36 
37 #include "dictionary.H"
38 #include "runTimeSelectionTables.H"
39 #include "boolList.H"
40 #include "labelList.H"
41 #include "labelPair.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 // Forward declaration of classes
49 class polyMesh;
50 
51 /*---------------------------------------------------------------------------*\
52  Class decompositionConstraint Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 {
57 protected:
58 
59  // Protected data
60 
61  //- Model coefficients dictionary
63 
64 
65 public:
66 
67  //- Runtime type information
68  TypeName("decompositionConstraint");
69 
70 
71  // Declare run-time constructor selection table
72 
74  (
75  autoPtr,
77  dictionary,
78  (
79  const dictionary& constraintsDict,
80  const word& type
81  ),
82  (constraintsDict, type)
83  );
84 
85 
86  // Constructors
87 
88  //- Construct with generic dictionary with optional entry for type
90  (
91  const dictionary& constraintsDict,
92  const word& type
93  );
94 
95  //- Disallow default bitwise copy construction
97 
98 
99  // Selectors
100 
101  //- Return a reference to the selected decompositionConstraint
103  (
104  const dictionary& constraintsDict,
105  const word& type
106  );
107 
108 
109  //- Destructor
110  virtual ~decompositionConstraint();
111 
112 
113  // Member Functions
114 
115  //- Add my constraints to list of constraints
116  virtual void add
117  (
118  const polyMesh& mesh,
119  boolList& blockedFace,
120  PtrList<labelList>& specifiedProcessorFaces,
121  labelList& specifiedProcessor,
122  List<labelPair>& explicitConnections
123  ) const = 0;
124 
125  //- Apply any additional post-decomposition constraints. Usually no
126  // need to do anything since decomposition method should have already
127  // obeyed the constraints
128  virtual void apply
129  (
130  const polyMesh& mesh,
131  const boolList& blockedFace,
132  const PtrList<labelList>& specifiedProcessorFaces,
133  const labelList& specifiedProcessor,
134  const List<labelPair>& explicitConnections,
135  labelList& decomposition
136  ) const
137  {}
138 
139 
140  // Member Operators
141 
142  //- Disallow default bitwise assignment
143  void operator=(const decompositionConstraint&) = delete;
144 };
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace Foam
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #endif
154 
155 // ************************************************************************* //
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
dictionary coeffDict_
Model coefficients dictionary.
static autoPtr< decompositionConstraint > New(const dictionary &constraintsDict, const word &type)
Return a reference to the selected decompositionConstraint.
decompositionConstraint(const dictionary &constraintsDict, const word &type)
Construct with generic dictionary with optional entry for type.
virtual void add(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const =0
Add my constraints to list of constraints.
TypeName("decompositionConstraint")
Runtime type information.
declareRunTimeSelectionTable(autoPtr, decompositionConstraint, dictionary,(const dictionary &constraintsDict, const word &type),(constraintsDict, type))
virtual ~decompositionConstraint()
Destructor.
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. Usually no.
void operator=(const decompositionConstraint &)=delete
Disallow default bitwise assignment.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
Macros to ease declaration of run-time selection tables.