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 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::extendedFeatureEdgeMesh
28 
29 Description
30 
31  extendedEdgeMesh + IO.
32 
33 SourceFiles
34  extendedFeatureEdgeMesh.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef extendedFeatureEdgeMesh_H
39 #define extendedFeatureEdgeMesh_H
40 
41 #include "extendedEdgeMesh.H"
42 #include "regIOobject.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 class objectRegistry;
50 
51 /*---------------------------------------------------------------------------*\
52  Class extendedFeatureEdgeMesh Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public regIOobject,
58  public extendedEdgeMesh
59 {
60 
61 public:
62 
63  //- Runtime type information
64  TypeName("extendedFeatureEdgeMesh");
65 
66 
67  // Constructors
68 
69  //- Construct (read) given an IOobject
71 
72  //- Construct as copy
74  (
75  const IOobject&,
76  const extendedEdgeMesh&
77  );
78 
79  //- Construct given a surface with selected edges,point
80  // (surfaceFeatures), an objectRegistry and a
81  // fileName to write to.
82  // Extracts, classifies and reorders the data from surfaceFeatures.
84  (
85  const surfaceFeatures& sFeat,
86  const objectRegistry& obr,
87  const fileName& sFeatFileName,
88  const boolList& surfBaffleRegions
89  );
90 
91  //- Construct from PrimitivePatch
93  (
94  const IOobject&,
96  const labelUList& featureEdges,
97  const labelUList& regionFeatureEdges,
98  const labelUList& featurePoints
99  );
100 
101  //- Construct from all components
103  (
104  const IOobject& io,
105  const pointField& pts,
106  const edgeList& eds,
114  const vectorField& normals,
118  const labelListList& edgeNormals,
121  const labelList& regionEdges
122  );
123 
124 
125  //- Destructor
126  virtual ~extendedFeatureEdgeMesh();
127 
128 
129  // IO
130 
131  //- Give precedence to the regIOobject write
132  using regIOobject::write;
133 
134  //- ReadData function required for regIOobject read operation
135  virtual bool readData(Istream&);
136 
137  //- WriteData function required for regIOobject write operation
138  virtual bool writeData(Ostream&) const;
139 
140  //- Is object global
141  virtual bool global() const
142  {
143  return true;
144  }
145 
146  //- Return complete path + object name if the file exists
147  // either in the case/processor or case otherwise null
148  virtual fileName filePath() const
149  {
150  return globalFilePath(type());
151  }
152 };
153 
154 
155 //- Template function for obtaining global status
156 template<>
158 {
159  return true;
160 }
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace Foam
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
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:104
Foam::extendedFeatureEdgeMesh::writeData
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
Definition: extendedFeatureEdgeMesh.C:197
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:69
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::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::label
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:62
Foam::Field< vector >
Foam::regIOobject::write
virtual bool write(const bool valid=true) const
Write using setting from DB.
Definition: regIOobjectWrite.C:170
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:156
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:493
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::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh
extendedFeatureEdgeMesh(const IOobject &)
Construct (read) given an IOobject.
Definition: extendedFeatureEdgeMesh.C:40
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
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:86
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:67
Foam::extendedFeatureEdgeMesh::~extendedFeatureEdgeMesh
virtual ~extendedFeatureEdgeMesh()
Destructor.
Definition: extendedFeatureEdgeMesh.C:184
Foam::List< bool >
Foam::extendedFeatureEdgeMesh::readData
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation.
Definition: extendedFeatureEdgeMesh.C:190
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:140
Foam::extendedFeatureEdgeMesh::filePath
virtual fileName filePath() const
Return complete path + object name if the file exists.
Definition: extendedFeatureEdgeMesh.H:147
Foam::extendedFeatureEdgeMesh
extendedEdgeMesh + IO.
Definition: extendedFeatureEdgeMesh.H:54
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:90