randomRenumber.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-2012 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::randomRenumber
28 
29 Description
30  Random renumber. Just to see effect of renumbering.
31 
32 SourceFiles
33  randomRenumber.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef randomRenumber_H
38 #define randomRenumber_H
39 
40 #include "renumberMethod.H"
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class randomRenumber Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 class randomRenumber
50 :
51  public renumberMethod
52 {
53  // Private Member Functions
54 
55  //- No copy construct
56  randomRenumber(const randomRenumber&) = delete;
57 
58  //- No copy assignment
59  void operator=(const randomRenumber&) = delete;
60 
61 
62 public:
63 
64  //- Runtime type information
65  TypeName("random");
66 
67 
68  // Constructors
69 
70  //- Construct given the renumber dictionary
71  randomRenumber(const dictionary& renumberDict);
72 
73 
74  //- Destructor
75  virtual ~randomRenumber() = default;
76 
77 
78  // Member Functions
79 
80  //- Return the order in which cells need to be visited, i.e.
81  // from ordered back to original cell label.
82  // This is only defined for geometric renumberMethods.
83  virtual labelList renumber(const pointField&) const;
84 
85  //- Return the order in which cells need to be visited, i.e.
86  // from ordered back to original cell label.
87  // Use the mesh connectivity (if needed)
88  virtual labelList renumber
89  (
90  const polyMesh& mesh,
91  const pointField& cc
92  ) const;
93 
94  //- Return the order in which cells need to be visited, i.e.
95  // from ordered back to original cell label.
96  // The connectivity is equal to mesh.cellCells() except
97  // - the connections are across coupled patches
98  virtual labelList renumber
99  (
100  const labelListList& cellCells,
101  const pointField& cc
102  ) const;
103 };
104 
105 
106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 
108 } // End namespace Foam
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 #endif
113 
114 // ************************************************************************* //
Foam::randomRenumber::TypeName
TypeName("random")
Runtime type information.
Foam::randomRenumber::renumber
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited, i.e.
Definition: randomRenumber.C:59
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
renumberMethod.H
Foam::Field< vector >
Foam::randomRenumber
Random renumber. Just to see effect of renumbering.
Definition: randomRenumber.H:48
Foam::randomRenumber::~randomRenumber
virtual ~randomRenumber()=default
Destructor.
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 >