Downloading and Installing

1. The code is written as a single C file and comprressed by WinZip.
2. Download the code from HERE
3. Check the compiler for C programs is installed. You can use any C compiler that you want to compile the program.

For Windows

4. If you want advise check MinGW. compiler. Instruction for installation are in their website.
5. In case you use MiniGW,after you installed it, use cmd and go to folder the C file is stored and write "gcc Magnetic1.2.c -o "name".exe", for name write some word.
6. After successful compilation run the program.

For Linux

7. If you use Linux macshine and have a compiler then compile the program and run it.
8. If you dont know if you have the compiler or dont have it use GNU C compiler for Linux. You can find instructions for installation and running HERE.
9 When the compiler is installed use the guide from the prior section and compile or just go to the folder of the program using terminal and write: "gcc Magnetic1.2.c -o executable-file-name".
10. After succsessful compilation run the program.

Aviz Instructions

After you run the program and have an .XYZ output file you can draw the magnetic field using Aviz software.
The ouput file looks like that:Adirondack Stream
The first line represents the number of lines in the file except the first two. Then comes the name of the file that will be represented in Aviz. The next line have a capital letter that represents the magnitude of the field, x,y,z coordinates of the grid when the z are always zero. In the end of this line two components of magnetic field are stored.

Setting a view

Open Aviz by writing "aviz" in command line of Linux system (if aviz is not installed ssh to aluf computer and work on it). Go to "file" -> "Open" and navigate to your .XYZ file and open it.
For Mode choose "Spin" representation and for Style "Cones/Spins".
Now set the view by going to "View" -> "Set Viewpoint" -> "XY+".
So the main panel will look like that: Adirondack Stream
Than you can choose the color of the elements, go to "Elements" and then to "Spins..." you will get the next panel: Adirondack Stream
Use "Type" to choose different elements and "set color..." to change their color. Remember that as later the letter comes in ABC the stronger the magnetic field it corresponds to.