featureEdgeMesh.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-2017 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::featureEdgeMesh
28 
29 Description
30  edgeMesh + IO.
31 
32 See also
33  Foam::extendedFeatureEdgeMesh
34 
35 SourceFiles
36  featureEdgeMesh.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef featureEdgeMesh_H
41 #define featureEdgeMesh_H
42 
43 #include "edgeMesh.H"
44 #include "regIOobject.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class featureEdgeMesh Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class featureEdgeMesh
56 :
57  public regIOobject,
58  public edgeMesh
59 {
60 public:
61 
62  TypeName("featureEdgeMesh");
63 
64 
65  // Constructors
66 
67  //- Construct (read) given an IOobject
68  explicit featureEdgeMesh(const IOobject&);
69 
70  //- Construct from featureEdgeMesh data
72  (
73  const IOobject& io,
74  const pointField& points,
75  const edgeList& edges
76  );
77 
78  //- Construct as copy
79  featureEdgeMesh(const IOobject& io, const edgeMesh& em);
80 
81 
82  // IO
83 
84  //- ReadData function required for regIOobject read operation
85  virtual bool readData(Istream&);
86 
87  //- WriteData function required for regIOobject write operation
88  virtual bool writeData(Ostream&) const;
89 
90  //- Is object global
91  virtual bool global() const
92  {
93  return true;
94  }
95 
96  //- Return complete path + object name if the file exists
97  // either in the case/processor or case otherwise null
98  virtual fileName filePath() const
99  {
100  return globalFilePath(type());
101  }
102 };
103 
104 
105 //- Template function for obtaining global status
106 template<>
107 inline bool typeGlobal<featureEdgeMesh>()
108 {
109  return true;
110 }
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace Foam
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 #endif
120 
121 // ************************************************************************* //
regIOobject.H
Foam::featureEdgeMesh::filePath
virtual fileName filePath() const
Return complete path + object name if the file exists.
Definition: featureEdgeMesh.H:97
Foam::edgeMesh::points
const pointField & points() const noexcept
Return points.
Definition: edgeMeshI.H:99
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
Foam::featureEdgeMesh::global
virtual bool global() const
Is object global.
Definition: featureEdgeMesh.H:90
Foam::featureEdgeMesh::featureEdgeMesh
featureEdgeMesh(const IOobject &)
Construct (read) given an IOobject.
Definition: featureEdgeMesh.C:40
Foam::fileName
A class for handling file names.
Definition: fileName.H:73
Foam::featureEdgeMesh::writeData
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
Definition: featureEdgeMesh.C:99
Foam::Field< vector >
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::featureEdgeMesh::readData
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation.
Definition: featureEdgeMesh.C:92
edgeMesh.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
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::edgeMesh::edges
const edgeList & edges() const noexcept
Return edges.
Definition: edgeMeshI.H:105
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:73
Foam::typeGlobal< featureEdgeMesh >
bool typeGlobal< featureEdgeMesh >()
Template function for obtaining global status.
Definition: featureEdgeMesh.H:106
Foam::featureEdgeMesh::TypeName
TypeName("featureEdgeMesh")
Foam::List< edge >
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::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::featureEdgeMesh
edgeMesh + IO.
Definition: featureEdgeMesh.H:54
Foam::edgeMesh
Mesh data needed to do the Finite Area discretisation.
Definition: edgeFaMesh.H:53