preservePatchesConstraint.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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::decompositionConstraints::preservePatches
29
30Description
31 Constraint to keep owner and neighbour of (cyclic) patch on same
32 processor.
33
34 \heading Dictionary parameters
35 \table
36 Property | Description | Required | Default
37 type | preservePatches | yes |
38 patches | List of patch names or regexs | yes |
39 \endtable
40
41SourceFiles
42 preservePatchesConstraint.C
43
44\*---------------------------------------------------------------------------*/
45
46#ifndef preservePatchesConstraint_H
47#define preservePatchesConstraint_H
48
50#include "wordRes.H"
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
56
57namespace decompositionConstraints
58{
59
60/*---------------------------------------------------------------------------*\
61 Class preservePatches Declaration
62\*---------------------------------------------------------------------------*/
63
64class preservePatches
65:
66 public decompositionConstraint
67{
68 // Private data
69
70 //- List of patches to keep together
71 wordRes patches_;
72
73
74public:
75
76 //- Runtime type information
77 TypeName("preservePatches");
79
80 // Constructors
81
82 //- Construct with constraint dictionary
83 explicit preservePatches(const dictionary& dict);
84
85 //- Construct from components
86 explicit preservePatches(const UList<wordRe>& patches);
87
88
89 //- Destructor
90 virtual ~preservePatches() = default;
92
93 // Member Functions
94
95 //- Add my constraints to list of constraints
96 virtual void add
97 (
98 const polyMesh& mesh,
99 boolList& blockedFace,
100 PtrList<labelList>& specifiedProcessorFaces,
101 labelList& specifiedProcessor,
102 List<labelPair>& explicitConnections
103 ) const;
105 //- Apply any additional post-decomposition constraints
106 virtual void apply
107 (
108 const polyMesh& mesh,
109 const boolList& blockedFace,
110 const PtrList<labelList>& specifiedProcessorFaces,
111 const labelList& specifiedProcessor,
112 const List<labelPair>& explicitConnections,
113 labelList& decomposition
114 ) const;
115};
116
117
118// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119
120} // End namespace decompositionConstraints
121} // End namespace Foam
122
123// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124
125#endif
126
127// ************************************************************************* //
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: UList.H:94
Abstract class for handling decomposition constraints.
Constraint to keep owner and neighbour of (cyclic) patch on same processor.
TypeName("preservePatches")
Runtime type information.
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.
virtual void add(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add my constraints to list of constraints.
virtual ~preservePatches()=default
Destructor.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
A List of wordRe with additional matching capabilities.
Definition: wordRes.H:54
const polyBoundaryMesh & patches
dynamicFvMesh & mesh
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73