Error estimation and adaptive refinement technique in the method of moments