manualRenumber.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) 2011-2015 OpenFOAM Foundation
9  Copyright (C) 2022-2024 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::manualRenumber
29 
30 Description
31  Renumber given a ordered-to-original cell association in a file
32 
33 SourceFiles
34  manualRenumber.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef Foam_manualRenumber_H
39 #define Foam_manualRenumber_H
40 
41 #include "renumberMethod.H"
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class manualRenumber Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 class manualRenumber
51 :
52  public renumberMethod
53 {
54  // Private Data
55 
56  fileName dataFile_;
57 
58 public:
59 
60  //- Runtime type information
61  TypeNameNoDebug("manual");
62 
63 
64  // Constructors
65 
66  //- Construct with given data file
67  explicit manualRenumber(const fileName& file);
68 
69  //- Construct given the renumber dictionary
70  explicit manualRenumber(const dictionary& dict);
71 
72 
73  //- Destructor
74  virtual ~manualRenumber() = default;
75 
76 
77  // Member Functions
78 
79  //- The renumbering method needs a polyMesh (for its IOobject)
80  virtual bool needs_mesh() const { return true; }
81 
82 
83  // With mesh topology
84 
85  //- Return the cell visit order (from ordered back to original cell id)
86  //- using the mesh for its IOobject and instance.
87  virtual labelList renumber(const polyMesh& mesh) const;
88 
89 
90  // With explicit topology - Not implemented!
91 
92  //- Return the cell visit order (from ordered back to original cell id)
93  //- Not implemented!
94  virtual labelList renumber
95  (
96  const CompactListList<label>& cellCells
97  ) const
98  {
100  return labelList();
101  }
102 
103  //- Return the cell visit order (from ordered back to original cell id)
104  //- Not implemented!
105  virtual labelList renumber
106  (
107  const labelListList& cellCells
108  ) const
109  {
111  return labelList();
112  }
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
dictionary dict
A class for handling file names.
Definition: fileName.H:72
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
manualRenumber(const fileName &file)
Construct with given data file.
Abstract base class for renumbering.
virtual bool needs_mesh() const
The renumbering method needs a polyMesh (for its IOobject)
dynamicFvMesh & mesh
Renumber given a ordered-to-original cell association in a file.
A packed storage of objects of type <T> using an offset table for access.
virtual labelList renumber(const polyMesh &mesh) const
Return the cell visit order (from ordered back to original cell id) using the mesh for its IOobject a...
virtual ~manualRenumber()=default
Destructor.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:75
List< label > labelList
A List of labels.
Definition: List.H:61
TypeNameNoDebug("manual")
Runtime type information.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:688
Namespace for OpenFOAM.