Finite element simulation of nanoindentation tests using a macroscopic computational model