CuthillMcKeeRenumber.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) 2011-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::CuthillMcKeeRenumber
26 
27 Description
28  Cuthill-McKee renumbering
29 
30 SourceFiles
31  CuthillMcKeeRenumber.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef CuthillMcKeeRenumber_H
36 #define CuthillMcKeeRenumber_H
37 
38 #include "renumberMethod.H"
39 #include "Switch.H"
40 
41 namespace Foam
42 {
43 
44 /*---------------------------------------------------------------------------*\
45  Class CuthillMcKeeRenumber Declaration
46 \*---------------------------------------------------------------------------*/
47 
49 :
50  public renumberMethod
51 {
52  // Private Data
53 
54  const Switch reverse_;
55 
56 
57 public:
58 
59  //- Runtime type information
60  TypeName("CuthillMcKee");
61 
62 
63  // Constructors
64 
65  //- Construct given the renumber dictionary
66  CuthillMcKeeRenumber(const dictionary& renumberDict);
67 
68  //- Disallow default bitwise copy construction
70 
71 
72  //- Destructor
73  virtual ~CuthillMcKeeRenumber()
74  {}
75 
76 
77  // Member Functions
78 
79  //- Return the order in which cells need to be visited, i.e.
80  // from ordered back to original cell label.
81  // This is only defined for geometric renumberMethods.
82  virtual labelList renumber(const pointField&) const
83  {
85  return labelList(0);
86  }
87 
88  //- Return the order in which cells need to be visited, i.e.
89  // from ordered back to original cell label.
90  // Use the mesh connectivity (if needed)
91  virtual labelList renumber
92  (
93  const polyMesh& mesh,
94  const pointField& cc
95  ) const;
96 
97  //- Return the order in which cells need to be visited, i.e.
98  // from ordered back to original cell label.
99  // Connectivity in losort addressing (= neighbour + offsets into
100  // neighbour)
101  virtual labelList renumber
102  (
103  const labelList& cellCells,
104  const labelList& offsets,
105  const pointField& cc
106  ) const;
107 
108  //- Return the order in which cells need to be visited, i.e.
109  // from ordered back to original cell label.
110  // The connectivity is equal to mesh.cellCells() except
111  // - the connections are across coupled patches
112  virtual labelList renumber
113  (
114  const labelListList& cellCells,
115  const pointField& cc
116  ) const;
117 
118 
119  // Member Operators
120 
121  //- Disallow default bitwise assignment
122  void operator=(const CuthillMcKeeRenumber&) = delete;
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
void operator=(const CuthillMcKeeRenumber &)=delete
Disallow default bitwise assignment.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
TypeName("CuthillMcKee")
Runtime type information.
CuthillMcKeeRenumber(const dictionary &renumberDict)
Construct given the renumber dictionary.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
Definition: Switch.H:60
virtual ~CuthillMcKeeRenumber()
Destructor.
Abstract base class for renumbering.
dynamicFvMesh & mesh
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited, i.e.
Cuthill-McKee renumbering.
List< label > labelList
A List of labels.
Definition: labelList.H:56
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:370
Namespace for OpenFOAM.