vtkHyperTreeGrid Paraview example in 2D

I’ve realised I now need to go from an externally stored (say a std::vector of them) unique global indices obtained from GetGlobalIndex(), back to a cursor, is that possible? Does the global index encode some sort of Morton-like ordering?
Thanks,
Andy

Hi, you can set your own indexing in the cursor by calling SetGlobalIndexFromLocal, where you set the index of the current node relative to the hypertree index offset. However, be aware that this API is going to change in next release as when you call this method, GetGlobalIndexStart (method used for implicit indexing) will crash. We will have a better design to switch between implicit and explicit indexing.

Hello,

I think this is the best place to post my question. I am currently looking at the vtkHyperTreeGrid to see how good it fits my needs. Let say that I have a 2D simulation ran over 16 domains using adaptive mesh refinement starting from level 0 up to level max if needed (fully threaded, all domains have the full refinement information but degraded if cells does not belong to the current domain). Until now, I build only one vtkHyperTreeGrid by adding the refinement information of each domains one after another, this works perfectly. Except fot the htg->GetPointData()->GetArray(“anArray”)->GetRange() which gives bad results if no value where added to coarse cells. I would like to exploit the multithreading, is it possible to walk, safely, through the vtkHyperTreeGrid using multiple cursor ?
For example for a resulting tree looking like this : “R|RRRR|…R. … …R. R.R.| etc” and using 4 threads I could initialize 4 cursors at level 1 (or another fully refined level), and process the tree ? Or maybe its better to process sequentially the tree but adding a multiprocess parallelism to build for example 4 vtkHyperTreeGrid on 4 mpi processes (4 domains/process) ?

Please open your own thread.