decompositionConstraint.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 | Copyright (C) 2015-2016 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 private:
65 
66  // Private Member Functions
67 
68  //- Disallow default bitwise copy construct
70 
71  //- Disallow default bitwise assignment
72  void operator=(const decompositionConstraint&);
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("decompositionConstraint");
79 
80 
81  // Declare run-time constructor selection table
82 
84  (
85  autoPtr,
87  dictionary,
88  (
89  const dictionary& constraintsDict,
90  const word& type
91  ),
92  (constraintsDict, type)
93  );
94 
95 
96  // Constructors
97 
98  //- Construct with generic dictionary with optional entry for type
100  (
101  const dictionary& constraintsDict,
102  const word& type
103  );
104 
105  // Selectors
106 
107  //- Return a reference to the selected decompositionConstraint
109  (
110  const dictionary& constraintsDict,
111  const word& type
112  );
113 
114 
115  //- Destructor
116  virtual ~decompositionConstraint();
117 
118 
119  // Member Functions
120 
121  //- Add my constraints to list of constraints
122  virtual void add
123  (
124  const polyMesh& mesh,
125  boolList& blockedFace,
126  PtrList<labelList>& specifiedProcessorFaces,
127  labelList& specifiedProcessor,
128  List<labelPair>& explicitConnections
129  ) const = 0;
130 
131  //- Apply any additional post-decomposition constraints. Usually no
132  // need to do anything since decomposition method should have already
133  // obeyed the constraints
134  virtual void apply
135  (
136  const polyMesh& mesh,
137  const boolList& blockedFace,
138  const PtrList<labelList>& specifiedProcessorFaces,
139  const labelList& specifiedProcessor,
140  const List<labelPair>& explicitConnections,
141  labelList& decomposition
142  ) const
143  {}
144 };
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace Foam
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #endif
154 
155 // ************************************************************************* //
TypeName("decompositionConstraint")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
dynamicFvMesh & mesh
A class for handling words, derived from string.
Definition: word.H:59
declareRunTimeSelectionTable(autoPtr, decompositionConstraint, dictionary,(const dictionary &constraintsDict, const word &type),(constraintsDict, type))
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.
dictionary coeffDict_
Model coefficients dictionary.
static autoPtr< decompositionConstraint > New(const dictionary &constraintsDict, const word &type)
Return a reference to the selected decompositionConstraint.
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:485
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.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:63
virtual ~decompositionConstraint()
Destructor.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Macros to ease declaration of run-time selection tables.
Namespace for OpenFOAM.