Procedure | Location | Procedure Type | Description |
---|---|---|---|
add_bmatrix_terms | mod_matrix_manager | Interface | |
add_conduction_matrix_terms | mod_matrix_manager | Interface | |
add_cooling_matrix_terms | mod_matrix_manager | Interface | |
add_element | mod_matrix_structure | Subroutine | Adds a given element at a certain (row, column) position to the matrix datastructure. Elements that are zero are not added, sanity checks are done on the row and column indices. |
add_flow_matrix_terms | mod_matrix_manager | Interface | |
add_hall_bmatrix_terms | mod_matrix_manager | Interface | |
add_hall_matrix_terms | mod_matrix_manager | Interface | |
add_natural_conduction_terms | smod_natural_boundaries | Interface | |
add_natural_flow_terms | smod_natural_boundaries | Interface | |
add_natural_hall_Bterms | smod_natural_boundaries | Interface | |
add_natural_hall_terms | smod_natural_boundaries | Interface | |
add_natural_regular_terms | smod_natural_boundaries | Interface | |
add_natural_resistive_terms | smod_natural_boundaries | Interface | |
add_natural_viscosity_terms | smod_natural_boundaries | Interface | |
add_node | mod_matrix_row | Subroutine | Adds a new node to the linked list with a given column index and value. |
add_regular_matrix_terms | mod_matrix_manager | Interface | |
add_resistive_matrix_terms | mod_matrix_manager | Interface | |
add_to_node_element | mod_matrix_node | Subroutine | Adds a given element to the node element, does type-checking of the polymorphic element given. Allowed types are complex, real, integer. |
add_viscosity_matrix_terms | mod_matrix_manager | Interface | |
adiabatic_homo_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
allow_geometry_override | mod_equilibrium | Subroutine | Allows overriding geometry and grid-related parameters. Sets default values for the geometry and grid start/end. If this subroutine is used to set geometry/grid values in the submodule it becomes possible to override them through the parfile. Warnings will always be printed if this happens. |
append_node | mod_matrix_row | Subroutine | Subroutine to append a new node to an already existing list of nodes. A new node is created, appended, and the tail is updated. |
apply_boundary_conditions | mod_boundary_manager | Subroutine | |
apply_essential_boundaries_left | mod_boundary_manager | Interface | |
apply_essential_boundaries_right | mod_boundary_manager | Interface | |
apply_natural_boundaries_left | mod_boundary_manager | Interface | |
apply_natural_boundaries_right | mod_boundary_manager | Interface | |
arnoldi | mod_solvers | Interface | interface to the different solution methods implemented in submodules |
array_to_banded | mod_transform_matrix | Interface | |
array_to_complex_banded | mod_transform_matrix | Subroutine | Converts a given array to a banded datastructure. |
array_to_complex_hermitian_banded | mod_transform_matrix | Subroutine | Converts a given array to a Hermitian banded datastructure. |
array_to_hermitian_banded | mod_transform_matrix | Interface | |
array_to_matrix | mod_transform_matrix | Interface | |
assemble_eigenfunction | mod_eigenfunctions | Interface | |
assemble_eigenfunction_grid | mod_eigenfunctions | Subroutine | Allocates and assembles the eigenfunction grid, checks the corresponding scale factor as well. |
assert | mod_assert | Subroutine | Utility function used by assert.fpp's |
banded_matrix_x_vector | mod_banded_operations | Function | Calculates the matrix-vector product of a general complex banded matrix and a complex vector. Uses the level 2 BLAS routine zgbmv. |
banded_to_array | mod_transform_matrix | Interface | |
banded_to_complex_array | mod_transform_matrix | Function | Converts a banded datastructure to a full complex array. |
build_matrices | mod_matrix_manager | Subroutine | |
calculate_base_eigenfunctions | mod_eigenfunctions | Interface | |
calculate_derived_eigenfunctions | mod_eigenfunctions | Interface | |
calculate_eigenfunctions | mod_eigenfunctions | Subroutine | Calculates both the base eigenfunctions and the derived quantities thereof based on a 2D array of right eigenvectors. |
character_arr_tostr | mod_logging | Function | Converts an array of characters to a string. |
check_and_set_supplied_unit_normalisations | mod_input | Subroutine | Checks the unit normalisations that are supplied (if any), sets the unit normalisations if valid. |
check_global_eigenfunction_subset_parameters | mod_input | Subroutine | Called when the eigenfunction subset selection is enabled, this checks if the global variables are properly set. |
check_if_normalisations_set | mod_units | Subroutine | Checks if normalisations are set. If normalisations are not set, set them to default values. These are 1 MK as unit temperature, 10 Gauss as unit magnetic field and 1e9 cm as a unit length. If normalisations are already set through the equilibrium submodule or parfiles nothing is done. |
check_if_pp_quantities_can_be_calculated | smod_derived_efs | Subroutine | Determines if parallel/perpendicular quantities can be calculated and sets the corresponding module flag. This flag will be false if there is a non-zero B01 component present, or no magnetic field. |
check_on_axis_values | mod_inspections | Subroutine | Checks if on-axis regularity conditions are satisfied in cylindrical geometry. We check if and are smaller than 1e-3 on-axis. Nothing is checked if the geometry is Cartesian. |
check_wavenumbers | mod_inspections | Subroutine | Sanity check on the wavenumbers. Checks if k2 is an integer in cylindrical geometry. |
clean_derived_eigenfunctions | mod_eigenfunctions | Interface | |
cleanup | legolas | Subroutine | Deallocates all main variables, then calls the cleanup routines of all relevant subroutines to do the same thing. |
complex_is_equal | mod_check_values | Function | Equality check between complex values |
complex_is_zero | mod_check_values | Function | Checks if complex values are zero |
complex_tostr | mod_logging | Function | Converts a given complex number to a string, the default format is "f20.8". This will be printed in the form xxxx + xxxxi. |
constant_current_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
contains_NaN_complex | mod_check_values | Function | Checks a given complex value/array/matrix for NaN. |
contains_NaN_real | mod_check_values | Function | Checks a given real value/array/matrix for NaN. |
continuity_equil_conditions | mod_inspections | Subroutine | Checks the continuity equation for the equilibrium state. This is given by |
copy | mod_matrix_structure | Function | Dedicated function to copy a matrix structure into a new matrix structure. The datastructure contains pointers, such that simply setting matrix1 = matrix2 may result in pointer target losses (and wrong results). |
coronal_flux_tube_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
couette_flow_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
cputic | mod_timing | Subroutine | Subroutine to start a CPU timer. |
cputoc | mod_timing | Subroutine | Subroutine to end a CPU timer. |
create_atmosphere_curves | mod_solar_atmosphere | Subroutine | Interpolates the atmospheric tables to the desired resolution. The temperature derivative is obtained numerically. |
create_cooling_curve | mod_radiative_cooling | Subroutine | Creates an interpolated cooling curve based on the chosen table. Calls a second-order polynomial interpolation routine and takes care of normalisations. |
create_datfile | mod_output | Subroutine | Writes the datfile, where eigenfunctions and matrices are optionally included. First a header is written containing default information on the configuration, then the actual data. |
create_eigenfunctions | legolas | Subroutine | Initialises and calculates the eigenfunctions if requested. |
create_first_node | mod_matrix_row | Subroutine | Subroutine to add the first node to the linked list. Allocates a new node and sets both the head and tail to this node. |
create_logfile | mod_output | Subroutine | Creates a logfile. If basename_logfile is specified in the datfile, a logfile is written. This is a pure textfile containing the real and imaginary parts of the eigenvalues, written in an exponential format. This is mainly used for testing purposes but may come in handy to do some quick inspections on the data. |
create_matrices | mod_matrix_creation | Subroutine | Main subroutine to assemble the matrices A and B, which are already allocated when entering this subroutine but not yet initialised. The quadblock is calculated for every grid interval and used to assemble both matrices. On exit, both matrices are fully assembled and boundary conditions are imposed. |
cubic_factors | mod_spline_functions | Subroutine | Calculates the cubic basis functions. |
cubic_factors_deriv | mod_spline_functions | Subroutine | @brief Calculates the derivatives of the cubic basis functions. |
cubic_factors_deriv2 | mod_spline_functions | Subroutine | @brief Calculates the second derivatives of the cubic basis functions. |
deallocate_bfield_type | mod_types | Subroutine | Deallocates all attributes contained in the magnetic field type. |
deallocate_conduction_type | mod_types | Subroutine | Deallocates all attributes contained in the thermal conduction type. |
deallocate_cooling_type | mod_types | Subroutine | Deallocates all attributes contained in the radiative cooling type. |
deallocate_density_type | mod_types | Subroutine | Deallocates all attributes contained in the density type. |
deallocate_gravity_type | mod_types | Subroutine | Deallocates all attributes contained in the gravity type. |
deallocate_hall_type | mod_types | Subroutine | Deallocates all attributes contained in the Hall type. |
deallocate_resistivity_type | mod_types | Subroutine | Deallocates all attributes contained in the resistivity type. |
deallocate_temperature_type | mod_types | Subroutine | Deallocates all attributes contained in the temperature type. |
deallocate_type | mod_types | Interface | interface to deallocate all the different types |
deallocate_velocity_type | mod_types | Subroutine | Deallocates all attributes contained in the velocity type. |
default_b02_profile | mod_solar_atmosphere | Function | Sets the default profile for B02, taken to be zero. |
default_b03_profile | mod_solar_atmosphere | Function | Sets the default profile for B03, taken to be a uniform field of 10 Gauss. |
default_db02_profile | mod_solar_atmosphere | Function | Sets the default profile for dB02, taken to be zero. |
default_db03_profile | mod_solar_atmosphere | Function | Sets the default profile for dB03, taken to be zero. |
default_gravity_profile | mod_solar_atmosphere | Function | Sets the default profile for the gravitational field, taken to be |
delete | mod_matrix_node | Subroutine | Destructor, deallocates the node attributes. |
delete_matrix | mod_matrix_structure | Subroutine | Deallocates the matrix datastructure, nullifies all corresponding pointers and deallocates the various nodes in the rows. |
delete_node_from_row | mod_matrix_row | Subroutine | Deletes a given node from the current row. |
delete_row | mod_matrix_row | Subroutine | Deletes a given linked list row by recursively iterating over all nodes. Nullifies the pointers and deallocates the elements. |
destroy | mod_arpack_type | Subroutine | Destructor, deallocates variables. |
destroy | mod_banded_matrix | Subroutine | Destructor, deallocates the datastructure. |
destroy | mod_banded_matrix_hermitian | Subroutine | Destructor, deallocates the datastructure. |
dimensions_are_valid | mod_banded_matrix | Function | Checks if the given matrix dimensions are valid. For now, we only accept
square matrices. Returns |
discrete_alfven_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
eigenfunctions_clean | mod_eigenfunctions | Subroutine | Cleaning routine. |
eigenvalue_is_inside_subset_radius | mod_eigenfunctions | Function | Checks if a specific eigenvalue is within the provided subset radius. |
end_timer | mod_timing | Function | |
equilibrium_clean | mod_equilibrium | Subroutine | Cleaning routine, deallocates the equilibrium types. |
find_index_in_character_array | mod_get_indices | Function | Function to locate the index of a given character in a character array. Iterates over the elements and returns on the first hit, if no match was found zero is returned. |
find_indices_in_character_array | mod_get_indices | Function | Function to locate the indices of an array of characters in another character array. Returns the indices of the first hit, it no match was found zero is returned. |
float_tostr | mod_logging | Function | Converts a given float to a string, the default format is "f20.8". |
flow_driven_instabilities_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
general_array_to_matrix | mod_transform_matrix | Function | Converts a given 2D array to the linked-list matrix datastructure. |
get_A_elements | mod_matrix_creation | Subroutine | Retrieves the A-matrix elements for a given quadblock corresponding to a particular point in the grid and a particular Gaussian weight. This routine is called n_gauss times for every grid interval. |
get_array_element | mod_transform_matrix | Function | Retrieves the element at index (i, j) for an array of general type. Returns the element as a (casted) complex type. |
get_B_elements | mod_matrix_creation | Subroutine | Retrieves the B-matrix elements for a given quadblock corresponding to a particular point in the grid and a particular Gaussian weight. This routine is called n_gauss times for every grid interval. |
get_bmat | mod_arpack_type | Function | Getter for kind of B-matrix in eigenvalue problem. |
get_complex_element | mod_matrix_structure | Function | Returns the complex element associated with the linked-list node at position (row, column) in the matrix datastructure. Non-existing nodes correspond to zero values, so when a node at (row, column) is not foudn this function returns (complex) zero. |
get_constants | mod_units | Subroutine | Returns the Boltzmann constant, proton mass, magnetic constant and gas constant in either cgs (default) or SI units. |
get_constants | mod_resistivity | Subroutine | Retrieves resistivity constants. Returns all physical constants used to calculate the Spitzer resistivity, either in cgs (default) or SI depending on the unit system chosen. |
get_deta | smod_resistive_matrix | Function | Calculates the total derivative of , given as |
get_deta_dT | mod_resistivity | Subroutine | Calculates the derivative of the resistivity. Returns the derivative of the full Spitzer resistivity with respect to the equilibrium temperature, if a fixed resistivity was set instead this routine returns zero. |
get_diagonal_factor | smod_essential_boundaries | Function | Returns the value that is introduced on the main block diagonal after zeroing out the corresponding row and column. Depends on the matrix that is used. |
get_diffF_operator | mod_matrix_shortcuts | Function | Calculates the derivative of the operator, given as |
get_element | mod_banded_matrix | Function | Retrieves the element at position (row, col) of the original matrix. See the LAPACK documentation, element $a_{ij}$ of the original matrix is stored at position $(ku + 1 + i - j, j)$ (with $ku$ the number of superdiagonals). |
get_element | mod_banded_matrix_hermitian | Function | Retrieves the element at position (row, col) of the original matrix.
See the LAPACK documentation, element $a_{ij}$ of the original matrix is stored
at position $(kd + 1 + i - j, j)$ if |
get_eta | mod_resistivity | Subroutine | Calculates the resistivity. Returns either the full Spitzer resistivity based on the equilibrium parameters, or a fixed resistivity value if specified in the global variables module. The unit resistivity is also set in this routine. If a fixed resistivity is used, eta is assumed to be normalised and the unit resistivity remains unity. |
get_evpdim | mod_arpack_type | Function | Getter for dimension of eigenvalue problem. |
get_F_operator | mod_matrix_shortcuts | Function | Calculates the operator, given as |
get_flow_operator | smod_flow_matrix | Function | Calculates the operator, given as |
get_G_operator | mod_matrix_shortcuts | Function | Calculates the operator, given as |
get_index | mod_get_indices | Interface | interface to retrieve the index of an element in an array. |
get_Kp_operator | mod_matrix_shortcuts | Function | Calculates the (modified) conduction prefactor, given as \boldsymbol{K_p^+} = \left(\boldsymbol{K_p} + \frac{\partial \kappa_\perp}{\partial(B^2)}\right) \boldsymbol{K_p^{++}} = \left( \frac{\partial \kappa_\perp}{\partial(B^2)} - \frac{B_{01}^2}{B_0^2}\boldsymbol{K_p^+} \right) $$ |
get_label | mod_matrix_structure | Function | Returns the current label. |
get_lworkl | mod_arpack_type | Function | Getter for length of workl array, returns 3 * ncv**2 + 5 * ncv |
get_nb_diagonals | mod_matrix_structure | Subroutine | Subroutine to get the number of super- and sub-diagonals in the matrix. |
get_ncv | mod_arpack_type | Function | Getter for number of Arnoldi basis vectors that should be calculated. |
get_nev | mod_arpack_type | Function | Getter for number of eigenvalues to calculate. |
get_node | mod_matrix_row | Function | Returns a pointer to the node corresponding to the given column. Returns a nullified pointer if no node containing the given column index was found. |
get_node_element | mod_matrix_node | Function | Returns the node element. |
get_numerical_derivative | mod_interpolation | Subroutine | Calculates the numerical derivative of a given array. A sixth-order accurate central difference stencil is used to calculate the derivative. Near the edges a sixth-order accurate forward and backward difference stencil is used for the left and right boundary, respectively. It is assumed that the x values are all equally spaced. If this is not the case, a polynomial interpolation on a uniform grid can be done and that one can be differentiated instead. The stencils are as follows: |
get_parfile | mod_input | Subroutine | Parses the command line arguments and retrieves the parfile passed. |
get_R_operator | smod_resistive_matrix | Function | Calculates the operator, given as |
get_residual | mod_output | Function | |
get_rosner_cooling | mod_cooling_curves | Subroutine | Uses the piecewise rosner cooling curve to calculate the radiative cooling values based on the equilibrium temperature. |
get_spline | smod_ef_operations | Function | Returns the finite element basis functions for the given eigenfunction and position in the grid. |
get_subblock_index | mod_get_indices | Interface | |
get_tolerance | mod_arpack_type | Function | Getter for tolerance (relative accuracy) to indicate eigenvalue convergence. |
get_total_nb_elements | mod_banded_matrix | Function | Returns the total number of elements inside the banded matrix. |
get_total_nb_elements | mod_matrix_structure | Function | Returns the total number of elements (nodes) across the various rows. |
get_total_nb_elements | mod_banded_matrix_hermitian | Function | Returns the total number of elements inside the banded matrix |
get_total_nb_nonzero_elements | mod_banded_matrix | Function | Returns the total number of nonzero elements inside the banded matrix. |
get_total_time | mod_timing | Function | |
get_values_from_eigenvector | smod_ef_operations | Function | Retrieves the correct values from the eigenvector that correspond to the requested eigenfunction at the current subblock index mapping. |
get_viscosity_terms | mod_viscosity | Subroutine | |
get_which | mod_arpack_type | Function | Getter for which eigenvalues to return. |
get_wv_operator | mod_matrix_shortcuts | Function | Calculates the wave vector operator , given as |
gold_hoyle_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
gravito_acoustic_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
gravito_mhd_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
grid_clean | mod_grid | Subroutine | Cleanup routine, deallocates the arrays at module scope. |
handle_spurious_eigenvalues | mod_inspections | Subroutine | Handles spurious eigenvalue through removal. If requested, this can remove spurious eigenvalues on the edges of the spectrum. This usually only occurs in cylindrical geometries with forced on-axis conditions. The amount of eigenvalues to handle on every side of the imaginary axis is specified in the parfile. Example: nb_spurious_eigenvalues = 1 removes the outermost eigenvalue on each side of the imaginary axis (so two in total). |
harris_sheet_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
hermitian_banded_to_array | mod_transform_matrix | Interface | |
hermitian_banded_to_complex_array | mod_transform_matrix | Function | Converts a Hermitian banded datastructure to a full complex array. |
induction_equil_conditions | mod_inspections | Subroutine | Checks the induction equation for the equilibrium state. The two (nonzero) resulting expressions are and should both be fulfilled. |
init_equilibrium_params | mod_equilibrium_params | Subroutine | Initialises all variables defined at module scope to NaN, including the wave numbers. This ensures that these have to be explicitly set. |
initialisation | legolas | Subroutine | Subroutine responsible for all initialisations. Allocates and initialises main and global variables, then the equilibrium state and eigenfunctions are initialised and the equilibrium is set. |
initialise_base_eigenfunctions | mod_eigenfunctions | Interface | |
initialise_bfield_type | mod_types | Subroutine | Allocates the magnetic field type and initialises all values to zero. |
initialise_conduction_type | mod_types | Subroutine | Allocates the thermal conduction type and initialises all values to zero. |
initialise_cooling_type | mod_types | Subroutine | Allocates the radiative cooling type and initialises all values to zero. |
initialise_density_type | mod_types | Subroutine | Allocates the density type and initialises all values to zero. |
initialise_derived_eigenfunctions | mod_eigenfunctions | Interface | |
initialise_eigenfunctions | mod_eigenfunctions | Subroutine | Initialises the eigenfunctions based on an array of eigenvalues. Before initialising all arrays we check which subset of eigenvalues, if any, needs its eigenfunctions saved. |
initialise_equilibrium | mod_equilibrium | Subroutine | Initialises the equilibrium types by calling the corresponding subroutine, which allocates all necessary attributes. |
initialise_exceptions | mod_exceptions | Subroutine | Private subroutine, sets the pointer to the default method to be used when raising exceptions. |
initialise_globals | mod_global_variables | Subroutine | Initialises the global variables in this module. All variables in this module are first set to their default values. These are either regular values or NaN, the latter in case variables must be explicitly set in the parfile or equilibrium submodule. |
initialise_gravity_type | mod_types | Subroutine | Allocates the gravity type and initialises all values to zero. |
initialise_grid | mod_grid | Subroutine | General grid initialisations. Initialises both the regular grid and the Gaussian grid. Does calls to the mesh accumulation routines if needed, and sets the scale factor and its derivative. |
initialise_hall_type | mod_types | Subroutine | Allocates the Hall type and initialises all values to zero. |
initialise_radiative_cooling | mod_radiative_cooling | Subroutine | Initialises the radiative cooling variables. This routine first selects and allocates the correct cooling tables, depending on the desired curve. These tables are used to interpolate the final cooling curve using \p ncool points. |
initialise_resistivity_type | mod_types | Subroutine | Allocates the resistivity type and initialises all values to zero. |
initialise_temperature_type | mod_types | Subroutine | Allocates the temperature type and initialises all values to zero. |
initialise_type | mod_types | Interface | interface to initialise all the different types |
initialise_velocity_type | mod_types | Subroutine | Allocates the velocity type and initialises all values to zero. |
int_tostr | mod_logging | Function | Converts a given integer to a string, the default format is "i8". |
integrate_ode_rk | mod_integration | Subroutine | Integrates a first order differential equation of the form using a fifth-order Runge-Kutta method. The argument nbpoints determines the stepsize through If the arrays are not of size nbpoints, then these are interpolated to that resolution. The differential equation is then integrated, the solution will also be of size nbpoints and can be downsampled using the appropriate subroutine. If desired the optional argument dyvalues can be provided, which contains the (numerical) derivative of y. |
interchange_modes_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
internal_kink_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
interpolate_table | mod_interpolation | Subroutine | Interpolates a given set of tables (x, y(x)) into a smooth curve. Assumes that x_table is an array with a monotone increase in values. Interpolation is done using n_interp points, in general a second order polynomial approximation is used except near sharp jumps. |
inverse_iteration | mod_solvers | Interface | interface to the different solution methods implemented in submodules |
is_compatible_with | mod_banded_matrix | Function | Checks if a banded matrix is compatibe with another banded matrix.
This implies that the following attributes should be equal:
- dimensions of the original matrices
- number of superdiagonals and subdiagonals
- dimensions of the banded matrices themselves
Returns |
is_compatible_with | mod_banded_matrix_hermitian | Function | Checks if a Hermitian band matrix is compatible with another Hermitian band matrix. This implies that the following attributes should be equal: - number of rows/columns - number of sub/superdiagonals - storage of upper or lower triangular part - dimensions of the banded matrices themselves Returns .true. if all criteria are satisfied, .false. otherwise. |
is_constant | mod_check_values | Interface | interface to check if an array is constant |
is_equal | mod_check_values | Interface | interface to check equality between values/arrays |
is_NaN | mod_check_values | Interface | interface to check for NaN values |
is_negative | mod_check_values | Interface | interface to check for negative values |
is_valid_element | mod_matrix_structure | Function | Checks if a given element is valid in order to add it to the matrix.
Returns |
is_valid_index | mod_matrix_structure | Function | Checks if a given index is valid for the current matrix datastructure.
Returns |
is_within_band | mod_banded_matrix | Function | Checks if a given position (row, col) is within the banded structure, i.e. with $ku$ the number of superdiagonals and $kl$ the number of subdiagonals. |
is_within_band | mod_banded_matrix_hermitian | Function | Checks if a given position (row, col) is within the banded structure. For uplo = "U" the position is within the band if for uplo = "L" the position is within the band if with $kd$ the number of sub/superdiagonals and $n$ the number of rows/columns. |
is_zero | mod_check_values | Interface | interface to check if values/arrays are zero |
isothermal_atmosphere_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
kh_cd_instability_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
KHI_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
load_profile_from_file | mod_solar_atmosphere | Subroutine | Loads a previously calculated profile and uses that to set the resolution, density and density derivatives. |
log_message | mod_logging | Subroutine | Logs messages to the console. Every message will be prepended by [ LEVEL ] to indicate its type. If this is not desired, set use_prefix = .false.. |
logical_tostr | mod_logging | Function | Converts a given logical to a string "True" or "False". |
lookup_table_value | mod_interpolation | Function | Function for fast table-lookup, returns the corresponding y-value in y_values based on a given based on a given . If the allow_outside flag is given as .true. then values on the edge of the table are returned when the lookup value is outside the array. Uses simple linear interpolation. |
magnetothermal_instability_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
make_filename | mod_output | Subroutine | Builds a filename based on a given base filename and the output folder defined in the global variables module. The output folder is prepended to the base filename. |
matrix_to_array | mod_transform_matrix | Interface | |
matrix_to_banded | mod_transform_matrix | Interface | |
matrix_to_complex_array | mod_transform_matrix | Subroutine | Converts a given matrix data structure with complex nodes to a 2D complex array. |
matrix_to_complex_banded | mod_transform_matrix | Subroutine | Converts a matrix data structure into a complex banded matrix. |
matrix_to_complex_hermitian_banded | mod_transform_matrix | Subroutine | Converts a matrix data structure into a complex Hermitian banded matrix. |
matrix_to_hermitian_banded | mod_transform_matrix | Interface | |
MRI_accretion_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
multiply | mod_banded_operations | Interface | |
needs_resampling | mod_integration | Function | Checks if an array needs resampling. |
new_arpack_config | mod_arpack_type | Function | Constructor for a new ARPACK configuration based on the dimension of the eigenvalue problem, mode of the solver and type of the B-matrix. Initialises required variables and allocates work arrays to be used when calling the solvers. |
new_banded_matrix | mod_banded_matrix | Function | Constructor for a new banded matrix with a given number of rows, columns, subdiagonals and superdiagonals. Allocates and initialises the datatype. |
new_hermitian_banded_matrix | mod_banded_matrix_hermitian | Function | Constructor for a new Hermitian banded matrix with a given number of rows and diagonals. Allocates and initialises the datatype. initialise all to zero |
new_matrix | mod_matrix_structure | Function | Constructor for a new matrix matrix with a given number of rows. Allocates and initialises the matrix datatype. |
new_node | mod_matrix_node | Function | Constructor for a new node, sets the column and element attributes.
The element passed is polymorphic, but will be cast to complex in the node itself.
No nodes are linked yet; the pointer to the next node is initialised to |
new_row | mod_matrix_row | Function | Constructor for a new row, initialises the linked list datastructure
and sets the current head and tail pointers to |
new_timer | mod_timing | Function | |
on_exception_raised | mod_exceptions | Subroutine | Workflow that is executed by default when an exception is raised. The argument message is printed to the console and program execution is terminated. |
open_file | mod_output | Subroutine | Opens a file with a given IO unit and filename. All files are opened using access='stream', status='unknown' and action='write'. |
paint_string | mod_painting | Subroutine | Subroutine to paint a given string to the desired colour, returns a new string with ANSI escape sequences prepended and appended. If the 'colour' argument is not known, simply returns the string itself. |
parse_finished_stats | mod_arpack_type | Subroutine | Parses the statistics that come out of ARPACK when the run is finished. Displays the number of OPX and BX operations and the number of re-orthogonalisation steps that were needed. |
parse_znaupd_info | mod_arpack_type | Subroutine | Parses the info parameter that comes out of ARPACK's znaupd method. If info = 0, everything behaved nicely and the reverse communication subroutines exited properly. If info is any other value something went wrong and we handle it accordingly. |
parse_zneupd_info | mod_arpack_type | Subroutine | Parses the info parameter that comes out of ARPACK's zneupd method. If info = 0, the eigenvalues extraction routines exited properly, if info is any other value something went wrong and we handle it accordingly. |
perform_NaN_and_negative_checks | mod_inspections | Subroutine | General routine to do initial sanity checks on the various equilibrium attributes. We check the equilibrium arrays for NaN and see if all density and temperature values are positive. |
perform_sanity_checks | mod_inspections | Subroutine | General routine to do sanity checks on the different equilibrium types. We check the wavenumbers and on-axis values, as well as standard and non-adiabatic equilibrium force balance. |
photospheric_flux_tube_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
print_console_info | mod_logging | Subroutine | Prints various console messages showing geometry, grid parameters, equilibrium parameters etc. Only for logging level "info" or above. |
print_logo | mod_logging | Subroutine | Prints the Legolas logo to the console. The logo is wrapped in 1 whitespace at the top and two at the bottom. Only for logging level 'warning' (1) and above |
print_timelog | legolas | Subroutine | |
print_whitespace | mod_logging | Subroutine | Prints an empty line to the console. Only if logging level is 'warning' or above. |
qr_cholesky | mod_solvers | Interface | interface to the different solution methods implemented in submodules |
qr_invert | mod_solvers | Interface | interface to the different solution methods implemented in submodules |
quadratic_factors | mod_spline_functions | Subroutine | Calculates the quadratic basis functions. |
quadratic_factors_deriv | mod_spline_functions | Subroutine | Calculates the derivatives of the quadratic basis functions. |
qz_direct | mod_solvers | Interface | interface to the different solution methods implemented in submodules |
radiative_cooling_clean | mod_radiative_cooling | Subroutine | Cleanup routine, deallocates all variables allocated at module-scope. |
raise_exception | mod_exceptions | Subroutine | Raises an exception with a given message. By default, exceptions terminate program execution. Calls the initialisation routine if not already done. |
read_parfile | mod_input | Subroutine | Reads in the supplied parfile and sets the equilibrium parameters and global variables to their specified values. |
real_array_is_constant | mod_check_values | Function | Check if an array has constant values |
real_is_equal | mod_check_values | Function | Equality check between real values |
real_is_negative | mod_check_values | Function | Check if values are or contain negative numbers |
real_is_zero | mod_check_values | Function | Checks if real values are zero |
reset_factor_positions | smod_natural_boundaries | Subroutine | Resets the factors and positions arrays to a given new size. |
reset_factor_positions | mod_matrix_manager | Subroutine | Resets the factors and positions arrays to a given new size. |
resistive_homo_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
resistive_tearing_modes_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
resistive_tearing_modes_flow_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
resonant_absorption_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
retransform_eigenfunction | mod_eigenfunctions | Interface | |
retrieve_eigenfunction_from_index | mod_eigenfunctions | Function | Retrieves a single eigenfunction based on its index in the attribute of the main array. For example, if name equals "rho" and ef_idx equals 2 then this routine returns the quantities attribute evaluated at index 2 for the "rho" eigenfunctions. |
retrieve_eigenfunctions | mod_eigenfunctions | Function | Returns the full set of eigenfunctions corresponding to the given eigenfunction name. |
rk45 | mod_integration | Subroutine | Calculates the Runge-Kutta coefficients and calculates the fourth and fifth order solutions for step i+1 based on the values at step i. |
rotating_plasma_cyl_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
RTI_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
RTI_KHI_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
RTI_theta_pinch_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
save_profile_to_file | mod_solar_atmosphere | Subroutine | Saves the density and density derivatives to the given filename. These can be used later on to set the values instead of solving the differential equation. |
select_eigenfunctions_to_save | mod_eigenfunctions | Subroutine | Selects a subset of eigenfunctions to be saved. |
set_basis_functions | smod_natural_boundaries | Subroutine | |
set_bmat | mod_arpack_type | Subroutine | Sets the type of B-matrix. |
set_boundary_flags | mod_boundary_manager | Subroutine | |
set_conduction_prefactor | mod_thermal_conduction | Subroutine | Sets the thermal conduction prefactor, given by . The radial derivative of the prefactor is also set, given by |
set_conduction_values | mod_thermal_conduction | Subroutine | This routines sets all thermal conduction values in kappa_field, and calls all other relevant subroutines defined in this module. |
set_element | mod_banded_matrix | Subroutine | Sets the element $a_{ij}$ of the original array into the banded structure. The row and col arguments refer to the row and column indices of the element in the original array. This routine has no effect if the location falls outside of the banded structure. |
set_element | mod_banded_matrix_hermitian | Subroutine | Sets the element $a_{ij}$ of the original array into the banded structure. The row and col arguments refer to the row and column indices of the element in the original array. This routine has no effect if the location falls outside of the banded structure. |
set_energy_balance | mod_inspections | Subroutine | Enforces the non-adiabatic force-balance equation for the equilibrium state. This is given by This subroutine essentially sets $\mathscr{L}0$ in such a way that this equation is satisfied. If the heating is assumed to only depend on the equilibrium, and if there is no $B$, $v_{01}$ or perpendicular thermal conduction, then $\mathscr{L}_0 = 0$. If one (or more) of these effects are present, then $\mathscr{L}_0 = 0$ is no longer true. The rc_field % heat_loss attribute is modified on exit. |
set_entropy | smod_derived_efs | Subroutine | Calculates the entropy S1 and places it at location "loc" in the main array. |
set_equilibrium | mod_equilibrium | Subroutine | Calls the routine to set the equilibrium pointer, then calls the correct submodule. Performs some sanity checks (negative values, NaNs etc.) when the equilibrium is set, then calls additional physics modules if needed. |
set_equilibrium_on_eigenfunction_grid | smod_derived_efs | Subroutine | Sets the B02, B03, rho0 and T0 equilibrium components on the eigenfunction grid instead of on the Gaussian grid, these are used for calculating the derived eigenfunction quantities. No interpolation needed since the Gaussian grid is always finer than the eigenfunction grid, so we can get away by simply looking up the nearest values for every point in the eigenfunction grid. |
set_equilibrium_pointer | mod_equilibrium | Subroutine | Selects the submodule based on the specified equilibrium in the parfile. Works on a case-select basis. |
set_eta_dropoff | mod_resistivity | Subroutine | Sets a hyperbolic tangent profile for the resistivity so it goes smoothly to zero near the edges. The location and width of the dropoff profile can be controlled through dropoff_edge_dist and dropoff_width. |
set_gamma | mod_global_variables | Subroutine | Sets the ratio of specific heats gamma and its corresponding value gamma - 1. |
set_grid_gauss | mod_grid | Subroutine | Sets up grid_gauss, that is, the grid evaluated in the four Gaussian points. This is done by evaluating the weights at the four Gaussian nodes. |
set_gridpts | mod_global_variables | Subroutine | Sets all gridpoint-related variables: sets the base number of gridpoints, the gridpoints of the Gaussian grid, matrix sizes and size of the eigenfunction arrays. |
set_hall_factors | mod_hall | Subroutine | Retrieves the normalised Hall factor as described by Porth et al. (2014), with a dropoff at the boundary, if desired. Additionally, defines the electron inertia factor if included, with a dropoff profile, if desired. |
set_kappa_para | mod_thermal_conduction | Subroutine | Calculates the parallel thermal conduction. Returns either the full parallel thermal conduction based on the equilibrium parameters, or a fixed value if specified in the global variables module. |
set_kappa_para_derivatives | mod_thermal_conduction | Subroutine | Calculates the temperature derivative of the parallel thermal conduction component. |
set_kappa_perp | mod_thermal_conduction | Subroutine | Calculates the perpendicular thermal conduction. Returns either the full perpendicular thermal conduction based on the equilibrium parameters, or a fixed value if specified in the global variables module. |
set_kappa_perp_derivatives | mod_thermal_conduction | Subroutine | Calculates the thermal conduction derivatives. Returns the derivative of the perpendicular thermal conduction with respect to density, magnetic field squared and temperature. |
set_kappa_perp_radial_derivative | mod_thermal_conduction | Subroutine | Sets the radial derivative of the perpendicular thermal conduction coefficient. This is defined as |
set_label | mod_matrix_structure | Subroutine | Sets the label of the current matrix. |
set_magnetic_field | smod_derived_efs | Subroutine | Calculates the perturbed magnetic field. |
set_magnetic_field_curl | smod_derived_efs | Subroutine | Calculates the curl of the perturbed magnetic field. |
set_magnetic_field_curl_pp | smod_derived_pp_efs | Subroutine | Sets the parallel and perpendicular components of the perturbed magnetic field curl with respect to the background magnetic field. |
set_magnetic_field_divergence | smod_derived_efs | Subroutine | Calculates the divergence of the perturbed magnetic field |
set_magnetic_field_pp | smod_derived_pp_efs | Subroutine | Sets the parallel and perpendicular components of the perturbed magnetic field with respect to the background magnetic field. |
set_matrix_properties | mod_global_variables | Subroutine | Sets dimensions for matrix A and B, subblock sizes and state vector |
set_maxiter | mod_arpack_type | Subroutine | Sets the maximum number of iterations that ARPACK is allowed to take, defaults to max(100, 10 * k) with k the number of eigenvalues. |
set_mode | mod_arpack_type | Subroutine | Sets the mode for the solver. |
set_ncv | mod_arpack_type | Subroutine | Setter for ncv, the number of Arnoldi basis vectors to calculate. This should satisfy 1 <= ncv - nev and ncv <= evpdim, with recommended value ncv = 2 * nev (see arpack docs). |
set_nev | mod_arpack_type | Subroutine | Setter for number of eigenvalues to calculate. |
set_normalisations | mod_units | Subroutine | Defines unit normalisations based on a magnetic field unit, length unit, and a density OR temperature unit. Calling this routine automatically sets normalisations_are_set to True. An optional mean molecular weight can be passed, which defaults to 1/2 corresponding to an electron-proton plasma. |
set_pp_quantities | smod_derived_efs | Interface | |
set_radiative_cooling_values | mod_radiative_cooling | Subroutine | Sets the radiative cooling attributes of the corresponding types. This is called after the equilibrium is initialised in the submodule. |
set_raise_method | mod_exceptions | Subroutine | Subroutine meant to be publicly called, sets the routine to be used when raising exceptions. Calls the initialisation routine if not already done. |
set_residual | mod_arpack_type | Subroutine | Setter for the residual vector, allocates and manually initialises the
residual (= starting) vector using a uniform distribution on (-1, 1)
for both the real and imaginary parts. Relies on the LAPACK routine |
set_resistivity_values | mod_resistivity | Subroutine | This routines sets all resistivity values in \p eta_field, and calls all other relevant subroutines defined in this module. |
set_scale_factor | mod_grid | Subroutine | The scale factor to switch between Cartesian and cylindrical geometries is set here, along with its derivative. For cylindrical the scale factor is simply equal to the Gaussian grid, and its derivative is unity. For Cartesian the scale factor is unity and its derivative is zero. |
set_small_values_to_zero | mod_check_values | Interface | interface to check for small values |
set_solar_atmosphere | mod_solar_atmosphere | Subroutine | Sets the density, temperature, gravity and magnetic field attributes of the respective fields to a realistic solar atmosphere profile. This routine first interpolates the temperature and numberdensity table at n_interp resolution, then solves the following ODE for the density: using a fifth order Runge-Kutta method. If the optional argument save_to is provided then the density profiles are saved to that file, which can be loaded back in on subsequent runs through the optional argument load_from. The integration is done over the entire table, the curve is sampled on the Gaussian grid, meaning that grid variations can all use the same result. |
set_unit_resistivity | mod_units | Subroutine | Sets the unit resistivity. This routine is called by the resistivity module and is used to set the resistivity unit in such a way that eta equals 0.1 when the temperature is 1 MK. |
set_velocity_curl | smod_derived_efs | Subroutine | Sets the three components of velocity curl. |
set_velocity_curl_pp | smod_derived_pp_efs | Subroutine | Sets the parallel and perpendicular components of the velocity curl with respect to the background magnetic field. |
set_velocity_divergence | smod_derived_efs | Subroutine | Calculates the divergence of the perturbed velocity v1 |
set_velocity_pp | smod_derived_pp_efs | Subroutine | Sets the parallel and perpendicular components of the perturbed velocity with respect to the background magnetic field. |
set_which | mod_arpack_type | Subroutine | Setter for the "which" argument of ARPACK routines. |
should_compute_eigenvectors | mod_global_variables | Function | See if any output options require us to compute the eigenvectors |
small_values_complex | mod_check_values | Subroutine | Small value checks for a complex variable/array/matrix, with the real and imaginary parts checked separately. Values that are smaller than the specified tolerance tol are set to zero. If tol is not present, DP_LIMIT is used as tolerance. |
small_values_real | mod_check_values | Subroutine | Small value checks for a real variable/array/matrix. Values that are smaller than the specified tolerance tol are set to zero. If tol is not present, DP_LIMIT is used as tolerance. |
solve_arpack_general | smod_arpack_main | Interface | |
solve_arpack_shift_invert | smod_arpack_main | Interface | |
solve_evp | mod_solvers | Subroutine | Main subroutine to solve the eigenvalue problem. Depending on the solvelist passed in the parfile, different solvers are called. |
solve_linear_system_complex_banded | mod_linear_systems | Function | Calculates the solution to a system of linear equations where is a complex banded matrix and is a complex vector. |
standard_equil_conditions | mod_inspections | Subroutine | Checks the standard force-balance equation for the equilibrium state. This results in three expressions, and they should all be fulfilled. |
start_timer | mod_timing | Subroutine | |
str | mod_logging | Interface | a convenient "tostring" interface, used for easy console writing |
subblock | mod_make_subblock | Subroutine | Builds the quadblock. The four subblocks are calculated based on the specified factors, positions in the block, weights and basis functions. These four subblocks are then added to the quadblock that is passed along, and the filled quadblock is returned. |
suydam_cluster_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
taylor_couette_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
tc_pinch_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
tic | mod_timing | Subroutine | Subroutine to start a wall clock timer. |
toc | mod_timing | Subroutine | Subroutine to end a wall clock timer. |
transform_state_variable_to_subblock_index | mod_get_indices | Function | Transforms a given array of state variables to subblock indices.
If |
uplo_is_valid | mod_banded_matrix_hermitian | Function | Checks whether the given uplo parameter is valid. |
user_defined_eq | mod_equilibrium | Interface | interface to the different equilibrium submodules |
viscosity_boundaries | mod_viscosity | Subroutine | Creates a quadblock for the A matrix containing the natural boundary conditions coming from the viscosity terms, depending on the supplied edge. |
write_matrices_to_file | mod_output | Subroutine | |
zero_out_row_and_col | smod_essential_boundaries | Subroutine | Zeroes out the row and column corresponding to the given indices.
Afterwards |