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 
61 public:
62 
63  TypeName("featureEdgeMesh");
64 
65 
66  // Constructors
67 
68  //- Construct (read) given an IOobject
69  featureEdgeMesh(const IOobject&);
70 
71  //- Construct from featureEdgeMesh data
73  (
74  const IOobject&,
75  const pointField&,
76  const edgeList&
77  );
78 
79  //- Construct as copy
81 
82 
83  // IO
84 
85  //- ReadData function required for regIOobject read operation
86  virtual bool readData(Istream&);
87 
88  //- WriteData function required for regIOobject write operation
89  virtual bool writeData(Ostream&) const;
90 
91  //- Is object global
92  virtual bool global() const
93  {
94  return true;
95  }
96 
97  //- Return complete path + object name if the file exists
98  // either in the case/processor or case otherwise null
99  virtual fileName filePath() const
100  {
101  return globalFilePath(type());
102  }
103 };
104 
105 
106 //- Template function for obtaining global status
107 template<>
108 inline bool typeGlobal<featureEdgeMesh>()
109 {
110  return true;
111 }
112 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #endif
121 
122 // ************************************************************************* //
regIOobject.H
Foam::featureEdgeMesh::filePath
virtual fileName filePath() const
Return complete path + object name if the file exists.
Definition: featureEdgeMesh.H:98
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::featureEdgeMesh::global
virtual bool global() const
Is object global.
Definition: featureEdgeMesh.H:91
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:69
Foam::featureEdgeMesh::writeData
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
Definition: featureEdgeMesh.C:100
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:93
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:527
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:71
Foam::typeGlobal< featureEdgeMesh >
bool typeGlobal< featureEdgeMesh >()
Template function for obtaining global status.
Definition: featureEdgeMesh.H:107
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:52