1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::MeshedSurfaceIOAllocator
29 A helper class for storing points, faces and zones with IO capabilities.
32 MeshedSurfaceIOAllocator.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef MeshedSurfaceIOAllocator_H
37 #define MeshedSurfaceIOAllocator_H
39 #include "pointIOField.H"
40 #include "faceIOList.H"
41 #include "surfZoneIOList.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class MeshedSurfaceIOAllocator Declaration
50 \*---------------------------------------------------------------------------*/
52 //- A helper class for storing points, faces and zones
53 class MeshedSurfaceIOAllocator
64 surfZoneIOList zones_;
67 // Private Member Functions
69 //- Disallow default bitwise copy construct
70 MeshedSurfaceIOAllocator(const MeshedSurfaceIOAllocator&);
72 //- Disallow default bitwise assignment
73 void operator=(const MeshedSurfaceIOAllocator&);
80 //- Read construct from IOobjects
81 MeshedSurfaceIOAllocator
83 const IOobject& ioPoints,
84 const IOobject& ioFaces,
85 const IOobject& ioZones
88 //- Construct from IOobjects, copying components
89 MeshedSurfaceIOAllocator
91 const IOobject& ioPoints,
92 const pointField& points,
93 const IOobject& ioFaces,
94 const faceList& faces,
95 const IOobject& ioZones,
96 const surfZoneList& zones
99 //- Construct from IOobjects, possibly transferring components
100 MeshedSurfaceIOAllocator
102 const IOobject& ioPoints,
103 const Xfer< pointField >& points,
104 const IOobject& ioFaces,
105 const Xfer< faceList >& faces,
106 const IOobject& ioZones,
107 const Xfer< surfZoneList >& zones
117 //- Non-const access to the points
118 pointIOField& storedIOPoints()
123 //- Non-const access to the faces
124 faceIOList& storedIOFaces()
129 //- Non-const access to the zones
130 surfZoneIOList& storedIOZones()
135 //- Const access to the points
136 const pointIOField& storedIOPoints() const
141 //- Const access to the faces
142 const faceIOList& storedIOFaces() const
147 //- Const access to the zones
148 const surfZoneIOList& storedIOZones() const
154 // Storage management
156 //- Clear primitive data (points, faces and zones)
159 //- Reset primitive data (points, faces and zones)
160 // Note, optimized to avoid overwriting data (with Xfer::null)
163 const Xfer< faceList >& faces,
164 const Xfer< surfZoneList >& zones
167 //- Reset primitive data (points, faces and zones)
168 // Note, optimized to avoid overwriting data (with Xfer::null)
171 const Xfer< pointField >& points,
172 const Xfer< faceList >& faces,
173 const Xfer< surfZoneList >& zones
176 //- Reset primitive data (points, faces and zones)
177 // Note, optimized to avoid overwriting data (with Xfer::null)
180 const Xfer< List<point> >& points,
181 const Xfer< faceList >& faces,
182 const Xfer< surfZoneList >& zones
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 } // End namespace Foam
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 // ************************************************************************* //