![]() |
Hex
2.2
Hydrogen-electron collision solver
|

Go to the source code of this file.
Functions | |
| void | hex_initialize_ (const char *dbname) |
| Initialize the environment. More... | |
| void | hex_initialize (const char *dbname) |
| void | hex_new_ () |
| Create new database. More... | |
| void | hex_new () |
| void | hex_import_ (const char *sqlname) |
| Import SQL batch file. More... | |
| void | hex_import (const char *sqlname) |
| void | hex_update_ () |
| Update integral and complete cross section. More... | |
| void | hex_update () |
| void | hex_optimize_ () |
| Optimize the SQLite database file. More... | |
| void | hex_optimize () |
| void | hex_dump_ (const char *dumpname) |
| Dump contents of the T-matrix table. More... | |
| void | hex_dump (const char *dumpname) |
| void | hex_scattering_amplitude_ (int *ni, int *li, int *mi, int *nf, int *lf, int *mf, int *S, int *nEnergies, double *energies, int *nAngles, double *angles, double *result, double *extra) |
| Scattering anplitude (Fortran). More... | |
| void | hex_scattering_amplitude (int ni, int li, int mi, int nf, int lf, int mf, int S, int nEnergies, double *energies, int nAngles, double *angles, double *result, double *extra) |
| Scattering anplitude (C). More... | |
| void | hex_scattering_amplitude_dir_ (int *ni, int *li, int *mi, int *nf, int *lf, int *mf, int *S, double *E, int *N, double *alpha, double *beta, double *gamma, double *angles, double *result) |
| Scattering anplitude for non-aligned impact direction (Fortran). More... | |
| void | hex_scattering_amplitude_dir (int ni, int li, int mi, int nf, int lf, int mf, int S, double E, int N, double alpha, double beta, double gamma, double *angles, double *result) |
| Scattering anplitude for non-aligned impact direction (C). More... | |
| void | hex_differential_cross_section_ (int *ni, int *li, int *mi, int *nf, int *lf, int *mf, int *S, int *nEnergies, double *energies, int *nAngles, double *angles, double *dcs, double *extra) |
| Differential cross section (Fortran). More... | |
| void | hex_differential_cross_section (int ni, int li, int mi, int nf, int lf, int mf, int S, int nEnergies, double *energies, int nAngles, double *angles, double *dcs, double *extra) |
| Differential cross section (C). More... | |
| void | hex_complete_cross_section_ (int *ni, int *li, int *mi, int *nf, int *lf, int *mf, int *N, double *energies, double *ccs, int *Nall, int *npws, int *pws) |
| Complete cross section (Fortran). More... | |
| void | hex_complete_cross_section (int ni, int li, int mi, int nf, int lf, int mf, int N, double *energies, double *ccs, int *Nall, int npws, int *pws) |
| Complete cross section (C). More... | |
| void hex_complete_cross_section | ( | int | ni, |
| int | li, | ||
| int | mi, | ||
| int | nf, | ||
| int | lf, | ||
| int | mf, | ||
| int | N, | ||
| double * | energies, | ||
| double * | ccs, | ||
| int * | Nall, | ||
| int | npws, | ||
| int * | pws | ||
| ) |
C prototype.
| ni | Initial atomic principal quantum number. |
| li | Initial atomic orbital quantum number. |
| mi | Initial atomic magnetic quantum number. |
| nf | Final atomic principal quantum number. |
| lf | Final atomic orbital quantum number. |
| mf | Final atomic magnetic quantum number. |
| N | Sample count. |
| energies | Real array of impact energies in Rydbergs. |
| ccs | Real array of length N to contain the cross sections. |
| Nall | Number of energies available in database; will be set if ccs is set to null pointer. |
| pws | List of requested partial waves (or null pointer for all). |
| npws | Size of pws. |
| void hex_complete_cross_section_ | ( | int * | ni, |
| int * | li, | ||
| int * | mi, | ||
| int * | nf, | ||
| int * | lf, | ||
| int * | mf, | ||
| int * | N, | ||
| double * | energies, | ||
| double * | ccs, | ||
| int * | Nall, | ||
| int * | npws, | ||
| int * | pws | ||
| ) |
Fortran prototype equivalent to
| ni | Initial atomic principal quantum number. |
| li | Initial atomic orbital quantum number. |
| mi | Initial atomic magnetic quantum number. |
| nf | Final atomic principal quantum number. |
| lf | Final atomic orbital quantum number. |
| mf | Final atomic magnetic quantum number. |
| N | Sample count. |
| energies | Real array of impact energies in Rydbergs. |
| ccs | Real array of length N to contain the cross sections. |
| Nall | Number of energies available in database; will be set if ccs is set to null pointer. |
| pws | List of requested partial waves (or null pointer for all). |
| npws | Size of pws. |
| void hex_differential_cross_section | ( | int | ni, |
| int | li, | ||
| int | mi, | ||
| int | nf, | ||
| int | lf, | ||
| int | mf, | ||
| int | S, | ||
| int | nEnergies, | ||
| double * | energies, | ||
| int | nAngles, | ||
| double * | angles, | ||
| double * | dcs, | ||
| double * | extra | ||
| ) |
C prototype.
| ni | Initial atomic principal quantum number. |
| li | Initial atomic orbital quantum number. |
| mi | Initial atomic magnetic quantum number. |
| nf | Final atomic principal quantum number. |
| lf | Final atomic orbital quantum number. |
| mf | Final atomic magnetic quantum number. |
| S | Total spin (0 = singlet, 1 = triplet). |
| E | Impact energy in Rydbergs. |
| N | Sample count. |
| angles | Real array of length N containing scattering angles. |
| dcs | Real array of length N to contain the cross sections. |
| void hex_differential_cross_section_ | ( | int * | ni, |
| int * | li, | ||
| int * | mi, | ||
| int * | nf, | ||
| int * | lf, | ||
| int * | mf, | ||
| int * | S, | ||
| int * | nEnergies, | ||
| double * | energies, | ||
| int * | nAngles, | ||
| double * | angles, | ||
| double * | dcs, | ||
| double * | extra | ||
| ) |
Fortran prototype equivalent to
| ni | Initial atomic principal quantum number. |
| li | Initial atomic orbital quantum number. |
| mi | Initial atomic magnetic quantum number. |
| nf | Final atomic principal quantum number. |
| lf | Final atomic orbital quantum number. |
| mf | Final atomic magnetic quantum number. |
| S | Total spin (0 = singlet, 1 = triplet). |
| E | Impact energy in Rydbergs. |
| N | Sample count. |
| angles | Real array of length N containing scattering angles. |
| dcs | Real array of length N to contain the cross sections. |
| void hex_dump | ( | const char * | dumpname | ) |
| void hex_dump_ | ( | const char * | dumpname | ) |
The output can be used to construct an equivalent table. The corresponding code is
| void hex_import | ( | const char * | sqlname | ) |
| void hex_import_ | ( | const char * | sqlname | ) |
The effect of this function should be equivalent to direct use of sqlite3 program:
The function uses one line at a time and splits the lines into statements on semicolons. For this reason it does not allow multi-line statements. The statements produced by computational modules have always one statement per line.
| sqlname | Zero-terminated character string. |
| void hex_initialize | ( | const char * | dbname | ) |
| void hex_initialize_ | ( | const char * | dbname | ) |
The function will open existing database with path specified in "dbname". If the database does not exist, a new empty database will be created. Also, all registered variables will be given chance to initialize by the function
This can be used to register special functions needed later in the SQL statements. For example the variable IntegralCrossSection registeres two functions: the simple square root and a more complicated numerical integrator that uses ClenshawCurtis quadrature.
The function "initialize" also disables journalling to speed up insertion of data.
| dbname | Zero-terminated character string. |
| void hex_new | ( | ) |
| void hex_new_ | ( | ) |
This will create the necessary table structure in a new empty database. It is necessary to call initialize first, so that the databse file is created and opened. The tables are created by the call to
for every registered variable. The return value is a vector of SQL statement which are executed.
| void hex_optimize | ( | ) |
| void hex_optimize_ | ( | ) |
Reduces the occupied space using the VACUUM statement.
| void hex_scattering_amplitude | ( | int | ni, |
| int | li, | ||
| int | mi, | ||
| int | nf, | ||
| int | lf, | ||
| int | mf, | ||
| int | S, | ||
| int | nEnergies, | ||
| double * | energies, | ||
| int | nAngles, | ||
| double * | angles, | ||
| double * | result, | ||
| double * | extra | ||
| ) |
C prototype.
| ni | Initial atomic principal quantum number. |
| li | Initial atomic orbital quantum number. |
| mi | Initial atomic magnetic quantum number. |
| nf | Final atomic principal quantum number. |
| lf | Final atomic orbital quantum number. |
| mf | Final atomic magnetic quantum number. |
| S | Total spin (0 = singlet, 1 = triplet). |
| nEnergies | Number of supplied impact energies. |
| energies | Real array of length nEnergies containing impact energies in Rydbergs. |
| nAngles | Number of supplied angles. |
| angles | Real array of length nAngles containing scattering angles. |
| result | Complex array of length nEnergies*nAngles (or real array of twice that length) to contain the amplitudes. |
| extra | Extrapolated result (w.r.t. partial waves); optional - can be set to zero. |
| void hex_scattering_amplitude_ | ( | int * | ni, |
| int * | li, | ||
| int * | mi, | ||
| int * | nf, | ||
| int * | lf, | ||
| int * | mf, | ||
| int * | S, | ||
| int * | nEnergies, | ||
| double * | energies, | ||
| int * | nAngles, | ||
| double * | angles, | ||
| double * | result, | ||
| double * | extra | ||
| ) |
Fortran prototype equivalent to
| ni | Initial atomic principal quantum number. |
| li | Initial atomic orbital quantum number. |
| mi | Initial atomic magnetic quantum number. |
| nf | Final atomic principal quantum number. |
| lf | Final atomic orbital quantum number. |
| mf | Final atomic magnetic quantum number. |
| S | Total spin (0 = singlet, 1 = triplet). |
| nEnergies | Number of supplied impact energies. |
| energies | Real array of length nEnergies containing impact energies in Rydbergs. |
| nAngles | Number of supplied angles. |
| angles | Real array of length nAngles containing scattering angles. |
| result | Complex array of length nEnergies*nAngles (or real array of twice that length) to contain the amplitudes. |
| extra | Extrapolated result (w.r.t. partial waves); optional - can be set to zero. |
| void hex_scattering_amplitude_dir | ( | int | ni, |
| int | li, | ||
| int | mi, | ||
| int | nf, | ||
| int | lf, | ||
| int | mf, | ||
| int | S, | ||
| double | E, | ||
| int | N, | ||
| double | alpha, | ||
| double | beta, | ||
| double | gamma, | ||
| double * | angles, | ||
| double * | result | ||
| ) |
C prototype.
See hex_scattering_amplitude_dir_ for theory.
| ni | Initial atomic principal quantum number. |
| li | Initial atomic orbital quantum number. |
| mi | Initial atomic magnetic quantum number. |
| nf | Final atomic principal quantum number. |
| lf | Final atomic orbital quantum number. |
| mf | Final atomic magnetic quantum number. |
| S | Total spin (0 = singlet, 1 = triplet). |
| E | Impact energy in Rydbergs. |
| N | Sample count. |
| alpha | Impact angle (first of Euler angles). |
| beta | Impact angle (second of Euler angles). |
| gamma | Impact angle (third of Euler angles). |
| angles | Real array of length N containing scattering angles. |
| result | Complex array of length N (or real array of length 2N) to contain the amplitudes. |
| void hex_scattering_amplitude_dir_ | ( | int * | ni, |
| int * | li, | ||
| int * | mi, | ||
| int * | nf, | ||
| int * | lf, | ||
| int * | mf, | ||
| int * | S, | ||
| double * | E, | ||
| int * | N, | ||
| double * | alpha, | ||
| double * | beta, | ||
| double * | gamma, | ||
| double * | angles, | ||
| double * | result | ||
| ) |
This function will evaluate the scattering amplitude when the projectile is coming in a direction different from the quantization axis, i.e. when
\[ \mathbf{k}_i \neq (0, 0, k_i) \,. \]
In that case the of the scattering amplitude can be computed using Wigner d-function and all possible amplitudes from scattering between various magnetic levels. The reason for this is that such situation is equivalent to a change of the quantization axis by the same amount. To be precise, it is
\[ T_{n_f l_f m_f \leftarrow n_i l_i m_i} = \sum_{m_i' m_f'} D_{m_i' m_i}^{l_i} D_{m_f' m_f}^{l_f \ast} T_{n_f l_f m_f' \leftarrow n_i l_i m_i'} \,. \]
Fortran prototype equivalent to
| ni | Initial atomic principal quantum number. |
| li | Initial atomic orbital quantum number. |
| mi | Initial atomic magnetic quantum number. |
| nf | Final atomic principal quantum number. |
| lf | Final atomic orbital quantum number. |
| mf | Final atomic magnetic quantum number. |
| S | Total spin (0 = singlet, 1 = triplet). |
| E | Impact energy in Rydbergs. |
| N | Sample count. |
| alpha | Impact angle (first of Euler angles). |
| beta | Impact angle (second of Euler angles). |
| gamma | Impact angle (third of Euler angles). |
| angles | Real array of length N containing scattering angles. |
| result | Complex array of length N (or real array of length 2N) to contain the amplitudes. |
| void hex_update | ( | ) |
| void hex_update_ | ( | ) |
This function is used after import of T-matrices. All variables will be given chance to update themselves using the function
which returns SQL statement that should do the update. If a variable uses other variables besides T-matrices for its update, it must be inserted to VariableList AFTER those variables, because the order of update is set by the order in the list.
1.8.13