Modeling of a micromagnetic imprinting process