A computation technology has been developed as a tool to provide accurate and detailed magnetostatic simulations for tokamaks. Calculation algorithms are described which allow modelling of complex magnet systems with regard to electromagnetic compatibility of their components and subsystems. The efficiency of the technology has been proved in computations of a typical test blanket module for the International Thermonuclear Experimental Reactor.