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-------------------------------------------------------------------------------
11License
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
33template<class FaceList, class PointField>
34void
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
48template<class FaceList, class PointField>
49void
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
71template<class FaceList, class PointField>
72void
74{
75 DebugInFunction << "Clearing patch-mesh addressing" << nl;
76
77 meshPointsPtr_.reset(nullptr);
78 meshPointMapPtr_.reset(nullptr);
79 localFacesPtr_.reset(nullptr);
80}
81
82
83template<class FaceList, class PointField>
84void
86{
87 clearGeom();
88 clearTopology();
89 clearPatchMeshAddr();
90}
91
92
93// ************************************************************************* //
#define DebugInFunction
Report an information message using Foam::Info.
constexpr char nl
The newline '\n' character (0x0a)
Definition: Ostream.H:53