refinementHistoryConstraint.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::refinementHistory
29 
30 Description
31  Constraint to keep all cells originating from refining the same cell
32  onto the same processor. Reads polyMesh/refinementHistory.
33 
34  \heading Dictionary parameters
35  \table
36  Property | Description | Required | Default
37  type | refinementHistory | yes |
38  \endtable
39 
40 SourceFiles
41  refinementHistoryConstraint.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef refinementHistoryConstraint_H
46 #define refinementHistoryConstraint_H
47 
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 namespace decompositionConstraints
55 {
56 
57 /*---------------------------------------------------------------------------*\
58  Class refinementHistory Declaration
59 \*---------------------------------------------------------------------------*/
60 
61 class refinementHistory
62 :
63  public decompositionConstraint
64 {
65 public:
66 
67  //- Runtime type information
68  TypeName("refinementHistory");
69 
70 
71  // Constructors
72 
73  //- Construct with constraint dictionary
74  explicit refinementHistory(const dictionary& dict);
75 
76  //- Construct from components
78 
79 
80  //- Destructor
81  virtual ~refinementHistory() = default;
82 
83 
84  // Member Functions
85 
86  //- Add this constraint to list of constraints
87  virtual void add
88  (
89  const polyMesh& mesh,
90  boolList& blockedFace,
91  PtrList<labelList>& specifiedProcessorFaces,
92  labelList& specifiedProcessor,
93  List<labelPair>& explicitConnections
94  ) const;
95 
96  //- Apply this constraint post-decomposition
97  virtual void apply
98  (
99  const polyMesh& mesh,
100  const boolList& blockedFace,
101  const PtrList<labelList>& specifiedProcessorFaces,
102  const labelList& specifiedProcessor,
103  const List<labelPair>& explicitConnections,
104  labelList& decomposition
105  ) const;
106 };
107 
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace decompositionConstraints
112 } // End namespace Foam
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #endif
117 
118 // ************************************************************************* //
Foam::decompositionConstraint
Abstract class for handling decomposition constraints.
Definition: decompositionConstraint.H:58
Foam::decompositionConstraints::refinementHistory::TypeName
TypeName("refinementHistory")
Runtime type information.
decompositionConstraint.H
Foam::decompositionConstraints::refinementHistory::add
virtual void add(const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add this constraint to list of constraints.
Definition: refinementHistoryConstraint.C:84
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::decompositionConstraints::refinementHistory::~refinementHistory
virtual ~refinementHistory()=default
Destructor.
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::refinementHistory
Constraint to keep all cells originating from refining the same cell onto the same processor....
Definition: refinementHistoryConstraint.H:70
Foam::List< bool >
Foam::decompositionConstraints::refinementHistory::refinementHistory
refinementHistory()
Construct from components.
Definition: refinementHistoryConstraint.C:69
Foam::decompositionConstraints::refinementHistory::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 this constraint post-decomposition.
Definition: refinementHistoryConstraint.C:153