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