extendedFeatureEdgeMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 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::extendedFeatureEdgeMesh
26 
27 Description
28 
29  extendedEdgeMesh + IO.
30 
31 SourceFiles
32  extendedFeatureEdgeMesh.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef extendedFeatureEdgeMesh_H
37 #define extendedFeatureEdgeMesh_H
38 
39 #include "extendedEdgeMesh.H"
40 #include "regIOobject.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 class objectRegistry;
48 
49 /*---------------------------------------------------------------------------*\
50  Class extendedFeatureEdgeMesh Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public regIOobject,
56  public extendedEdgeMesh
57 {
58 
59 public:
60 
61  //- Runtime type information
62  TypeName("extendedFeatureEdgeMesh");
63 
64 
65  // Constructors
66 
67  //- Construct (read) given an IOobject
69 
70  //- Copy constructor
72  (
73  const IOobject&,
74  const extendedEdgeMesh&
75  );
76 
77  //- Construct given a surface with selected edges,point
78  // (surfaceFeatures), an objectRegistry and a
79  // fileName to write to.
80  // Extracts, classifies and reorders the data from surfaceFeatures.
82  (
83  const surfaceFeatures& sFeat,
84  const objectRegistry& obr,
85  const fileName& sFeatFileName,
86  const boolList& surfBaffleRegions
87  );
88 
89  //- Construct from PrimitivePatch
91  (
92  const IOobject&,
94  const labelList& featureEdges,
95  const labelList& regionFeatureEdges,
96  const labelList& featurePoints
97  );
98 
99  //- Construct from all components
101  (
102  const IOobject& io,
103  const pointField& pts,
104  const edgeList& eds,
112  const vectorField& normals,
116  const labelListList& edgeNormals,
119  const labelList& regionEdges
120  );
121 
122 
123  //- Destructor
124  virtual ~extendedFeatureEdgeMesh();
125 
126 
127  // IO
128 
129  //- Give precedence to the regIOobject write
130  using regIOobject::write;
131 
132  //- ReadData function required for regIOobject read operation
133  virtual bool readData(Istream&);
134 
135  //- WriteData function required for regIOobject write operation
136  virtual bool writeData(Ostream&) const;
137 
138  //- Is object global
139  virtual bool global() const
140  {
141  return true;
142  }
143 
144  //- Return complete path + object name if the file exists
145  // either in the case/processor or case otherwise null
146  virtual fileName filePath() const
147  {
148  return globalFilePath(type());
149  }
150 };
151 
152 
153 //- Template function for obtaining global status
154 template<>
156 {
157  return true;
158 }
159 
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 } // End namespace Foam
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 #endif
168 
169 // ************************************************************************* //
label nonFeatureStart() const
Return the index of the start of the non-feature points.
const labelListList & featurePointNormals() const
Return the indices of the normals that are adjacent to the.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A class for handling file names.
Definition: fileName.H:79
const labelListList & edgeNormals() const
Return the indices of the normals that are adjacent to the.
const labelListList & normalDirections() const
TypeName("extendedFeatureEdgeMesh")
Runtime type information.
const List< sideVolumeType > & normalVolumeTypes() const
Return.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
Description of feature edges and points.
label multipleStart() const
Return the index of the start of the multiply-connected feature.
const vectorField & normals() const
Return the normals of the surfaces adjacent to the feature edges.
label openStart() const
Return the index of the start of the open feature edges.
const labelList & regionEdges() const
Return the feature edges which are on the boundary between.
virtual bool global() const
Is object global.
virtual ~extendedFeatureEdgeMesh()
Destructor.
virtual fileName filePath() const
Return complete path + object name if the file exists.
A list of faces which address into the list of points.
label flatStart() const
Return the index of the start of the flat feature edges.
label internalStart() const
Return the index of the start of the internal feature edges.
fileName globalFilePath(const word &typeName) const
Helper for filePath that searches up if in parallel.
Definition: IOobject.C:421
label mixedStart() const
Return the index of the start of the mixed type feature points.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
const labelListList & featurePointEdges() const
Return the edge labels for a given feature point. Edges are.
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
extendedFeatureEdgeMesh(const IOobject &)
Construct (read) given an IOobject.
const vectorField & edgeDirections() const
Return the edgeDirection vectors.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
bool typeGlobal< extendedFeatureEdgeMesh >()
Template function for obtaining global status.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:55
virtual bool write(const bool write=true) const
Write using setting from DB.
Registry of regIOobjects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation.
Holds feature edges/points of surface.
Namespace for OpenFOAM.
label concaveStart() const
Return the index of the start of the concave feature points.