Prism gravity must be consistent around prism

Implemented a test to check if this passes. Fails for now.
Fix prism around tests and most tests pass

Made safe_atan2 and safe_log functions that correct the arctan2 quadrant
and log(0) limit for the formula. Only test failing now if for tensor
cross-components when points align with the prism edges in some faces.