A Framework for 'Smart' Computational Micromechanics