-
Open the terminal.
-
Navigate to your directory (where all needed files are).
-
Run the following commands to compile each file:
gfortran -c particle.f90 -o particle.o gfortran -c main.f90 -o main.o
-
Link the object files to create the final executable:
gfortran particle.o main.o -o simulation
Note: The files main.f90 and particle.f90 are required, with particle.f90 containing the particle module, which is then used in main.f90. This structure is the reason for the final compilation step above.
- Data generated by the program is saved to various data files and can then be visualized using Python scripts, such as p2_visual.py, etc. For example, in Visual Studio Code, you can compile and view the data output, which will appear in a plot format.
-
Execute the compiled program by running:
./simulation