|
# Arythemtics
|
|
# Arithmetics
|
|
Static codes support two types arithmetics:
|
|
Static codes support two types of arithmetics:
|
|
* `double complex`: `ELEMENT_SIZE=16B`
|
|
* `double complex`: `ELEMENT_SIZE=16B`
|
|
default mode: matrix elements of hamiltonian are assumed to be of complex numbers.
|
|
default mode: matrix elements of hamiltonian are assumed to be of complex numbers.
|
|
* `double`: `ELEMENT_SIZE=8B`
|
|
* `double`: `ELEMENT_SIZE=8B`
|
|
if you know that matrix elements, as well as the solution, will be real numbers (for examples based on symmetries of your problem) you can speed-up the calculation process by switching to double arythmetics. To do this you need to activate in [predefines.h](https://gitlab.fizyka.pw.edu.pl/gabrielw/wslda/-/blob/public/st-project-template/predefines.h) flag:
|
|
if you know that matrix elements, as well as the solution, will be real numbers (for examples based on symmetries of your problem) you can speed-up the calculation process by switching to double arithmetics. To do this you need to activate in [predefines.h](https://gitlab.fizyka.pw.edu.pl/gabrielw/wslda/-/blob/public/st-project-template/predefines.h) flag:
|
|
```c
|
|
```c
|
|
/**
|
|
/**
|
|
* activate this if you know that Hamiltonian matrix is real,
|
|
* activate this if you know that Hamiltonian matrix is real,
|
... | | ... | |