System Programming for Computational Mechanics