//#####################################################################
// Copyright 2005-2017, Eran Guendelman, Lin Huang, Avi Robinson-Mosher, Andrew Selle, Jonathan Su.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
// Class NODE_ITERATOR_THREADED
//#####################################################################
#ifndef __NODE_ITERATOR_THREADED__
#define __NODE_ITERATOR_THREADED__

#include <Core/Grids/FACE_INDEX.h>
#include <Core/Grids/GRID.h>
#include <Core/Grids/GRID_ITERATOR_BASE.h>
namespace PhysBAM{

template<class TV>
class NODE_ITERATOR_THREADED:public GRID_ITERATOR_BASE<TV>
{
    typedef VECTOR<int,TV::m> IV;
public:
    typedef TV VECTOR_T;
    using GRID_ITERATOR_BASE<TV>::index;using GRID_ITERATOR_BASE<TV>::Add_Region;using GRID_ITERATOR_BASE<TV>::Reset;using GRID_ITERATOR_BASE<TV>::Reset_Regions;

    NODE_ITERATOR_THREADED(const GRID<TV>& grid_input,const int number_of_ghost_cells=0);
    NODE_ITERATOR_THREADED(const GRID<TV>& grid_input,const RANGE<IV>& region_input);

    const IV& Node_Index() const
    {return index;}
};
//#####################################################################
}
#endif
