PERF: Do not compute half cell sizes multiple times; cache them

Change-Id: I459a5515aa777f9f8a962d8fc0e611c786881030
Modified HyperTree API so cursor have direct access to grid scales

This is motivated by the fact that we need rapid access to a
neighboring leaf's x-y-z scales to apply ad-hoc boundary fixes
from a masked cell "pulling" the boundary.

Change-Id: I88c31ca2aab22daf69fa510f02e00d98680e842f
Whitespace cleanup

Change-Id: Ib5547bdbbb42d3a7005e0e890117c0e43d9f9556
Modified hyper tree implementation so hyper tree grid can access scales

This accelerates the construction of the dual, and makes it more
general in terms of acceptable geometries.

Change-Id: I0cbca95b8d130920649b2cdfb68e646b6348c6b0
Whitespace cleanu

Change-Id: I37002fb456035cc5e0b3dc7c70c4bd792f02dfb3
PERF: compute negative powers of branch factor only once, then cache

Change-Id: If68ea2f57e8b2cdda1df87549c458c31a320b7f4
Added a test

Change-Id: I3985478408c44e56b4f3da8a1df7d559bed229d5
A 2D test, to ensure visually that all is fine in the ternary case

Change-Id: I7704b8c3a76df56836ada4d31edc962dda40d066
Added a new test case; ternary + 2D + material, quite tricky

Change-Id: I62de7092135371c559908ddc880cc3c7d40661de
Implemented reverse boundary connection for material in 2D case

This is an additional fix to be used in relatively infrequent
topological configurations (at corners between cells of different
material and different depth levels, when "viewed" from the
non-material size). Albeit unfrequent, it is necessary to treat
this case for completeness.

Change-Id: I119d147e1f34aeefee5ddb8677485b33d5778c94
Implemented reverse boundary connection for material in 3D case

This is an additional fix to be used in relatively infrequent
topological configurations (at edges & corners between cells of different
material and different depth levels, when "viewed" from the
non-material size). Albeit unfrequent, it is necessary to treat
this case for completeness.

Change-Id: Id66b14db1251210a26844aeab788883a3c0d9233
White space clean up

Change-Id: I9307d2bf5d3734126b101c2b0a9dc8915003fe49
Merge topic 'implement_material_duality_fixes' into master

c6ce57b2 White space clean up
88857b3c Implemented reverse boundary connection for material in 3D case
0738dbfb Implemented reverse boundary connection for material in 2D case
b7047d89 Added a new test case; ternary + 2D + material, quite tricky
01ee545f A 2D test, to ensure visually that all is fine in the ternary case
2ed71fc6 Added a test
89b7ed75 PERF: compute negative powers of branch factor only once, then cache
4d469dc0 Whitespace cleanu
d4f43617 Modified hyper tree implementation so hyper tree grid can access scales
72775055 Whitespace cleanup
3b8c8b38 Modified HyperTree API so cursor have direct access to grid scales
25e614d4 PERF: Do not compute half cell sizes multiple times; cache them