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;
52
53/*---------------------------------------------------------------------------*\
54 Class extendedFeatureEdgeMesh Declaration
55\*---------------------------------------------------------------------------*/
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&);
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
158template<>
160{
161 return true;
162}
163
164
165// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167} // End namespace Foam
168
169// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170
171#endif
172
173// ************************************************************************* //
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
fileName globalFilePath(const word &typeName, const bool search=true) const
Helper for filePath that searches up if in parallel.
Definition: IOobject.C:593
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of faces which address into the list of points.
Description of feature edges and 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.
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 bool readData(Istream &)
ReadData function required for regIOobject read operation.
A class for handling file names.
Definition: fileName.H:76
virtual bool write()
Write the output fields.
Registry of regIOobjects.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:76
Holds feature edges/points of surface.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
bool typeGlobal< extendedFeatureEdgeMesh >()
Template function for obtaining global status.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73