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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2012-2015 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::SloanRenumber
28 
29 Description
30  Sloan renumbering algorithm
31 
32  E.g. http://www.apav.it/sito_ratio/file_pdf/ratio_4/capitolo_1.pdf
33 
34 SourceFiles
35  SloanRenumber.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef SloanRenumber_H
40 #define SloanRenumber_H
41 
42 #include "renumberMethod.H"
43 #include "Switch.H"
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class SloanRenumber Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class SloanRenumber
53 :
54  public renumberMethod
55 {
56  // Private data
57 
58  const bool reverse_;
59 
60 
61  // Private Member Functions
62 
63  //- No copy construct
64  SloanRenumber(const SloanRenumber&) = delete;
65 
66  //- No copy assignment
67  void operator=(const SloanRenumber&) = delete;
68 
69 
70 public:
71 
72  //- Runtime type information
73  TypeName("Sloan");
74 
75 
76  // Constructors
77 
78  //- Construct given the renumber dictionary
79  SloanRenumber(const dictionary& renumberDict);
80 
81 
82  //- Destructor
83  virtual ~SloanRenumber() = default;
84 
85 
86  // Member Functions
87 
88  //- Return the order in which cells need to be visited, i.e.
89  // from ordered back to original cell label.
90  // This is only defined for geometric renumberMethods.
91  virtual labelList renumber(const pointField&) const
92  {
94  return labelList(0);
95  }
96 
97  //- Return the order in which cells need to be visited, i.e.
98  // from ordered back to original cell label.
99  // Use the mesh connectivity (if needed)
100  virtual labelList renumber
101  (
102  const polyMesh& mesh,
103  const pointField& cc
104  ) const;
105 
106  //- Return the order in which cells need to be visited, i.e.
107  // from ordered back to original cell label.
108  // The connectivity is equal to mesh.cellCells() except
109  // - the connections are across coupled patches
110  virtual labelList renumber
111  (
112  const labelListList& cellCells,
113  const pointField& cc
114  ) const;
115 };
116 
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 } // End namespace Foam
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 #endif
125 
126 // ************************************************************************* //
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:67
Foam::SloanRenumber::~SloanRenumber
virtual ~SloanRenumber()=default
Destructor.
Foam::SloanRenumber::TypeName
TypeName("Sloan")
Runtime type information.
Foam::SloanRenumber::renumber
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited, i.e.
Definition: SloanRenumber.H:90
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
renumberMethod.H
Foam::Field< vector >
Switch.H
Foam::SloanRenumber
Sloan renumbering algorithm.
Definition: SloanRenumber.H:51
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::renumberMethod
Abstract base class for renumbering.
Definition: renumberMethod.H:50
Foam::List< label >