Computational mechanics