CuthillMcKeeRenumber.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) 2011-2015 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  // Private Member Functions
58 
59  //- Disallow default bitwise copy construct and assignment
60  void operator=(const CuthillMcKeeRenumber&);
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("CuthillMcKee");
68 
69 
70  // Constructors
71 
72  //- Construct given the renumber dictionary
73  CuthillMcKeeRenumber(const dictionary& renumberDict);
74 
75 
76  //- Destructor
77  virtual ~CuthillMcKeeRenumber()
78  {}
79 
80 
81  // Member Functions
82 
83  //- Return the order in which cells need to be visited, i.e.
84  // from ordered back to original cell label.
85  // This is only defined for geometric renumberMethods.
86  virtual labelList renumber(const pointField&) const
87  {
89  return labelList(0);
90  }
91 
92  //- Return the order in which cells need to be visited, i.e.
93  // from ordered back to original cell label.
94  // Use the mesh connectivity (if needed)
95  virtual labelList renumber
96  (
97  const polyMesh& mesh,
98  const pointField& cc
99  ) const;
100 
101  //- Return the order in which cells need to be visited, i.e.
102  // from ordered back to original cell label.
103  // Connectivity in losort addressing (= neighbour + offsets into
104  // neighbour)
105  virtual labelList renumber
106  (
107  const labelList& cellCells,
108  const labelList& offsets,
109  const pointField& cc
110  ) const;
111 
112  //- Return the order in which cells need to be visited, i.e.
113  // from ordered back to original cell label.
114  // The connectivity is equal to mesh.cellCells() except
115  // - the connections are across coupled patches
116  virtual labelList renumber
117  (
118  const labelListList& cellCells,
119  const pointField& cc
120  ) const;
121 };
122 
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 } // End namespace Foam
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #endif
131 
132 // ************************************************************************* //
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited, i.e.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
TypeName("CuthillMcKee")
Runtime type information.
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.
Definition: Switch.H:60
virtual ~CuthillMcKeeRenumber()
Destructor.
Abstract base class for renumbering.
dynamicFvMesh & mesh
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:366
Namespace for OpenFOAM.