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/>.
25 Foam::MeshedSurfaceIOAllocator
28 A helper class for storing points, faces and zones with IO capabilities.
31 MeshedSurfaceIOAllocator.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef MeshedSurfaceIOAllocator_H
36 #define MeshedSurfaceIOAllocator_H
38 #include "pointIOField.H"
39 #include "faceIOList.H"
40 #include "surfZoneIOList.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class MeshedSurfaceIOAllocator Declaration
49 \*---------------------------------------------------------------------------*/
51 class MeshedSurfaceIOAllocator
59 faceCompactIOList faces_;
62 surfZoneIOList zones_;
65 // Private Member Functions
67 //- Disallow default bitwise copy construct
68 MeshedSurfaceIOAllocator(const MeshedSurfaceIOAllocator&);
70 //- Disallow default bitwise assignment
71 void operator=(const MeshedSurfaceIOAllocator&);
78 //- Read construct from IOobjects
79 MeshedSurfaceIOAllocator
81 const IOobject& ioPoints,
82 const IOobject& ioFaces,
83 const IOobject& ioZones
86 //- Construct from IOobjects, copying components
87 MeshedSurfaceIOAllocator
89 const IOobject& ioPoints,
90 const pointField& points,
91 const IOobject& ioFaces,
92 const faceList& faces,
93 const IOobject& ioZones,
94 const surfZoneList& zones
97 //- Construct from IOobjects, possibly transferring components
98 MeshedSurfaceIOAllocator
100 const IOobject& ioPoints,
101 const Xfer<pointField>& points,
102 const IOobject& ioFaces,
103 const Xfer<faceList>& faces,
104 const IOobject& ioZones,
105 const Xfer<surfZoneList>& zones
113 //- Non-const access to the points
114 pointIOField& storedIOPoints()
119 //- Non-const access to the faces
120 faceCompactIOList& storedIOFaces()
125 //- Non-const access to the zones
126 surfZoneIOList& storedIOZones()
131 //- Const access to the points
132 const pointIOField& storedIOPoints() const
137 //- Const access to the faces
138 const faceCompactIOList& storedIOFaces() const
143 //- Const access to the zones
144 const surfZoneIOList& storedIOZones() const
150 // Storage management
152 //- Clear primitive data (points, faces and zones)
155 //- Reset primitive data (points, faces and zones)
156 // Note, optimized to avoid overwriting data (with Xfer::null)
159 const Xfer<faceList>& faces,
160 const Xfer<surfZoneList>& zones
163 //- Reset primitive data (points, faces and zones)
164 // Note, optimized to avoid overwriting data (with Xfer::null)
167 const Xfer<pointField>& points,
168 const Xfer<faceList>& faces,
169 const Xfer<surfZoneList>& zones
172 //- Reset primitive data (points, faces and zones)
173 // Note, optimized to avoid overwriting data (with Xfer::null)
176 const Xfer<List<point> >& points,
177 const Xfer<faceList>& faces,
178 const Xfer<surfZoneList>& zones
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 } // End namespace Foam
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 // ************************************************************************* //