-
Notifications
You must be signed in to change notification settings - Fork 59
AddingPolarizability
All places in the code, where something should be added, are commented. These comments start with TO ADD POLARIZABILITY FORMULATION
and contain detailed description; the text below is less detailed. Added code should be analogous to polarizability formulations already present. The procedure is the following:
- Add new polarizability descriptor in the file const.h. Starting descriptor name with
POL_
is recommended, as well as adding a descriptive comment. - Add information about the new interaction formulation in the file param.c.
- Modify string constants after
PAR(pol)
in the constant arrayoptions
: add new argument to list{...}
and its description to the next string. - Add one line to the else-if sequence in the function
PARSE_FUNC(pol)
. If new formulation allows sub-arguments, process them here. - If the new polarizability formulation is incompatible with anisotropic material, add an exception in function
VariablesInterconnect
. - Add a case to the relevant switch in the function
PrintInfo
.
- Modify string constants after
- Main part of the code should be added to calculator.c.
- The main logic should be placed in function
CoupleConstant
. The corresponding case should either be added toasym
list (then three components of polarizability are calculated from one refractive index) or to another one, then a scalar function is used. - If new formulation depends on the incident polarization (unlikely) update the test in function
calculate_one_orientation
.
- The main logic should be placed in function
Please refer to section Polarizability prescription of the manual for general overview and precise definition of the dipole polarizability inside ADDA.
If you add a new polarizability formulation to ADDA according to the described procedure, please consider contributing your code to be incorporated in future releases.
Home (Getting started)
Frequently asked questions
Features
Tutorial
Comparison with other codes
Largest simulations
Compiling ADDA
Installing FFTW3
Installing MPI
Using OpenCL
Installing clFFT
Installing clBLAS
Using sparse mode
Installing MinGW
Using MSYS2
Papers that use ADDA
Awards
References
Links
Acknowledgements
Instruction for committers
Code design & structure
Style guide
Using VS Code
Using Eclipse
Early development history
Adding new ...