1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "MeshedSurfaceIOAllocator.H"
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
30 Foam::MeshedSurfaceIOAllocator::MeshedSurfaceIOAllocator
32 const IOobject& ioPoints,
33 const IOobject& ioFaces,
34 const IOobject& ioZones
43 Foam::MeshedSurfaceIOAllocator::MeshedSurfaceIOAllocator
45 const IOobject& ioPoints,
46 const pointField& points,
47 const IOobject& ioFaces,
48 const faceList& faces,
49 const IOobject& ioZones,
50 const surfZoneList& zones
53 points_(ioPoints, points),
54 faces_(ioFaces, faces),
55 zones_(ioZones, zones)
59 Foam::MeshedSurfaceIOAllocator::MeshedSurfaceIOAllocator
61 const IOobject& ioPoints,
62 const Xfer<pointField>& points,
63 const IOobject& ioFaces,
64 const Xfer<faceList>& faces,
65 const IOobject& ioZones,
66 const Xfer<surfZoneList>& zones
69 points_(ioPoints, points),
70 faces_(ioFaces, faces),
71 zones_(ioZones, zones)
75 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
77 void Foam::MeshedSurfaceIOAllocator::clear()
85 void Foam::MeshedSurfaceIOAllocator::resetFaces
87 const Xfer<List<face> >& faces,
88 const Xfer<surfZoneList>& zones
93 faces_.transfer(faces());
98 zones_.transfer(zones());
103 void Foam::MeshedSurfaceIOAllocator::reset
105 const Xfer<pointField>& points,
106 const Xfer<faceList>& faces,
107 const Xfer<surfZoneList>& zones
110 // Take over new primitive data.
111 // Optimized to avoid overwriting data at all
114 points_.transfer(points());
117 resetFaces(faces, zones);
121 void Foam::MeshedSurfaceIOAllocator::reset
123 const Xfer<List<point> >& points,
124 const Xfer<faceList>& faces,
125 const Xfer<surfZoneList>& zones
128 // Take over new primitive data.
129 // Optimized to avoid overwriting data at all
132 points_.transfer(points());
135 resetFaces(faces, zones);
139 // ************************************************************************* //