This paper reports on a modification of the ordinary density method for solving problems of structural optimization in magnetic fields. The method uses the homogenization design concept. A simple hole is assumed in an element, and the element density is determined according to the size of the hole. The report compares the results based on the modified density method with the results obtained by the homogenization design method (HDM), with special focus on changing the penalization parameter in the density method. The results show different tendencies in magnetic optimization problems compared to those in elastic optimization problems. The results are also discussed according to the global/local definition of the design domain using the density method as well as HDM.