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 
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 // ************************************************************************* //
Foam::pointField
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:42
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:60
Foam::labelList
List< label > labelList
A List of labels.
Definition: labelList.H:56
Foam::structuredRenumber
Renumbering according to mesh layers. depthFirst = true: first column gets ids 0.....
Definition: structuredRenumber.H:52
Foam::structuredRenumber::structuredRenumber
structuredRenumber(const structuredRenumber &)
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Foam::structuredRenumber::reverse_
const Switch reverse_
Definition: structuredRenumber.H:66
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:365
renumberMethod.H
Foam::structuredRenumber::operator=
void operator=(const structuredRenumber &)
Disallow default bitwise copy construct and assignment.
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::structuredRenumber::depthFirst_
const Switch depthFirst_
Definition: structuredRenumber.H:62
Switch.H
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::structuredRenumber::patches_
const wordReList patches_
Definition: structuredRenumber.H:60
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::structuredRenumber::~structuredRenumber
virtual ~structuredRenumber()
Destructor.
Definition: structuredRenumber.H:89
Foam::renumberMethod
Abstract base class for renumbering.
Definition: renumberMethod.H:48
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::structuredRenumber::method_
const autoPtr< renumberMethod > method_
Definition: structuredRenumber.H:64
Foam::structuredRenumber::TypeName
TypeName("structured")
Runtime type information.
Foam::structuredRenumber::renumber
virtual labelList renumber(const pointField &) const
Return the order in which cells need to be visited, i.e.
Definition: structuredRenumber.H:98
Foam::structuredRenumber::methodDict_
const dictionary methodDict_
Definition: structuredRenumber.H:58