simpeg / discretize

Discretization tools for finite volume and inverse problems.

Home Page:http://discretize.simpeg.xyz/

Repository from Github https://github.comsimpeg/discretizeRepository from Github https://github.comsimpeg/discretize

Use std::unordered_map in tree.h

domfournier opened this issue · comments

Recommendation from K Davis.
Using unordered should speed up the creation

So got a chance to chat with him at PDAC, unordered maps would speed up creation, however we would loose any guarantee of ordering of nodes, edges, and faces from one call to the next.

Right now the ordering of faces is guaranteed to be in certain order (although it is not necessarily obvious to the user). Thus, if you saved a mesh to disk, read it back in, those faces would be in the same order as they were before. The unordered map would not be able to guarantee this property, which means we are likely stuck with the normal standard map.

Closing this issue for now, we might be able to revisit in the future, but I think we are stuck with using ordered maps to guarantee the meshes are self consistent from 1 run to the next.