Pattern search approach to ferromagnetic material modelling