I have found a couple of (very similar) papers discussing a coordinate system using a grid of rhombic dodecahedrons, but the equations they give for converting from Cartesian space to this new coordinate system cannot be easily transformed to return the coordinates of the enclosing dodecahedron. The coordinate system used does not matter to me so long as each dodecahedron can be uniquely identified using its coordinates.
I have found this very helpful website with instructions on how to find the coordinates of the enclosing hexagon given a grid of hexagons. I would like to do something similar in 3D.
An answer in C would be best, but at least the theory would be greatly appreciated.
Thanks to C614's comment I was able to write this code to solve my problem: