Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::extendedFeatureEdgeMesh
29
30Description
31
32 extendedEdgeMesh + IO.
33
34SourceFiles
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
47namespace Foam
48{
49
50// Forward Declarations
51class objectRegistry;
53/*---------------------------------------------------------------------------*\
54 Class extendedFeatureEdgeMesh Declaration
55\*---------------------------------------------------------------------------*/
56
58:
59 public regIOobject,
60 public extendedEdgeMesh
61{
62
63public:
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,
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&);
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// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158
159//- Global file type for extendedFeatureEdgeMesh
160template<>
161struct is_globalIOobject<extendedFeatureEdgeMesh> : std::true_type {};
162
163
164// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165
166} // End namespace Foam
167
168// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169
170#endif
171
172// ************************************************************************* //
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition IOobject.H:191
fileName globalFilePath(const word &typeName, const bool search=true) const
Redirect to fileHandler filePath, searching up if in parallel.
Definition IOobject.C:604
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A list of faces which address into the list of points.
const labelListList & normalDirections() const
label openStart() const
Return the index of the start of the open feature edges.
label nonFeatureStart() const
Return the index of the start of the non-feature points.
const vectorField & edgeDirections() const
Return the edgeDirection vectors.
const List< sideVolumeType > & normalVolumeTypes() const
Return.
label flatStart() const
Return the index of the start of the flat feature edges.
const labelListList & featurePointEdges() const
Return the edge labels for a given feature point. Edges are.
const labelList & regionEdges() const
Return the feature edges which are on the boundary between.
const labelListList & edgeNormals() const
Return the indices of the normals that are adjacent to the.
const vectorField & normals() const
Return the normals of the surfaces adjacent to the feature edges.
label multipleStart() const
Return the index of the start of the multiply-connected feature.
extendedEdgeMesh(std::nullptr_t)
Construct null, initializing start indices with -1.
label internalStart() const
Return the index of the start of the internal feature edges.
const labelListList & featurePointNormals() const
Return the indices of the normals that are adjacent to the.
label mixedStart() const
Return the index of the start of the mixed type feature points.
label concaveStart() const
Return the index of the start of the concave feature points.
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
virtual ~extendedFeatureEdgeMesh()=default
Destructor.
virtual bool global() const
Is object global.
TypeName("extendedFeatureEdgeMesh")
Runtime type information.
virtual fileName filePath() const
Return complete path + object name if the file exists either in the case/processor or case otherwise ...
extendedFeatureEdgeMesh(const IOobject &io)
Construct (read) given an IOobject.
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation.
A class for handling file names.
Definition fileName.H:75
Registry of regIOobjects.
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
Definition regIOobject.C:43
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
Holds feature edges/points of surface.
const auto & io
Namespace for OpenFOAM.
List< edge > edgeList
List of edge.
Definition edgeList.H:32
List< labelList > labelListList
List of labelList.
Definition labelList.H:38
List< label > labelList
A List of labels.
Definition List.H:62
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition POSIX.C:801
Field< vector > vectorField
Specialisation of Field<T> for vector.
List< bool > boolList
A List of bools.
Definition List.H:60
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
Definition UList.H:75
const pointField & pts
Trait for specifying global vs. local IOobject file types.
Definition IOobject.H:175
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68