Computer Simulation of Laser-Induced Ultrafast Demagnetization and Switching Dynamics of Magnetically Ordered Materials