An iterative method to calculate forces exerted by single cells and multicellular assemblies from the detection of deformations of flexible substrates