Computation Reuse in Statics and Dynamics Problems for Assemblies of Rigid Bodies