Learning Memory and Material Dependent Constitutive Laws