extendedFeatureEdgeMesh.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-2014 OpenFOAM Foundation
9  Copyright (C) 2020 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::extendedFeatureEdgeMesh
29 
30 Description
31 
32  extendedEdgeMesh + IO.
33 
34 SourceFiles
35  extendedFeatureEdgeMesh.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef extendedFeatureEdgeMesh_H
40 #define extendedFeatureEdgeMesh_H
41 
42 #include "extendedEdgeMesh.H"
43 #include "regIOobject.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 // Forward Declarations
51 class objectRegistry;
52 
53 /*---------------------------------------------------------------------------*\
54  Class extendedFeatureEdgeMesh Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 :
59  public regIOobject,
60  public extendedEdgeMesh
61 {
62 
63 public:
64 
65  //- Runtime type information
66  TypeName("extendedFeatureEdgeMesh");
67 
68 
69  // Constructors
70 
71  //- Construct (read) given an IOobject
72  explicit extendedFeatureEdgeMesh(const IOobject& io);
73 
74  //- Copy construct with IOobject
76  (
77  const IOobject& io,
78  const extendedEdgeMesh&
79  );
80 
81  //- Construct given a surface with selected edges,point
82  // (surfaceFeatures), an objectRegistry and a
83  // fileName to write to.
84  // Extracts, classifies and reorders the data from surfaceFeatures.
86  (
87  const surfaceFeatures& sFeat,
88  const objectRegistry& obr,
89  const fileName& sFeatFileName,
90  const boolList& surfBaffleRegions
91  );
92 
93  //- Construct from PrimitivePatch
95  (
96  const IOobject& io,
98  const labelUList& featureEdges,
99  const labelUList& regionFeatureEdges,
100  const labelUList& featurePoints
101  );
102 
103  //- Construct from all components
105  (
106  const IOobject& io,
107  const pointField& pts,
108  const edgeList& eds,
109  label concaveStart,
110  label mixedStart,
111  label nonFeatureStart,
112  label internalStart,
113  label flatStart,
114  label openStart,
115  label multipleStart,
116  const vectorField& normals,
120  const labelListList& edgeNormals,
123  const labelList& regionEdges
124  );
125 
126 
127  //- Destructor
128  virtual ~extendedFeatureEdgeMesh() = default;
129 
130 
131  // IO
132 
133  //- Give precedence to the regIOobject write
134  using regIOobject::write;
135 
136  //- ReadData function required for regIOobject read operation
137  virtual bool readData(Istream&);
138 
139  //- WriteData function required for regIOobject write operation
140  virtual bool writeData(Ostream&) const;
141 
142  //- Is object global
143  virtual bool global() const
144  {
145  return true;
146  }
147 
148  //- Return complete path + object name if the file exists
149  //- either in the case/processor or case otherwise null
150  virtual fileName filePath() const
151  {
152  return globalFilePath(type());
153  }
154 };
155 
156 
157 //- Template function for obtaining global status
158 template<>
160 {
161  return true;
162 }
163 
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
regIOobject.H
Foam::extendedEdgeMesh::normalDirections
const labelListList & normalDirections() const
Definition: extendedEdgeMeshI.H:111
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
Foam::extendedFeatureEdgeMesh::writeData
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
Definition: extendedFeatureEdgeMesh.C:192
Foam::extendedEdgeMesh::featurePointNormals
const labelListList & featurePointNormals() const
Return the indices of the normals that are adjacent to the.
Definition: extendedEdgeMeshI.H:177
Foam::fileName
A class for handling file names.
Definition: fileName.H:73
Foam::extendedEdgeMesh::regionEdges
const labelList & regionEdges() const
Return the feature edges which are on the boundary between.
Definition: extendedEdgeMeshI.H:218
Foam::extendedEdgeMesh::normals
const vectorField & normals() const
Return the normals of the surfaces adjacent to the feature edges.
Definition: extendedEdgeMeshI.H:90
Foam::extendedEdgeMesh::featurePointEdges
const labelListList & featurePointEdges() const
Return the edge labels for a given feature point. Edges are.
Definition: extendedEdgeMeshI.H:212
Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh
extendedFeatureEdgeMesh(const IOobject &io)
Construct (read) given an IOobject.
Definition: extendedFeatureEdgeMesh.C:41
Foam::extendedEdgeMesh::multipleStart
label multipleStart() const
Return the index of the start of the multiply-connected feature.
Definition: extendedEdgeMeshI.H:78
Foam::extendedEdgeMesh::normalVolumeTypes
const List< sideVolumeType > & normalVolumeTypes() const
Return.
Definition: extendedEdgeMeshI.H:97
Foam::extendedEdgeMesh::edgeDirections
const vectorField & edgeDirections() const
Return the edgeDirection vectors.
Definition: extendedEdgeMeshI.H:103
Foam::objectRegistry
Registry of regIOobjects.
Definition: objectRegistry.H:60
Foam::extendedFeatureEdgeMesh::TypeName
TypeName("extendedFeatureEdgeMesh")
Runtime type information.
Foam::extendedEdgeMesh::nonFeatureStart
label nonFeatureStart() const
Return the index of the start of the non-feature points.
Definition: extendedEdgeMeshI.H:48
Foam::extendedEdgeMesh::concaveStart
label concaveStart() const
Return the index of the start of the concave feature points.
Definition: extendedEdgeMeshI.H:36
Foam::Field< vector >
Foam::regIOobject::write
virtual bool write(const bool valid=true) const
Write using setting from DB.
Definition: regIOobjectWrite.C:132
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::typeGlobal< extendedFeatureEdgeMesh >
bool typeGlobal< extendedFeatureEdgeMesh >()
Template function for obtaining global status.
Definition: extendedFeatureEdgeMesh.H:158
Foam::surfaceFeatures
Holds feature edges/points of surface.
Definition: surfaceFeatures.H:73
extendedEdgeMesh.H
Foam::IOobject::globalFilePath
fileName globalFilePath(const word &typeName, const bool search=true) const
Helper for filePath that searches up if in parallel.
Definition: IOobject.C:580
Foam::extendedEdgeMesh::internalStart
label internalStart() const
Return the index of the start of the internal feature edges.
Definition: extendedEdgeMeshI.H:60
Foam::extendedEdgeMesh::edgeNormals
const labelListList & edgeNormals() const
Return the indices of the normals that are adjacent to the.
Definition: extendedEdgeMeshI.H:146
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::extendedFeatureEdgeMesh::~extendedFeatureEdgeMesh
virtual ~extendedFeatureEdgeMesh()=default
Destructor.
Foam::extendedEdgeMesh::mixedStart
label mixedStart() const
Return the index of the start of the mixed type feature points.
Definition: extendedEdgeMeshI.H:42
Foam::extendedEdgeMesh::openStart
label openStart() const
Return the index of the start of the open feature edges.
Definition: extendedEdgeMeshI.H:72
Foam::extendedEdgeMesh
Description of feature edges and points.
Definition: extendedEdgeMesh.H:85
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:73
Foam::List< bool >
Foam::extendedFeatureEdgeMesh::readData
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation.
Definition: extendedFeatureEdgeMesh.C:185
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::UList< label >
Foam::extendedFeatureEdgeMesh::global
virtual bool global() const
Is object global.
Definition: extendedFeatureEdgeMesh.H:142
Foam::extendedFeatureEdgeMesh::filePath
virtual fileName filePath() const
Definition: extendedFeatureEdgeMesh.H:149
Foam::extendedFeatureEdgeMesh
extendedEdgeMesh + IO.
Definition: extendedFeatureEdgeMesh.H:56
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::extendedEdgeMesh::flatStart
label flatStart() const
Return the index of the start of the flat feature edges.
Definition: extendedEdgeMeshI.H:66
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition: PrimitivePatch.H:79