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