1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. 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 //- A helper class for storing points, faces and zones
52 class MeshedSurfaceIOAllocator
63 surfZoneIOList zones_;
66 // Private Member Functions
68 //- Disallow default bitwise copy construct
69 MeshedSurfaceIOAllocator(const MeshedSurfaceIOAllocator&);
71 //- Disallow default bitwise assignment
72 void operator=(const MeshedSurfaceIOAllocator&);
79 //- Read construct from IOobjects
80 MeshedSurfaceIOAllocator
82 const IOobject& ioPoints,
83 const IOobject& ioFaces,
84 const IOobject& ioZones
87 //- Construct from IOobjects, copying components
88 MeshedSurfaceIOAllocator
90 const IOobject& ioPoints,
91 const pointField& points,
92 const IOobject& ioFaces,
93 const faceList& faces,
94 const IOobject& ioZones,
95 const surfZoneList& zones
98 //- Construct from IOobjects, possibly transferring components
99 MeshedSurfaceIOAllocator
101 const IOobject& ioPoints,
102 const Xfer< pointField >& points,
103 const IOobject& ioFaces,
104 const Xfer< faceList >& faces,
105 const IOobject& ioZones,
106 const Xfer< surfZoneList >& zones
116 //- Non-const access to the points
117 pointIOField& storedIOPoints()
122 //- Non-const access to the faces
123 faceIOList& storedIOFaces()
128 //- Non-const access to the zones
129 surfZoneIOList& storedIOZones()
134 //- Const access to the points
135 const pointIOField& storedIOPoints() const
140 //- Const access to the faces
141 const faceIOList& storedIOFaces() const
146 //- Const access to the zones
147 const surfZoneIOList& storedIOZones() const
153 // Storage management
155 //- Clear primitive data (points, faces and zones)
158 //- Reset primitive data (points, faces and zones)
159 // Note, optimized to avoid overwriting data (with Xfer::null)
162 const Xfer< faceList >& faces,
163 const Xfer< surfZoneList >& zones
166 //- Reset primitive data (points, faces and zones)
167 // Note, optimized to avoid overwriting data (with Xfer::null)
170 const Xfer< pointField >& points,
171 const Xfer< faceList >& faces,
172 const Xfer< surfZoneList >& zones
175 //- Reset primitive data (points, faces and zones)
176 // Note, optimized to avoid overwriting data (with Xfer::null)
179 const Xfer< List<point> >& points,
180 const Xfer< faceList >& faces,
181 const Xfer< surfZoneList >& zones
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 } // End namespace Foam
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 // ************************************************************************* //