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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::featureEdgeMesh
28
29Description
30 edgeMesh + IO.
31
32See also
33 Foam::extendedFeatureEdgeMesh
34
35SourceFiles
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
48namespace Foam
49{
50
51/*---------------------------------------------------------------------------*\
52 Class featureEdgeMesh Declaration
53\*---------------------------------------------------------------------------*/
56:
57 public regIOobject,
58 public edgeMesh
59{
60public:
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
106template<>
107inline bool typeGlobal<featureEdgeMesh>()
108{
109 return true;
110}
111
112
113// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114
115} // End namespace Foam
116
117// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118
119#endif
120
121// ************************************************************************* //
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
Mesh data needed to do the Finite Area discretisation.
Definition: edgeFaMesh.H:56
const pointField & points() const noexcept
Return points.
Definition: edgeMeshI.H:99
const edgeList & edges() const noexcept
Return edges.
Definition: edgeMeshI.H:105
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
virtual bool global() const
Is object global.
virtual fileName filePath() const
Return complete path + object name if the file exists.
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation.
TypeName("featureEdgeMesh")
A class for handling file names.
Definition: fileName.H:76
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:76
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
Namespace for OpenFOAM.
bool typeGlobal< featureEdgeMesh >()
Template function for obtaining global status.
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
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73