SloanRenumber.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) 2012-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::SloanRenumber
26 
27 Description
28  Sloan renumbering algorithm
29 
30  E.g. http://www.apav.it/sito_ratio/file_pdf/ratio_4/capitolo_1.pdf
31 
32 SourceFiles
33  SloanRenumber.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef SloanRenumber_H
38 #define SloanRenumber_H
39 
40 #include "renumberMethod.H"
41 #include "Switch.H"
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class SloanRenumber Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 class SloanRenumber
51 :
52  public renumberMethod
53 {
54  // Private Data
55 
56  const Switch reverse_;
57 
58 
59 public:
60 
61  //- Runtime type information
62  TypeName("Sloan");
63 
64 
65  // Constructors
66 
67  //- Construct given the renumber dictionary
68  SloanRenumber(const dictionary& renumberDict);
69 
70  //- Disallow default bitwise copy construction
71  SloanRenumber(const SloanRenumber&) = delete;
72 
73 
74  //- Destructor
75  virtual ~SloanRenumber()
76  {}
77 
78 
79  // Member Functions
80 
81  //- Return the order in which cells need to be visited, i.e.
82  // from ordered back to original cell label.
83  // This is only defined for geometric renumberMethods.
84  virtual labelList renumber(const pointField&) const
85  {
87  return labelList(0);
88  }
89 
90  //- Return the order in which cells need to be visited, i.e.
91  // from ordered back to original cell label.
92  // Use the mesh connectivity (if needed)
93  virtual labelList renumber
94  (
95  const polyMesh& mesh,
96  const pointField& cc
97  ) const;
98 
99  //- Return the order in which cells need to be visited, i.e.
100  // from ordered back to original cell label.
101  // The connectivity is equal to mesh.cellCells() except
102  // - the connections are across coupled patches
103  virtual labelList renumber
104  (
105  const labelListList& cellCells,
106  const pointField& cc
107  ) const;
108 
109 
110  // Member Operators
111 
112  //- Disallow default bitwise assignment
113  void operator=(const SloanRenumber&) = delete;
114 };
115 
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #endif
124 
125 // ************************************************************************* //
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited, i.e.
Definition: SloanRenumber.H:83
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
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
Sloan renumbering algorithm.
Definition: SloanRenumber.H:49
Abstract base class for renumbering.
virtual ~SloanRenumber()
Destructor.
Definition: SloanRenumber.H:74
dynamicFvMesh & mesh
void operator=(const SloanRenumber &)=delete
Disallow default bitwise assignment.
TypeName("Sloan")
Runtime type information.
SloanRenumber(const dictionary &renumberDict)
Construct given the renumber dictionary.
Definition: SloanRenumber.C:90
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.