reformulate code framework for generic type of mesh data structure (triangle and tetraheron)