OpenFOAM: API Guide
v2012
The open source CFD toolbox
edgeMeshI.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
Copyright (C) 2018-2020 OpenCFD Ltd.
10
-------------------------------------------------------------------------------
11
License
12
This file is part of OpenFOAM.
13
14
OpenFOAM is free software: you can redistribute it and/or modify it
15
under the terms of the GNU General Public License as published by
16
the Free Software Foundation, either version 3 of the License, or
17
(at your option) any later version.
18
19
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22
for more details.
23
24
You should have received a copy of the GNU General Public License
25
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27
\*---------------------------------------------------------------------------*/
28
29
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
30
31
inline
Foam::pointField
&
Foam::edgeMesh::storedPoints
()
32
{
33
return
points_;
34
}
35
36
37
inline
Foam::edgeList
&
Foam::edgeMesh::storedEdges
()
38
{
39
return
edges_;
40
}
41
42
43
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
44
45
inline
Foam::edgeMesh::edgeMesh
()
46
:
47
fileFormats::edgeMeshFormatsCore(),
48
points_(),
49
edges_(),
50
pointEdgesPtr_(nullptr)
51
{}
52
53
54
inline
Foam::edgeMesh::edgeMesh
(
const
edgeMesh
& em)
55
:
56
fileFormats::edgeMeshFormatsCore(),
57
points_(em.points_),
58
edges_(em.edges_),
59
pointEdgesPtr_(nullptr)
60
{}
61
62
63
inline
Foam::edgeMesh::edgeMesh
(
edgeMesh
&& em)
64
:
65
edgeMesh
()
66
{
67
transfer
(em);
68
}
69
70
71
inline
Foam::edgeMesh::edgeMesh
72
(
73
const
pointField
&
points
,
74
const
edgeList
& edges
75
)
76
:
77
fileFormats::edgeMeshFormatsCore
(),
78
points_(
points
),
79
edges_(edges),
80
pointEdgesPtr_(
nullptr
)
81
{}
82
83
84
inline
Foam::edgeMesh::edgeMesh
85
(
86
pointField
&&
points
,
87
edgeList
&& edges
88
)
89
:
90
fileFormats::edgeMeshFormatsCore
(),
91
points_(std::move(
points
)),
92
edges_(std::move(edges)),
93
pointEdgesPtr_(
nullptr
)
94
{}
95
96
97
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
98
99
inline
const
Foam::pointField
&
Foam::edgeMesh::points
()
const
100
{
101
return
points_;
102
}
103
104
105
inline
const
Foam::edgeList
&
Foam::edgeMesh::edges
()
const
106
{
107
return
edges_;
108
}
109
110
111
inline
const
Foam::labelListList
&
Foam::edgeMesh::pointEdges
()
const
112
{
113
if
(!pointEdgesPtr_)
114
{
115
calcPointEdges();
116
}
117
return
*pointEdgesPtr_;
118
}
119
120
121
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
122
123
inline
void
Foam::edgeMesh::operator=
(
const
edgeMesh
& rhs)
124
{
125
points_ = rhs.points_;
126
edges_ = rhs.edges_;
127
pointEdgesPtr_.reset(
nullptr
);
128
}
129
130
131
inline
void
Foam::edgeMesh::operator=
(
edgeMesh
&& rhs)
132
{
133
transfer(rhs);
134
}
135
136
137
// ************************************************************************* //
Foam::edgeMesh::storedEdges
edgeList & storedEdges()
Non-const access to the edges.
Definition:
edgeMeshI.H:37
Foam::edgeMesh::operator=
void operator=(const edgeMesh &rhs)
Copy assignment.
Definition:
edgeMeshI.H:123
Foam::edgeMesh::storedPoints
pointField & storedPoints()
Non-const access to global points.
Definition:
edgeMeshI.H:31
Foam::edgeMesh::edgeMesh
edgeMesh()
Default construct.
Definition:
edgeMeshI.H:45
Foam::Field< vector >
Foam::edgeMesh::points
const pointField & points() const
Return points.
Definition:
edgeMeshI.H:99
Foam::edgeMesh::edges
const edgeList & edges() const
Return edges.
Definition:
edgeMeshI.H:105
Foam::edgeMesh::pointEdges
const labelListList & pointEdges() const
Return edges.
Definition:
edgeMeshI.H:111
Foam::List< edge >
points
const pointField & points
Definition:
gmvOutputHeader.H:1
Foam::edgeMesh
Mesh data needed to do the Finite Area discretisation.
Definition:
edgeFaMesh.H:52
Foam::fileFormats::edgeMeshFormatsCore
A collection of helper functions for reading/writing edge formats.
Definition:
edgeMeshFormatsCore.H:60
Foam::edgeMesh::transfer
void transfer(edgeMesh &mesh)
Transfer the contents of the argument and annul the argument.
Definition:
edgeMesh.C:124
src
meshTools
edgeMesh
edgeMeshI.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.