#include <focus3d_parameters.h>
Public Member Functions | |
| focus3d_parameters () | |
| A Constructor. | |
| focus3d_parameters (string filename) | |
| A Constructor. | |
| bool | load (string filename) |
| A method for loading parameters from a file. | |
| bool | save (string filename) |
| A method for saving parameters to a file. | |
| void | print () |
| A method for printing parameters to the screen. | |
| bool | test () |
| A method for testing the sanity of the current parameters. | |
| void | set_default () |
| A method for setting default values.. | |
| focus3d_parameters & | operator= (const focus3d_parameters &fp) |
| Overloaded "=" operator. | |
| bool | operator== (const focus3d_parameters &fp) const |
| Overloaded "==" operator. | |
| bool | operator!= (const focus3d_parameters &fp) const |
| Overloaded "!=" operator. | |
Public Attributes | |
| int | Nx |
| int | Ny |
| int | Nz |
| int | Ntheta |
| int | Nphi |
| double | xmin |
| double | xmax |
| double | ymin |
| double | ymax |
| double | zmin |
| double | zmax |
| double | theta_min |
| double | theta_max |
| double | phi_min |
| double | phi_max |
| double | lambda |
| double | f |
Use the objects of this class to pass the input values to objects of the focus3d and the dipole_radiation classes.
The data members of this class correspond to the simulation parameters such as the number of the grid points as well as the minium and the maximum coordinates along x, y, z, theta (polar angle), and phi (azimuthal angle) directions. This member list also includes the focal length (f) of the lens and the wavelength (lambda) of light. The units of all angles is radians and the units of lengths is in
. All the data members are public and hence can be set from the program.
To assist in filling in the values of the data members the previously stored values of the parameters can be loaded using the the constructor focus3d_parameters(string filename) of the method load(string filename). The parameters can also be saved in an ascii file using the method save(string outfilename). Programmer would generally use these three methods. But for futher assistance a few more methods are provided.
If the programmer does not know how to generate a parameters file, a method, set_default(), is provided which will set default values to the data members; these values can be eventually saved using save() or can be summarized using print() methods. The sanity of the parameters can be tested using the method test() which will return a false if the parameters do not pass certain intuitive and obvious conditions.
Note:
| focus3d_parameters::focus3d_parameters | ( | ) |
A Constructor.
A constructor that sets all the data members to zero.
| focus3d_parameters::focus3d_parameters | ( | string | filename | ) |
A Constructor.
A constructor loads the data memebers from an external file 'filename'. Internally this constructor calls the load() method of this class.
| filename | - a std::string containing the name of the parameter file |
| bool focus3d_parameters::load | ( | string | filename | ) |
A method for loading parameters from a file.
A method for loading the data members from an ascii file 'filename'. The format of this ascii file is as follows. It contains the values of the data members one in each line in the order: lambda, f, Nx, Ny, Nz, Ntheta, Nphi, xmin, xmax, ymin, ymax, zmin, zmax, theta_min, theta_max, phi_min, phi_max.
| filename | - a std::string containing the name of the parameter file |
| bool focus3d_parameters::save | ( | string | filename | ) |
A method for saving parameters to a file.
Saves the data members of this class to a parameter file. The format of this ascii file is as follows. It contains the values of the data members one in each line in the order: lambda, f, Nx, Ny, Nz, Ntheta, Nphi, xmin, xmax, ymin, ymax, zmin, zmax, theta_min, theta_max, phi_min, phi_max.
| filename | - a std::string conatining the name of the parameter file |
| void focus3d_parameters::print | ( | ) |
A method for printing parameters to the screen.
Prints the current data members of this class to the screen.
| bool focus3d_parameters::test | ( | ) |
A method for testing the sanity of the current parameters.
Tests if the parameters meet certain obvious conditions such as xmin < xmax, Nx > 0, etc.
| void focus3d_parameters::set_default | ( | ) |
A method for setting default values..
Sets default and sane values to the parameters of this object. This method can be used initially to generate a valid parameter file and then modify it according to the needs.
| focus3d_parameters & focus3d_parameters::operator= | ( | const focus3d_parameters & | fp | ) |
Overloaded "=" operator.
Overloads the equal-to operator.
| bool focus3d_parameters::operator== | ( | const focus3d_parameters & | fp | ) | const |
Overloaded "==" operator.
Overloads the == operator.
| bool focus3d_parameters::operator!= | ( | const focus3d_parameters & | fp | ) | const |
Overloaded "!=" operator.
Overloads the != operator.
Number of x-points
Number of y-points
Number of z-points
Number of theta-points
Number of phi-points
| double focus3d_parameters::xmin |
minimum value of x in microns
| double focus3d_parameters::xmax |
maximum value of x in microns
| double focus3d_parameters::ymin |
minimum value of y in microns
| double focus3d_parameters::ymax |
maximum value of y in microns
| double focus3d_parameters::zmin |
minimum value of z in microns
| double focus3d_parameters::zmax |
maximum value of z in microns
minimum value of theta in rad - lower limit of integration
maximum value of theta in rad - upper limit of integration
| double focus3d_parameters::phi_min |
minimum value of phi in rad - lower limit of integration
| double focus3d_parameters::phi_max |
maximum value of phi in rad - upper limit of integration
| double focus3d_parameters::lambda |
wavelength in microns
| double focus3d_parameters::f |
focal length of the lens in microns
1.5.5