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/>.
27 \*---------------------------------------------------------------------------*/
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 #include "polyMeshGenPoints.H"
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 inline const Time& polyMeshGenPoints::returnTime() const
44 inline const pointFieldPMG& polyMeshGenPoints::points() const
49 inline pointFieldPMG& polyMeshGenPoints::points()
54 inline void polyMeshGenPoints::appendVertex(const point& p)
59 inline void polyMeshGenPoints::addPointToSubset
65 std::map<label, meshSubset>::iterator it = pointSubsets_.find(setI);
66 if( it == pointSubsets_.end() )
69 it->second.addElement(pointI);
72 inline void polyMeshGenPoints::removePointFromSubset
78 std::map<label, meshSubset>::iterator it = pointSubsets_.find(setI);
79 if( it == pointSubsets_.end() )
82 it->second.removeElement(pointI);
85 inline void polyMeshGenPoints::pointInSubsets
88 DynList<label>& pointSubsets
93 std::map<label, meshSubset>::const_iterator it;
96 it=pointSubsets_.begin();
97 it!=pointSubsets_.end();
101 if( it->second.contains(pointI) )
102 pointSubsets.append(it->first);
106 inline void polyMeshGenPoints::pointSubsetIndices(DynList<label>& indices) const
110 std::map<label, meshSubset>::const_iterator it;
113 it=pointSubsets_.begin();
114 it!=pointSubsets_.end();
117 indices.append(it->first);
120 template<class ListType>
121 inline void polyMeshGenPoints::pointsInSubset
124 ListType& pointLabels
129 std::map<label, meshSubset>::const_iterator it =
130 pointSubsets_.find(setI);
131 if( it == pointSubsets_.end() )
134 it->second.containedElements(pointLabels);
137 template<class ListType>
138 inline void polyMeshGenPoints::updatePointSubsets(const ListType& newNodeLabels)
142 std::map<label, meshSubset>::iterator it=pointSubsets_.begin();
143 it!=pointSubsets_.end();
146 it->second.updateSubset(newNodeLabels);
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 } // End namespace Foam
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //