1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of cfMesh.
11 cfMesh 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 cfMesh 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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
28 This is a container with additional size to prevent re-allocation
29 every time it is resized
34 \*---------------------------------------------------------------------------*/
36 #ifndef pointFieldPMG_H
37 #define pointFieldPMG_H
39 #include "regIOobject.H"
40 #include "pointField.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 //- number of used elements
59 // Disallow bitwise assignment
60 void operator=(const pointFieldPMG&);
62 pointFieldPMG(const pointFieldPMG&);
64 // Disallow transfer from pointField
65 void transfer(pointField&);
70 TypeName("vectorField");
73 //- construct from IOobject
74 inline pointFieldPMG(const IOobject&);
76 //- construct from IOobject and size
77 inline pointFieldPMG(const IOobject&, const label);
79 //- construct from IOobject and pointField
80 inline pointFieldPMG(const IOobject&, const pointField&);
83 inline ~pointFieldPMG();
86 //- return the number of used elements
87 inline label size() const;
89 //- set the number of used elements
90 inline void setSize(const label nElmts);
92 //- reserve the memory for the specified number of elements
93 //- the request is ignored if the specified value is smaller than
94 //- the current number of elements
95 //- does not change the size
96 inline void reserve(const label capacity);
98 //- set the size to zero
101 //- add a point at the end of the list
102 inline void append(const point&);
104 //- return an element with bound checking
105 inline point& newElmt(const label);
107 //- read/write the list onto disk
108 inline bool writeData(Ostream&) const;
111 inline void operator=(const pointField&);
113 friend inline Ostream& operator<<(Ostream&, const pointFieldPMG&);
115 friend inline Istream& operator>>(Istream&, pointFieldPMG&);
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 } // End namespace Foam
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 #include "pointFieldPMGI.H"
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 // ************************************************************************* //