Wednesday, July 13, 2016

Make B-Spline Grid iterators work

Form last week I continued with the other important features of a DUNE like gird for B-Spline.
  • A BSplineGridEntity class
    template<int codim, class GridViewImp> class BSplineGridEntity
  • represents each valid knot hypercube of a BSpline patch. It wraps a BSplineLeafGridView pointer and a direct index of the knot hypercube.  The  index i indicated the ith valid knot span of all valid knot spans. A geometry function is provides to access the B-Spline geometry operated on this entity(knot span). 
  • Completed the BSplineGridLeafIterator class
    Made it a subclass of the ForwardIteratorFacade class using the Barton-Nackman trick. Implemented the deference, equals and increment function which corresponds to the operand overloading of *, == and ++ separately.
  • Completed the BSplineLeafGridView class
    with a begin and end function which returns the corresponding BSplineGridLeafIterator object to support range-based for loop.
  • Added some new members in the BSplinePatch class
    Namely, a MultiDimensionNet of all valid knots. Pay attention here, each valid knot hypercube is a point of the MultiDimensionNet. The purpose of making such a net is to easily transfer a global knot index into a multidimensional index which is required by the geometry function of BSplinePatch.
Currently, I still have problem with compling the code of above changes. To be specific, the ForwardIteratorFacade class overloads the increment function in a way where a reference of the entity should be returned. But I created an entity locally, which is not possible to return by reference. I will talk to mentor and try to solve this problem.






  • No comments:

    Post a Comment