Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
includeLinks/MsqFreeVertexIndexIterator.hpp
Go to the documentation of this file.
1 /* *****************************************************************
2  MESQUITE -- The Mesh Quality Improvement Toolkit
3 
4  Copyright 2004 Sandia Corporation and Argonne National
5  Laboratory. Under the terms of Contract DE-AC04-94AL85000
6  with Sandia Corporation, the U.S. Government retains certain
7  rights in this software.
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Lesser General Public
11  License as published by the Free Software Foundation; either
12  version 2.1 of the License, or (at your option) any later version.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public License
20  (lgpl.txt) along with this library; if not, write to the Free Software
21  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 
23  diachin2@llnl.gov, djmelan@sandia.gov, mbrewer@sandia.gov,
24  pknupp@sandia.gov, tleurent@mcs.anl.gov, tmunson@mcs.anl.gov
25 
26  ***************************************************************** */
35 #ifndef MsqFreeVertexIndexIterator_hpp
36 #define MsqFreeVertexIndexIterator_hpp
37 
38 #ifdef MSQ_USE_OLD_C_HEADERS
39 # include <stdlib.h>
40 # include <stddef.h>
41 #else
42 # include <cstddef>
43 # include <cstdlib>
44 #endif
45 
46 #include "Mesquite.hpp"
47 #include "MsqVertex.hpp"
48 #include "PatchData.hpp"
49 
50 namespace Mesquite
51 {
52  class MsqError;
53 
67  public:
70  { iterVertexArray = pd->get_vertex_array(err); }
73  void reset() { initialState=true; iterCurrentIndex=0; }
75  inline bool next();
77  size_t value() {return iterCurrentIndex;}
78  private:
83  };
84 
85 
88  {
89  bool fixed=true;
90  while ( fixed )
91  {
92  if ( initialState==true ) initialState=false;
93  else ++iterCurrentIndex;
94 
96  return false;
97  }
100  //fixed = !(iterVertexArray[iterCurrentIndex].is_free_vertex());
101  }
102  return true;
103  }
104 
105 
106 
107 } // namespace
108 
109 #endif // MsqFreeVertexIndexIterator_hpp
size_t value()
Returns an index corresponding to a free vertex.
Used to hold the error state and return it to the application.
vertex is fixed. This flag can be set on and off.
bool next()
Increments the iterator. returns false if there is no more free vertex.
size_t num_vertices() const
number of vertices in the patch.
const MsqVertex * get_vertex_array(MsqError &err) const
Returns a pointer to the start of the vertex array.
vertex is always fixed. This can only be set on and never off.
iterates over indexes of free vetices in a PatchData.
bool is_flag_set(FlagMaskID flag) const
MsqVertex is the Mesquite object that stores information about the vertices in the mesh...