Error Estimation Criteria to Couple the Immersed Boundary Method with an Automated Adaptive Grid Algorithm