structuredRenumber.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::structuredRenumber
26 
27 Description
28  Renumbering according to mesh layers.
29  depthFirst = true:
30  first column gets ids 0..nLayer-1,
31  second nLayers..2*nLayers-1 etc.
32  depthFirst = false:
33  first layer gets ids 0,1,2 etc.
34 
35 SourceFiles
36  structuredRenumber.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef structuredRenumber_H
41 #define structuredRenumber_H
42 
43 #include "renumberMethod.H"
44 #include "Switch.H"
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class structuredRenumber Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public renumberMethod
56 {
57  // Private data
58 
59  const dictionary methodDict_;
60 
61  const wordReList patches_;
62 
63  const Switch depthFirst_;
64 
65  const autoPtr<renumberMethod> method_;
66 
67  const Switch reverse_;
68 
69 
70  // Private Member Functions
71 
72  //- Disallow default bitwise copy construct and assignment
73  void operator=(const structuredRenumber&);
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("structured");
81 
82 
83  // Constructors
84 
85  //- Construct given the renumber dictionary
86  structuredRenumber(const dictionary& renumberDict);
87 
88 
89  //- Destructor
90  virtual ~structuredRenumber()
91  {}
92 
93 
94  // Member Functions
95 
96  //- Return the order in which cells need to be visited, i.e.
97  // from ordered back to original cell label.
98  // This is only defined for geometric renumberMethods.
99  virtual labelList renumber(const pointField&) const
100  {
102  return labelList(0);
103  }
104 
105  //- Return the order in which cells need to be visited, i.e.
106  // from ordered back to original cell label.
107  // Use the mesh connectivity (if needed)
108  virtual labelList renumber
109  (
110  const polyMesh& mesh,
111  const pointField& cc
112  ) const;
113 
114  //- Return the order in which cells need to be visited, i.e.
115  // from ordered back to original cell label.
116  // The connectivity is equal to mesh.cellCells() except
117  // - the connections are across coupled patches
119  (
120  const labelListList& cellCells,
121  const pointField& cc
122  ) const
123  {
125  return labelList(0);
126  }
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
Renumbering according to mesh layers. depthFirst = true: first column gets ids 0..nLayer-1, second nLayers..2*nLayers-1 etc. depthFirst = false: first layer gets ids 0,1,2 etc.
virtual ~structuredRenumber()
Destructor.
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
Abstract base class for renumbering.
TypeName("structured")
Runtime type information.
dynamicFvMesh & mesh
List< label > labelList
A List of labels.
Definition: labelList.H:56
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited, i.e.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
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.