All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
featureEdgeMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::featureEdgeMesh
26 
27 Description
28  edgeMesh + IO.
29 
30 See also
31  Foam::extendedFeatureEdgeMesh
32 
33 SourceFiles
34  featureEdgeMesh.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef featureEdgeMesh_H
39 #define featureEdgeMesh_H
40 
41 #include "edgeMesh.H"
42 #include "regIOobject.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class featureEdgeMesh Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class featureEdgeMesh
54 :
55  public regIOobject,
56  public edgeMesh
57 {
58 
59 public:
60 
61  TypeName("featureEdgeMesh");
62 
63 
64  // Constructors
65 
66  //- Construct (read) given an IOobject
67  featureEdgeMesh(const IOobject&);
68 
69  //- Construct from featureEdgeMesh data
71  (
72  const IOobject&,
73  const pointField&,
74  const edgeList&
75  );
76 
77  //- Copy constructor
79 
80 
81  // IO
82 
83  //- ReadData function required for regIOobject read operation
84  virtual bool readData(Istream&);
85 
86  //- WriteData function required for regIOobject write operation
87  virtual bool writeData(Ostream&) const;
88 
89  //- Is object global
90  virtual bool global() const
91  {
92  return true;
93  }
94 
95  //- Return complete path + object name if the file exists
96  // either in the case/processor or case otherwise null
97  virtual fileName filePath() const
98  {
99  return globalFilePath(type());
100  }
101 };
102 
103 
104 //- Template function for obtaining global status
105 template<>
106 inline bool typeGlobal<featureEdgeMesh>()
107 {
108  return true;
109 }
110 
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 } // End namespace Foam
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 #endif
119 
120 // ************************************************************************* //
A class for handling file names.
Definition: fileName.H:79
virtual fileName filePath() const
Return complete path + object name if the file exists.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
virtual bool global() const
Is object global.
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
TypeName("featureEdgeMesh")
bool typeGlobal< featureEdgeMesh >()
Template function for obtaining global status.
fileName globalFilePath(const word &typeName) const
Helper for filePath that searches up if in parallel.
Definition: IOobject.C:402
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
Points connected by edges.
Definition: edgeMesh.H:69
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:55
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
featureEdgeMesh(const IOobject &)
Construct (read) given an IOobject.
Namespace for OpenFOAM.