Moved to noncubic domains.

This give me more confidence in the solver.
Added calc E functions for each dimension.

Set up tools.py to call _tools, so that the code in the cython _tools module can be exposed through a pure python file.