[MOAB-dev] iMesh_stepIter

James Porter jvporter at wisc.edu
Wed Feb 29 12:42:22 CST 2012


On Wed, 2012-02-29 at 10:33 -0600, Steve Jackson wrote:
> After using pytaps to build a structured mesh of size 100x100x100, I
> walked over the whole mesh in a non-standard iteration order.  My
> iteration algorithm works as follows:
> 
> * Find the i,j,k coordinates of the next mesh element.
> * Compute N, the offset from the zeroth hexahedron in the mesh, based
> on i, j, and k.
> * Advance a pytaps array iterator N steps using a single call to
> stepIter.
> * Return the first item from this pytaps iterator, and reset the
> iterator.
> 
> The bad news: while a standard pytaps iterator can walk over a 1
> million element mesh in under a second, this customized approach takes
> more than ten minutes.

Do you know where the bottleneck in your algorithm is?

- Jim



More information about the moab-dev mailing list