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 Copyright (C) 2022 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::SloanRenumber
29
30Description
31 Sloan renumbering algorithm
32
33 E.g. http://www.apav.it/sito_ratio/file_pdf/ratio_4/capitolo_1.pdf
34
35SourceFiles
36 SloanRenumber.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef Foam_SloanRenumber_H
41#define Foam_SloanRenumber_H
42
43#include "renumberMethod.H"
44
45namespace Foam
46{
47
48/*---------------------------------------------------------------------------*\
49 Class SloanRenumber Declaration
50\*---------------------------------------------------------------------------*/
52class 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
70public:
71
72 //- Runtime type information
73 TypeName("Sloan");
74
75
76 // Constructors
77
78 //- Construct given the renumber dictionary
79 explicit SloanRenumber(const dictionary& dict);
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
89 //- (ie. 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();
95 }
96
97 //- Return the order in which cells need to be visited
98 //- (ie. 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
107 //- (ie. from ordered back to original cell label).
108 virtual labelList renumber
109 (
110 const CompactListList<label>& cellCells,
111 const pointField& cellCentres
112 ) const;
113
114 //- Return the order in which cells need to be visited
115 //- (ie. from ordered back to original cell label).
116 // The connectivity is equal to mesh.cellCells() except
117 // - the connections are across coupled patches
118 virtual labelList renumber
119 (
120 const labelListList& cellCells,
121 const pointField& cc
122 ) const;
123};
124
125
126// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127
128} // End namespace Foam
129
130// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131
132#endif
133
134// ************************************************************************* //
A packed storage unstructured matrix of objects of type <T> using an offset table for access.
Sloan renumbering algorithm.
Definition: SloanRenumber.H:54
TypeName("Sloan")
Runtime type information.
virtual ~SloanRenumber()=default
Destructor.
virtual labelList renumber(const pointField &) const
Definition: SloanRenumber.H:90
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
Abstract base class for renumbering.
dynamicFvMesh & mesh
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition: List.H:66
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73