Algorithmically imposed thermodynamic compliance for material models in mechanical simulations using the AIM method