- Download and uncompress the file gaussian-beam.tar.gz
- To plot a beam, introduce the material and scale parameters as in the file ejemplo.params and save a copy in the folder graficar. The file can be renamed as long as the extension is unchanged. Parameters are:
- geometrical
- D
- distance between adjacent vectors for vector fields
- x_min, x_max, z_min, z_max
- coordinates that determine the rectangle being plotted
- theta_i
- angle of incidence (in radians)
- dx
- length of pixel in x-direction (length in z-direction is made equal to this by default)
- wave
- p
- width of the beam multiplied by the wavenumber in vacuum
- material
- mu_par
- parallel component of the magnetic permeability tensor (real)
- mu_ort
- orthogonal component of the magnetic permeability tensor (real)
- n_par2
- product of epsilon_parallel and mu_parallel
- numerical (Euler method is used)
- h
- step size
- inf
- value of infinity
- options
- graf
- sum of one or more of the following constants:
- GRAF_INTENSIDAD
- plot the average electric energy density
- GRAF_MAXIMOS
- plot the line of maximum values of E^2
- GRAF_ExB
- plot the S_H field
- GRAF_ExH
- plot the S_B field
- GRAF_ExM
- plot the ExM field
- GRAF_DIVExH
- plot the divergence of ExH
- GRAF_DIVExB
- plot the divergence of ExB
- GRAF_ANGULO_K
- plot the direction of the main ExB
- GRAF_ANGULO_S
- plot the direction of the main ExH
- GRAF_IExH
- plot the magnitude of S_H (i_h)
- GRAF_IExB
- plot the magnitude of S_B (i_b)
- GRAF_INTERFAZ
- draw the interface (z=0)
- GRAF_E2_IExH
- plot the proportion between i_u and i_h
- GRAF_IExB_IExH
- plot the proportion between i_b and i_h

- escalar_ce
- if set to 1, scales the intensity plots in order for the maximum to be 1
- escalar_cv
- if set to 1, scales the vector fields in orfer for their maximum magnitude to be 1
- Open a terminal in the previously uncompressed folder and run ./graficar.sh.
- Each file with the extension params in the graficar subfolder will be processed and the resulting graphics will be saved in the resultado subfolder. The resulting filenames will be the same as the input, but with different suffixes, indicating what is plotted (according to the options described above). Once the file is processed, a tick (✔) will be added to the filename to indicate success and avoid further processing. The original params file will be copied to the resultado subfolder for future reference.
- To facilitate debugging, all intermediate files are kept in the tmp subfolder. This includes the generated data files, the gnuplot files and the c code, all with their filenames matching the corresponding parameter file.
- The resulting files depend on the gnuplot terminal selected (currently pdflatex). General changes to the plot can be made by modifying the template graficar.gnuplot in the main folder. The corresponding template for the c code is calcular.c.