Loading...
Searching...
No Matches
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{
51/*---------------------------------------------------------------------------*\
52 Class featureEdgeMesh Declaration
53\*---------------------------------------------------------------------------*/
54
56:
58 public edgeMesh
59{
60public:
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// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106
107//- Global file type for featureEdgeMesh
108template<>
109struct is_globalIOobject<featureEdgeMesh> : std::true_type {};
110
111
112// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113
114} // End namespace Foam
115
116// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117
118#endif
119
120// ************************************************************************* //
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition IOobject.H:191
fileName globalFilePath(const word &typeName, const bool search=true) const
Redirect to fileHandler filePath, searching up if in parallel.
Definition IOobject.C:604
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
edgeMesh(const faMesh &mesh)
Construct finite-area edge mesh faMesh reference.
Definition edgeFaMesh.H:58
const pointField & points() const noexcept
Return points.
Definition edgeMeshI.H:92
const edgeList & edges() const noexcept
Return edges.
Definition edgeMeshI.H:98
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
virtual bool global() const
Is object global.
featureEdgeMesh(const IOobject &)
Construct (read) given an IOobject.
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:75
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
Definition regIOobject.C:43
const auto & io
Namespace for OpenFOAM.
List< edge > edgeList
List of edge.
Definition edgeList.H:32
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition POSIX.C:801
vectorField pointField
pointField is a vectorField.
Trait for specifying global vs. local IOobject file types.
Definition IOobject.H:175
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68