Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MsqFreeVertexIndexIterator Class Reference

iterates over indexes of free vetices in a PatchData. More...

#include <MsqFreeVertexIndexIterator.hpp>

Collaboration diagram for MsqFreeVertexIndexIterator:

Public Member Functions

 MsqFreeVertexIndexIterator (PatchData *pd, MsqError &err)
 
void reset ()
 Resets the iterator. More...
 
bool next ()
 Increments the iterator. returns false if there is no more free vertex. More...
 
size_t value ()
 Returns an index corresponding to a free vertex. More...
 
 MsqFreeVertexIndexIterator (PatchData *pd, MsqError &err)
 
void reset ()
 Resets the iterator. More...
 
bool next ()
 Increments the iterator. returns false if there is no more free vertex. More...
 
size_t value ()
 Returns an index corresponding to a free vertex. More...
 

Private Attributes

PatchDataiterOriginator
 
size_t iterCurrentIndex
 
MsqVertexiterVertexArray
 
bool initialState
 

Detailed Description

iterates over indexes of free vetices in a PatchData.

A free vertex is defined as not having the MSQ_SOFT_FIXED and MSQ_HARD_FIXED flags activated.

Use the iterator as follow: MsqFreeVertexIndexIterator ind(&patch_data,err); ind.reset(); while (ind.next()) { cout << ind.value(); } .

Definition at line 66 of file includeLinks/MsqFreeVertexIndexIterator.hpp.

Constructor & Destructor Documentation

Member Function Documentation

bool next ( )
inline

Increments the iterator. returns false if there is no more free vertex.

Definition at line 87 of file includeLinks/MsqFreeVertexIndexIterator.hpp.

References MsqFreeVertexIndexIterator::initialState, MsqVertex::is_flag_set(), MsqFreeVertexIndexIterator::iterCurrentIndex, MsqFreeVertexIndexIterator::iterOriginator, MsqFreeVertexIndexIterator::iterVertexArray, MsqVertex::MSQ_HARD_FIXED, MsqVertex::MSQ_SOFT_FIXED, and PatchData::num_vertices().

Referenced by PatchData::get_max_vertex_movement_squared(), PatchData::move_free_vertices_constrained(), SmartLaplacianSmoother::optimize_vertex_positions(), Randomize::optimize_vertex_positions(), LaplacianSmoother::optimize_vertex_positions(), ConjugateGradient::optimize_vertex_positions(), SteepestDescent::optimize_vertex_positions(), FeasibleNewton::optimize_vertex_positions(), NonSmoothSteepestDescent::optimize_vertex_positions(), and PatchData::set_free_vertices_constrained().

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  }
vertex is fixed. This flag can be set on and off.
size_t num_vertices() const
number of vertices in the patch.
vertex is always fixed. This can only be set on and never off.
bool is_flag_set(FlagMaskID flag) const

Here is the call graph for this function:

Here is the caller graph for this function:

bool next ( )
inline

Increments the iterator. returns false if there is no more free vertex.

void reset ( )
inline
size_t value ( )
inline

Returns an index corresponding to a free vertex.

Definition at line 77 of file src/Mesh/MsqFreeVertexIndexIterator.hpp.

References MsqFreeVertexIndexIterator::iterCurrentIndex.

Member Data Documentation

bool initialState
private
PatchData * iterOriginator
private

The documentation for this class was generated from the following files: