OpenFOAM: API Guide
v2006
The open source CFD toolbox
PrimitivePatchClear.C
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-2016 OpenFOAM Foundation
9
Copyright (C) 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
#include "
PrimitivePatch.H
"
30
31
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
32
33
template
<
class
FaceList,
class
Po
int
Field>
34
void
35
Foam::PrimitivePatch<FaceList, PointField>::clearGeom
()
36
{
37
DebugInFunction
<<
"Clearing geometric data"
<<
nl
;
38
39
localPointsPtr_.reset(
nullptr
);
40
faceCentresPtr_.reset(
nullptr
);
41
faceAreasPtr_.reset(
nullptr
);
42
magFaceAreasPtr_.reset(
nullptr
);
43
faceNormalsPtr_.reset(
nullptr
);
44
pointNormalsPtr_.reset(
nullptr
);
45
}
46
47
48
template
<
class
FaceList,
class
Po
int
Field>
49
void
50
Foam::PrimitivePatch<FaceList, PointField>::clearTopology
()
51
{
52
DebugInFunction
<<
"Clearing patch addressing"
<<
nl
;
53
54
// group created and destroyed together
55
if
(edgesPtr_ && faceFacesPtr_ && edgeFacesPtr_ && faceEdgesPtr_)
56
{
57
edgesPtr_.reset(
nullptr
);
58
faceFacesPtr_.reset(
nullptr
);
59
edgeFacesPtr_.reset(
nullptr
);
60
faceEdgesPtr_.reset(
nullptr
);
61
}
62
63
boundaryPointsPtr_.reset(
nullptr
);
64
pointEdgesPtr_.reset(
nullptr
);
65
pointFacesPtr_.reset(
nullptr
);
66
edgeLoopsPtr_.reset(
nullptr
);
67
localPointOrderPtr_.reset(
nullptr
);
68
}
69
70
71
template
<
class
FaceList,
class
Po
int
Field>
72
void
73
Foam::PrimitivePatch<FaceList, PointField>::clearPatchMeshAddr
()
74
{
75
DebugInFunction
<<
"Clearing patch-mesh addressing"
<<
nl
;
76
77
meshPointsPtr_.reset(
nullptr
);
78
meshPointMapPtr_.reset(
nullptr
);
79
localFacesPtr_.reset(
nullptr
);
80
}
81
82
83
template
<
class
FaceList,
class
Po
int
Field>
84
void
85
Foam::PrimitivePatch<FaceList, PointField>::clearOut
()
86
{
87
clearGeom();
88
clearTopology();
89
clearPatchMeshAddr();
90
}
91
92
93
// ************************************************************************* //
PrimitivePatch.H
DebugInFunction
#define DebugInFunction
Report an information message using Foam::Info.
Definition:
messageStream.H:360
Foam::PrimitivePatch::clearGeom
void clearGeom()
Definition:
PrimitivePatchClear.C:35
Foam::PrimitivePatch::clearTopology
void clearTopology()
Definition:
PrimitivePatchClear.C:50
Foam::nl
constexpr char nl
Definition:
Ostream.H:385
Foam::PrimitivePatch::clearOut
void clearOut()
Definition:
PrimitivePatchClear.C:85
Foam::PrimitivePatch::clearPatchMeshAddr
void clearPatchMeshAddr()
Definition:
PrimitivePatchClear.C:73
src
OpenFOAM
meshes
primitiveMesh
PrimitivePatch
PrimitivePatchClear.C
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.