Sim Utils¶
Simulation utility helpers from the sim_utils library.
Classes (Fortran Structures)¶
BicubicCmplxCoefStruct¶
Fortran struct: bicubic_cmplx_coef_struct (sim_utils/math/cubic_interpolation_mod.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
coef |
2D array of complex (shape: 0:3,0:3) | Coefs |
i_box |
1D array of int (shape: 2) | index at lower box corner. |
NametableStruct¶
Fortran struct: nametable_struct (sim_utils/interfaces/sim_utils_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
name |
1D array of str | Array of names. |
index |
1D array of int | Sorted index for names(:) array. names(an_index(i)) is in alphabetical order. |
n_min |
int | Set to 0 for use in a lattice. |
n_max |
int | Use only names(n_min:n_max) part of array. |
QpAxisStruct¶
Fortran struct: qp_axis_struct (sim_utils/plot/quick_plot_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
label |
str | |
min |
float | Axis min/max in data units. |
max |
float | Axis min/max in data units. |
tick_min |
float | Min tick location along axis in data units. |
tick_max |
float | Max tick location along axis in data units. |
eval_min |
float | For general use. Not set by quick_plot. |
eval_max |
float | For general use. Not set by quick_plot. |
dtick |
float | Distance between ticks. In data units. Ticks will be drawn between %min and %max. |
number_offset |
float | Offset from axis line in inches. |
label_offset |
float | Offset from numbers in inches. |
major_tick_len |
float | In inches. |
minor_tick_len |
float | In inches. |
label_color |
str | Color of the label. |
major_div |
int | Actual numbrer of major divisions |
major_div_nominal |
int | Nominal value. |
minor_div |
int | 0 = auto choose. |
minor_div_max |
int | Max number for auto choose. |
places |
int | Number of places after the decimal point to print. |
type |
str | Or 'LOG', or 'CUSTOM' |
bounds |
str | Or 'ZERO_AT_END' or 'ZERO_SYMMETRIC' |
tick_side |
int | +1 = Draw on the side inside the graph, 0 = both (longer tick), -1 = outside. |
number_side |
int | +1 = Draw to the side inside the graph, -1 = outside. |
draw_label |
bool | |
draw_numbers |
bool |
QpLegendStruct¶
Fortran struct: qp_legend_struct (sim_utils/plot/quick_plot_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
row_spacing |
float | Spacing between rows. |
line_length |
float | Length of the line in points. |
text_offset |
float | Horizontal offset in points between the line and the text. |
draw_line |
bool | Draw lines? |
draw_symbol |
bool | Draw symbols? |
draw_text |
bool | Draw text? |
QpLineStruct¶
Fortran struct: qp_line_struct (sim_utils/plot/quick_plot_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
width |
int | |
color |
str | |
pattern |
str |
QpPointStruct¶
Fortran struct: qp_point_struct (sim_utils/plot/quick_plot_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
x |
float | |
y |
float | |
units |
str |
QpRectStruct¶
Fortran struct: qp_rect_struct (sim_utils/plot/quick_plot_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
x1 |
float | |
x2 |
float | |
y1 |
float | |
y2 |
float | |
units |
str |
QpSymbolStruct¶
Fortran struct: qp_symbol_struct (sim_utils/plot/quick_plot_struct.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
type |
str | |
height |
float | in points (same as text height) |
color |
str | |
fill_pattern |
str | |
line_width |
int |
RandomStateStruct¶
Fortran struct: random_state_struct (sim_utils/math/random_mod.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
ix |
int | |
iy |
int | |
number_stored |
bool | |
h_saved |
float | |
engine |
int | Params |
seed |
int | |
am |
float | |
gauss_converter |
int | |
gauss_sigma_cut |
float | Only used if positive. |
in_sobseq |
int | |
ix_sobseq |
1D array of int (shape: sobseq_maxdim) | |
x_sobseq |
1D array of float (shape: sobseq_maxdim) |
SplineStruct¶
Fortran struct: spline_struct (sim_utils/math/spline_mod.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
x0 |
float | Point at start of spline |
y0 |
float | Point at start of spline |
x1 |
float | Point at end of spline |
coef |
1D array of float (shape: 0:3) | coefficients for cubic spline |
TricubicCmplxCoefStruct¶
Fortran struct: tricubic_cmplx_coef_struct (sim_utils/math/cubic_interpolation_mod.f90)
All attributes may be passed to the initializer as arguments:
| Attribute | Type | Description |
|---|---|---|
coef |
3D array of complex (shape: 0:3,0:3,0:3) | Coefs |
i_box |
1D array of int (shape: 3) | index at lower box corner. |
Procedures¶
allocate_thread_states¶
Fortran source: sim_utils/math/random_mod.f90
allocate_thread_states() -> None
Subroutine allocate_thread_states()
Routine to allocate random number state structures when openMP is used.
anomalous_moment_of¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
anomalous_moment_of(species: typing.SupportsInt | typing.SupportsIndex) -> float
Function anomalous_moment_of (species) result (moment)
Routine to return the anomolous moment for subatomic species type. Otherwise returns 0.
| Parameters: |
|
|---|
| Returns: |
|
|---|
antiparticle¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
antiparticle(species: typing.SupportsInt | typing.SupportsIndex) -> int
Function antiparticle (species) result (anti_species)
Routine to return the antiparticle ID given the particle ID. For a molecule the anti-species is just the molecude with the charge reversed.
| Parameters: |
|
|---|
| Returns: |
|
|---|
apfft¶
Fortran source: sim_utils/math/all_phase_fft.f90
apfft(rdata_in: pybmad._pybmad.RealArray1D, bounds: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"], window: str, phase: typing.SupportsFloat | typing.SupportsIndex, diag: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
subroutine apfft(rdata_in, bounds, window, phase, diag)
Implements the All Phase FFT method for obtaining accurate phase from signal data.
The signal data is truncated to an odd length, and the phase is relative to the central point.
apfft_corr¶
Fortran source: sim_utils/math/all_phase_fft.f90
apfft_corr(rdata_in: pybmad._pybmad.RealArray1D, window: str, bounds: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"] | None = None, diag: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.ApfftCorr
subroutine apfft_corr(rdata_in, bounds, window, phase, amp, freq, diag)
For real signal rdata_in, computes phase, frequency, and amplitude of peak found within bounds. Algorithm is corrected all-phase FFT and should.
This routine finds only one peak: the largest amplitude within the bound. Signals with multiple components can be investigated by varying bounds appropriately.
| Parameters: |
|
|---|
| Returns: |
|
|---|
apfft_ext¶
Fortran source: sim_utils/math/all_phase_fft.f90
apfft_ext(rdata: pybmad._pybmad.RealArray1D, bounds: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"], window: str, phase: typing.SupportsFloat | typing.SupportsIndex, amp: typing.SupportsFloat | typing.SupportsIndex, freq: typing.SupportsFloat | typing.SupportsIndex, diag: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
subroutine apfft_ext(rdata,bounds, window, phase, amp, freq, diag)
Implements the All Phase FFT method for obtaining accurate phase from signal data.
This "extended" apfft subroutine returns the amplitudes and frequency as well, for use by the corrected apfft subroutine in this module.
asinc¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
asinc(x: typing.SupportsFloat | typing.SupportsIndex, nd: typing.SupportsInt | typing.SupportsIndex | None = None) -> float
Wrapper for Fortran routine asinc
| Parameters: |
|
|---|
| Returns: |
|
|---|
assert_equal¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
assert_equal(int_arr: pybmad._pybmad.IntArray1D, err_str: str, ival: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine assert_equal
| Parameters: |
|
|---|
atomic_number¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
atomic_number(species: typing.SupportsInt | typing.SupportsIndex) -> int
Function atomic_number(species) result (atomic_num)
Routine to return the atomic number Z if species argument corresponds to an atomic particle or is a proton. Set to the charge for atomic particles. Set to zero for molecules.
| Parameters: |
|
|---|
| Returns: |
|
|---|
atomic_species_id¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
atomic_species_id(charge: typing.SupportsInt | typing.SupportsIndex, is_anti: bool, atomic_num: typing.SupportsInt | typing.SupportsIndex, n_nuc: typing.SupportsInt | typing.SupportsIndex) -> int
Function atomic_species_id(charge, is_anti, atomic_num, n_nuc) result (species_id)
Routine to return the species ID for an atom
| Parameters: |
|
|---|
| Returns: |
|
|---|
axis_angle_to_quat¶
Fortran source: sim_utils/math/rotation_3d_mod.f90
axis_angle_to_quat(axis: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], angle: typing.SupportsFloat | typing.SupportsIndex) -> typing.Annotated[list[float], "FixedSize(4)"]
Function axis_angle_to_quat (axis, angle) result (quat)
Routine to convert from axis + angle representation to a quaternion.
| Parameters: |
|
|---|
| Returns: |
|
|---|
axis_angle_to_w_mat¶
Fortran source: sim_utils/math/rotation_3d_mod.f90
axis_angle_to_w_mat(axis: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], angle: typing.SupportsFloat | typing.SupportsIndex) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(3)"]], "FixedSize(3)"]
Subroutine axis_angle_to_w_mat (axis, angle, w_mat)
Routine to construct the 3D rotation matrix w_mat given an axis of rotation and a rotation angle.
| Parameters: |
|
|---|
| Returns: |
|
|---|
bicubic_cmplx_eval¶
Fortran source: sim_utils/math/cubic_interpolation_mod.f90
bicubic_cmplx_eval(x_norm: typing.SupportsFloat | typing.SupportsIndex, y_norm: typing.SupportsFloat | typing.SupportsIndex, bi_coef: pybmad._pybmad.BicubicCmplxCoefStruct) -> pybmad._pybmad.BicubicCmplxEval
Function bicubic_cmplx_eval (x_norm, y_norm, bi_coef, df_dx, df_dy) result (f_val)
Routine to evaluate a bicubic interpolating complex function.
Use the routine bicubic_interpolation_cmplx_coefs to generate bi_coef.
Note: In the equations below, the four points of the grid box being interpolated range from (x0, y0) to (x0+dx, y0+dy).
| Parameters: |
|
|---|
| Returns: |
|
|---|
bin_index¶
Fortran source: sim_utils/math/bin_mod.f90
bin_index(x: typing.SupportsFloat | typing.SupportsIndex, bin1_x_min: typing.SupportsFloat | typing.SupportsIndex, bin_delta: typing.SupportsFloat | typing.SupportsIndex) -> int
Function bin_index(x, bin1_x_min, bin_delta) result (ix_bin)
Helper function to locate the appropriate histogram bin index.
| Parameters: |
|
|---|
| Returns: |
|
|---|
bin_x_center¶
Fortran source: sim_utils/math/bin_mod.f90
bin_x_center(ix_bin: typing.SupportsInt | typing.SupportsIndex, bin1_x_min: typing.SupportsFloat | typing.SupportsIndex, bin_delta: typing.SupportsFloat | typing.SupportsIndex, x_center: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.BinXCenter
Function bin_x_center (ix_bin, bin1_x_min, bin_delta) result(x_center)
Helper function to locate the center of a histogram bin.
| Parameters: |
|
|---|
| Returns: |
|
|---|
bit_set¶
Fortran source: sim_utils/math/bit_set_mod.f90
bit_set(word: typing.SupportsInt | typing.SupportsIndex, pos: typing.SupportsInt | typing.SupportsIndex, set_to_1: bool) -> pybmad._pybmad.BitSet
Subroutine bit_set (word, pos, set_to_1)
Routine to set a bit in a word.
| Parameters: |
|
|---|
| Returns: |
|
|---|
bracket_index_for_spline¶
Fortran source: sim_utils/math/spline_mod.f90
bracket_index_for_spline(x_knot: pybmad._pybmad.RealArray1D, x: typing.SupportsFloat | typing.SupportsIndex, strict: bool | None = None, print_err: bool | None = None) -> pybmad._pybmad.BracketIndexForSpline
Function bracket_index_for_spline (x_knot, x, ix0, strict, print_err) result (ok)
Routine to find which interval to use for evaluating a spline. If strict = False (default), x is in range if x_knot(1) - (x_knot(2) - x_knot(1)) < x < x_knot(n) + (x_knot(n) - x_knot(n-1)) If stric = True, x is in range if x_knot(1) <= x <= x_knot(n) where n = size(x_knot)
| Parameters: |
|
|---|
| Returns: |
|
|---|
calc_file_number¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
calc_file_number(file_name: str, num_in: typing.SupportsInt | typing.SupportsIndex, num_out: typing.SupportsInt | typing.SupportsIndex, err_flag: bool) -> None
Wrapper for Fortran routine calc_file_number
| Parameters: |
|
|---|
celbd¶
Fortran source: sim_utils/special_functions/elliptic_integral_mod.f90
celbd(mc: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.Celbd
Wrapper for Fortran routine celbd
| Parameters: |
|
|---|
| Returns: |
|
|---|
cesr_getarg¶
Fortran source: sim_utils/io/command_line_mod.f90
cesr_getarg(i_arg: typing.SupportsInt | typing.SupportsIndex) -> str
Subroutine cesr_getarg (i_arg, arg)
Platform independent function to return the i'th command line argument. Use this with cesr_iargc.
Note: The difference between this routine and the Fortran instrinsic get_command_argument is that for i_arg = 0, this routine returns the command line with the name of the executable removed from the beginning of the line. get_command_argument, on the other hand returns the name of the executable when the argument is 0.
| Parameters: |
|
|---|
| Returns: |
|
|---|
cesr_iargc¶
Fortran source: sim_utils/io/command_line_mod.f90
cesr_iargc(func_retval__: typing.SupportsInt | typing.SupportsIndex) -> None
Function cesr_iargc ()
Note: Use the Fortran intrinsic command_argument_count instead
Platform independent function to return the number of command line arguments. Use this with cesr_getarg.
change_file_number¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
change_file_number(file_name: str, change: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine change_file_number
| Parameters: |
|
|---|
charge_of¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
charge_of(species: typing.SupportsInt | typing.SupportsIndex, default_: typing.SupportsInt | typing.SupportsIndex | None = None) -> int
Function charge_of (species, default) result (charge)
Routine to return the charge, in units of e+, of a particle.
| Parameters: |
|
|---|
| Returns: |
|
|---|
charge_to_mass_of¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
charge_to_mass_of(species: typing.SupportsInt | typing.SupportsIndex) -> float
Function charge_to_mass_of (species) result (charge_mass_ratio)
Routine to return the charge (in units of e+) to mass (in units of eV) ratio of a particle.
| Parameters: |
|
|---|
| Returns: |
|
|---|
coarse_frequency_estimate¶
Fortran source: sim_utils/math/fourier_mod.f90
coarse_frequency_estimate(data: pybmad._pybmad.RealArray1D, error: bool | None = None) -> float
Function coarse_frequency_estimate(data, error) result(frequency)
Simple function to take periodic data and estimate the most dominant frequency by FFT.
| Parameters: |
|
|---|
| Returns: |
|
|---|
complex_error_function¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
complex_error_function(wr: typing.SupportsFloat | typing.SupportsIndex, wi: typing.SupportsFloat | typing.SupportsIndex, zr: typing.SupportsFloat | typing.SupportsIndex, zi: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine complex_error_function
| Parameters: |
|
|---|
cos_one¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
cos_one(angle: typing.SupportsFloat | typing.SupportsIndex) -> float
Wrapper for Fortran routine cos_one
| Parameters: |
|
|---|
| Returns: |
|
|---|
cosc¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
cosc(x: typing.SupportsFloat | typing.SupportsIndex, nd: typing.SupportsInt | typing.SupportsIndex | None = None) -> float
Wrapper for Fortran routine cosc
| Parameters: |
|
|---|
| Returns: |
|
|---|
create_a_spline¶
Fortran source: sim_utils/math/spline_mod.f90
create_a_spline(r0: pybmad._pybmad.RealArray1D, r1: pybmad._pybmad.RealArray1D, slope0: typing.SupportsFloat | typing.SupportsIndex, slope1: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.SplineStruct
Function create_a_spline (r0, r1, slope0, slope1) result (spline)
Routine to create a single spline given end point positions and slopes. The spline will pass through the data points and have the given slopes at these points.
Modules used: use spline_mod
| Parameters: |
|
|---|
| Returns: |
|
|---|
cross_product¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
cross_product(a: pybmad._pybmad.RealArray1D, b: pybmad._pybmad.RealArray1D) -> typing.Annotated[list[float], "FixedSize(3)"]
Wrapper for Fortran routine cross_product
| Parameters: |
|
|---|
| Returns: |
|
|---|
date_and_time_stamp¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
date_and_time_stamp(string: str, numeric_month: bool | None = None, include_zone: bool | None = None) -> None
Wrapper for Fortran routine date_and_time_stamp
| Parameters: |
|
|---|
destfixedwindowls¶
Fortran source: sim_utils/math/windowLS.f90
destfixedwindowls(id: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine destfixedwindowls
| Parameters: |
|
|---|
detab¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
detab(str: str) -> None
Wrapper for Fortran routine detab
| Parameters: |
|
|---|
display_size_and_resolution¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
display_size_and_resolution(ix_screen: typing.SupportsInt | typing.SupportsIndex, x_size: typing.SupportsFloat | typing.SupportsIndex, y_size: typing.SupportsFloat | typing.SupportsIndex, x_res: typing.SupportsFloat | typing.SupportsIndex, y_res: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine display_size_and_resolution
| Parameters: |
|
|---|
dj_bessel¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
dj_bessel(m: typing.SupportsInt | typing.SupportsIndex, arg: typing.SupportsFloat | typing.SupportsIndex) -> float
Wrapper for Fortran routine dj_bessel
| Parameters: |
|
|---|
| Returns: |
|
|---|
djb_hash¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
djb_hash(str: str, hash: typing.SupportsInt | typing.SupportsIndex, old_hash: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine djb_hash
| Parameters: |
|
|---|
djb_str_hash¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
djb_str_hash(in_str: str, hash_str: str) -> None
Wrapper for Fortran routine djb_str_hash
| Parameters: |
|
|---|
downcase_string¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
downcase_string(string: str) -> None
Wrapper for Fortran routine downcase_string
| Parameters: |
|
|---|
elbd¶
Fortran source: sim_utils/special_functions/elliptic_integral_mod.f90
elbd(phi: typing.SupportsFloat | typing.SupportsIndex, phic: typing.SupportsFloat | typing.SupportsIndex, mc: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.Elbd
Wrapper for Fortran routine elbd
| Parameters: |
|
|---|
| Returns: |
|
|---|
elcbd¶
Fortran source: sim_utils/special_functions/elliptic_integral_mod.f90
elcbd(c0: typing.SupportsFloat | typing.SupportsIndex, mc: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.Elcbd
Wrapper for Fortran routine elcbd
| Parameters: |
|
|---|
| Returns: |
|
|---|
ellipinc¶
Fortran source: sim_utils/special_functions/elliptic_integral_mod.f90
ellipinc(phi: typing.SupportsFloat | typing.SupportsIndex, m: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.Ellipinc
subroutine ellipinc(phi, m, ellipkinc, ellipeinc)
Calculates the first and second incomplete elliptic integrals, using methods from T. Fukushima, (2011, 2018)
Uses classical transformations to handle negative m. This package needs a function for the third kind to use the new 2018 transformations.
elsbd¶
Fortran source: sim_utils/special_functions/elliptic_integral_mod.f90
elsbd(s0: typing.SupportsFloat | typing.SupportsIndex, mc: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.Elsbd
Wrapper for Fortran routine elsbd
| Parameters: |
|
|---|
| Returns: |
|
|---|
end_akima_spline_calc¶
Fortran source: sim_utils/math/spline_mod.f90
end_akima_spline_calc(spline: pybmad._pybmad.SplineStructArray1D, which_end: typing.SupportsInt | typing.SupportsIndex) -> None
Subroutine end_akima_spline_calc (spline, which_end)
Routine to calculate the slopes at the ends of a spline array
| Parameters: |
|
|---|
err_exit¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
err_exit(err_str: str | None = None) -> None
Wrapper for Fortran routine err_exit
| Parameters: |
|
|---|
factorial¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
factorial(n: typing.SupportsInt | typing.SupportsIndex) -> float
Wrapper for Fortran routine factorial
| Parameters: |
|
|---|
| Returns: |
|
|---|
faddeeva_function¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
faddeeva_function(z: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"], w: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"], dw: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"]], "FixedSize(2)"]) -> None
Wrapper for Fortran routine faddeeva_function
| Parameters: |
|
|---|
fft_1d¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
fft_1d(arr: pybmad._pybmad.ComplexArray1D, isign: typing.SupportsInt | typing.SupportsIndex) -> None
no longer exists subroutine fff_sub(line, error) implicit none character(*) line logical error end subroutine
| Parameters: |
|
|---|
file_directorizer¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
file_directorizer(in_file: str, out_file: str, directory: str, add_switch: bool) -> None
Wrapper for Fortran routine file_directorizer
| Parameters: |
|
|---|
file_get¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
file_get(string: str, dflt_file_name: str, file_name: str) -> None
Wrapper for Fortran routine file_get
| Parameters: |
|
|---|
file_get_open¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
file_get_open(string: str, dflt_file_name: str, file_name: str, file_unit: typing.SupportsInt | typing.SupportsIndex, readonly: bool) -> None
Wrapper for Fortran routine file_get_open
| Parameters: |
|
|---|
file_suffixer¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
file_suffixer(in_file_name: str, out_file_name: str, suffix: str, add_switch: bool) -> None
Wrapper for Fortran routine file_suffixer
| Parameters: |
|
|---|
find_location¶
Fortran sources (overloaded):
find_location_real:sim_utils/interfaces/sim_utils_interface.f90find_location_int:sim_utils/interfaces/sim_utils_interface.f90find_location_logic:sim_utils/interfaces/sim_utils_interface.f90find_location_str:sim_utils/interfaces/sim_utils_interface.f90
find_location(args, *kwargs) Overloaded function.
- find_location(arr: pybmad._pybmad.IntArray1D, value: typing.SupportsInt | typing.SupportsIndex, ix_match: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine find_location_int
| Parameters: |
|
|---|
| Parameters: |
|
|---|
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
fine_frequency_estimate¶
Fortran source: sim_utils/math/fourier_mod.f90
fine_frequency_estimate(data: pybmad._pybmad.RealArray1D) -> float
Function fine_frequency_estimate(data) result(frequency)
Uses Laskar's method to accurately find the most dominant frequency A coarse estimate is first made by FFT.
| Parameters: |
|
|---|
| Returns: |
|
|---|
fixedwindowls¶
Fortran source: sim_utils/math/windowLS.f90
fixedwindowls(ynew: typing.SupportsFloat | typing.SupportsIndex, id: typing.SupportsInt | typing.SupportsIndex, z: typing.SupportsFloat | typing.SupportsIndex) -> None
Function fixedWindowLS
Main function of the windowLS modult. Each call to this function adds a data point to the fit and returns the derivative evaluated at the end of the window. It is assumed that all data points are separeted by the same interval. This module is initialized with zeros for all data points, and so the results are unreliable until a number of data points equal to N has been entered.
initFixedWindowLS must be called prior to calling this function. destFixedWindowLS should be called when the instance is no longer needed.
fourier_amplitude¶
Fortran source: sim_utils/math/fourier_mod.f90
fourier_amplitude(data: pybmad._pybmad.RealArray1D, frequency: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.FourierAmplitude
Subroutine fourier_amplitude(data, frequency, cos_amp, sin_amp, dcos_amp, dsin_amp)
Computes cos_amp = (1/N) * sum_n=0^{N-1} data(n-1) cos(twopifrequencyn) and sin_amp = (1/N) * sum_n=0^{N-1} data(n-1) sin(twopifrequencyn) and optionally dcos_amp = d/dfrequency cos_amp dsin_amp = d/dfrequency sin_amp
| Parameters: |
|
|---|
| Returns: |
|
|---|
gelbd¶
Fortran source: sim_utils/special_functions/elliptic_integral_mod.f90
gelbd(phi: typing.SupportsFloat | typing.SupportsIndex, mc: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.Gelbd
Wrapper for Fortran routine gelbd
| Parameters: |
|
|---|
| Returns: |
|
|---|
gen_complete_elliptic¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
gen_complete_elliptic(kc: typing.SupportsFloat | typing.SupportsIndex, p: typing.SupportsFloat | typing.SupportsIndex, c: typing.SupportsFloat | typing.SupportsIndex, s: typing.SupportsFloat | typing.SupportsIndex, err_tol: typing.SupportsFloat | typing.SupportsIndex | None = None) -> float
Wrapper for Fortran routine gen_complete_elliptic
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_a_char¶
Fortran source: sim_utils/io/input_mod.f90
get_a_char(wait: bool, ignore_this: pybmad._pybmad.CharacterAlloc1D | None = None) -> str
Subroutine get_a_char (this_char, wait, ignore_this)
Subroutine for getting a single character from the terminal. Also see: get_tty_char
System Libraries that need to be linked to: readline curses
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_file_number¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
get_file_number(file_name: str, cnum_in: str, num_out: typing.SupportsInt | typing.SupportsIndex, err_flag: bool) -> None
Wrapper for Fortran routine get_file_number
| Parameters: |
|
|---|
get_file_time_stamp¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
get_file_time_stamp(file: str, time_stamp: str) -> None
no longer exists subroutine get_next_number (filein, cnum, digits) implicit none character() filein character() cnum integer digits end subroutine
get_tty_char¶
Fortran source: sim_utils/io/input_mod.f90
get_tty_char(wait: bool, flush: bool) -> str
Subroutine get_tty_char (this_char, wait, flush)
Subroutine for getting a single character from the terminal. Also see: get_a_char
System Libraries that need to be linked to: readline curses
| Parameters: |
|
|---|
| Returns: |
|
|---|
hanhan¶
Fortran source: sim_utils/math/all_phase_fft.f90
hanhan(N: typing.SupportsInt | typing.SupportsIndex, hh: pybmad._pybmad.RealArray1D) -> None
Wrapper for Fortran routine hanhan
| Parameters: |
|
|---|
i_bessel¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
i_bessel(m: typing.SupportsInt | typing.SupportsIndex, arg: typing.SupportsFloat | typing.SupportsIndex) -> float
Wrapper for Fortran routine i_bessel
| Parameters: |
|
|---|
| Returns: |
|
|---|
i_bessel_extended¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
i_bessel_extended(m: typing.SupportsInt | typing.SupportsIndex, arg: typing.SupportsFloat | typing.SupportsIndex) -> complex
Wrapper for Fortran routine i_bessel_extended
| Parameters: |
|
|---|
| Returns: |
|
|---|
increment_file_number¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
increment_file_number(file_name: str, digits: typing.SupportsInt | typing.SupportsIndex, number: typing.SupportsInt | typing.SupportsIndex, cnumber: str) -> None
Wrapper for Fortran routine increment_file_number
| Parameters: |
|
|---|
index_nocase¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
index_nocase(string1: str, string2: str, indx: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine index_nocase
| Parameters: |
|
|---|
initfixedwindowls¶
Fortran source: sim_utils/math/windowLS.f90
initfixedwindowls(N: typing.SupportsInt | typing.SupportsIndex, dt: typing.SupportsFloat | typing.SupportsIndex, order: typing.SupportsInt | typing.SupportsIndex, der: typing.SupportsInt | typing.SupportsIndex, id: typing.SupportsInt | typing.SupportsIndex) -> None
Function initFixedWindowLS
Initializes an instance of the fixed window least squares module. See module documentation (getf windowLS_mod) for use details. Any instance of windowLS created with this module should be destroyed with destFixedWindowLS.
| Parameters: |
|
|---|
initial_lmdif¶
Fortran source: sim_utils/optimizers/lmdif_mod.f90
initial_lmdif() -> None
Wrapper for Fortran routine initial_lmdif
int_str¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
int_str(int_: typing.SupportsInt | typing.SupportsIndex, str: str, width: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine int_str
| Parameters: |
|
|---|
interpolated_fft¶
Fortran source: sim_utils/math/naff.f90
interpolated_fft(cdata: pybmad._pybmad.ComplexArray1D, calc_ok: bool, this_fft: typing.SupportsFloat | typing.SupportsIndex, opt_dump_spectrum: typing.SupportsInt | typing.SupportsIndex | None = None, opt_dump_index: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Function interpolated_fft (cdata, calc_ok, opt_dump_spectrum, opt_dump_index) result (this_fft)
Windows the complex data and used Numerical Recipes four1 to find the peak in the spectrum. The result is interpolated to improve the accuracy. Hanning and Gaussian windowing are available.
interpolated_fft_gsl¶
Fortran source: sim_utils/math/naff.f90
interpolated_fft_gsl(cdata: pybmad._pybmad.ComplexArray1D, calc_ok: bool, this_fft: typing.SupportsFloat | typing.SupportsIndex, opt_dump_spectrum: typing.SupportsInt | typing.SupportsIndex | None = None, opt_dump_index: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
function interpolated_fft_gsl
Windows the complex data and uses a mixed-radix GSL routine to find the peak in the spectrum. The result is interpolated to improve the accuracy. Hanning and Gaussian windowing are available.
is_alphabetic¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
is_alphabetic(string: str, is_alpha: bool, valid_chars: str | None = None) -> None
no longer exists function inverse_prob (val) result (prob) import implicit none real(rp) prob real(rp) val end function
is_decreasing_sequence¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
is_decreasing_sequence(array: pybmad._pybmad.RealArray1D, strict: bool | None = None) -> bool
Wrapper for Fortran routine is_decreasing_sequence
| Parameters: |
|
|---|
| Returns: |
|
|---|
is_false¶
Fortran source: sim_utils/interfaces/sim_utils_struct.f90
is_false(param: typing.SupportsFloat | typing.SupportsIndex) -> bool
Function is_false (param) result (this_false)
Routine to translate from a real number to a boolian True or False. Translation: 0 = False, nonzero = True
Also see: is_true and int_logic
The typical use of this routine is for parameters in ele_struct%value(:) which is a real array. Some of the elements in the %value array are used to specify boolian attributes. For example, quadrupoles use ele%value(scale_multipoles$).
| Parameters: |
|
|---|
| Returns: |
|
|---|
is_increasing_sequence¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
is_increasing_sequence(array: pybmad._pybmad.RealArray1D, strict: bool | None = None) -> bool
Wrapper for Fortran routine is_increasing_sequence
| Parameters: |
|
|---|
| Returns: |
|
|---|
is_integer¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
is_integer(string: str, valid: bool, int_: typing.SupportsInt | typing.SupportsIndex | None = None, delims: str | None = None, ix_word: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine is_integer
| Parameters: |
|
|---|
is_logical¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
is_logical(string: str, valid: bool, ignore: bool | None = None) -> None
Wrapper for Fortran routine is_logical
| Parameters: |
|
|---|
is_real¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
is_real(string: str, valid: bool, ignore: bool | None = None, real_num: typing.SupportsFloat | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine is_real
| Parameters: |
|
|---|
is_subatomic_species¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
is_subatomic_species(species: typing.SupportsInt | typing.SupportsIndex) -> bool
Function is_subatomic_species(species) result (is_subatomic)
Routine to return True if species argument corresponds to a subatomic particle.
| Parameters: |
|
|---|
| Returns: |
|
|---|
is_true¶
Fortran source: sim_utils/interfaces/sim_utils_struct.f90
is_true(param: typing.SupportsFloat | typing.SupportsIndex) -> bool
Function is_true (param) result (this_true)
Routine to translate from a real number to a boolian True or False. Translation: 0 = False, nonzero = True
Also see: is_false and int_logic
The typical use of this routine is for parameters in ele_struct%value(:) which is a real array. Some of the elements in the %value array are used to specify boolian attributes. For example, quadrupoles use ele%value(scale_multipoles$).
| Parameters: |
|
|---|
| Returns: |
|
|---|
j_bessel¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
j_bessel(m: typing.SupportsInt | typing.SupportsIndex, arg: typing.SupportsFloat | typing.SupportsIndex) -> float
Wrapper for Fortran routine j_bessel
| Parameters: |
|
|---|
| Returns: |
|
|---|
linear_fit¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
linear_fit(x: pybmad._pybmad.RealArray1D, y: pybmad._pybmad.RealArray1D, n_data: typing.SupportsInt | typing.SupportsIndex, a: typing.SupportsFloat | typing.SupportsIndex, b: typing.SupportsFloat | typing.SupportsIndex, sig_a: typing.SupportsFloat | typing.SupportsIndex, sig_b: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine linear_fit
| Parameters: |
|
|---|
linear_fit_2d¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
linear_fit_2d(x: pybmad._pybmad.RealArray1D, y: pybmad._pybmad.RealArray1D, z: pybmad._pybmad.RealArray1D) -> typing.Annotated[list[float], "FixedSize(3)"]
Wrapper for Fortran routine linear_fit_2d
| Parameters: |
|
|---|
| Returns: |
|
|---|
logic_str¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
logic_str(logic: bool, str: str) -> None
Wrapper for Fortran routine logic_str
| Parameters: |
|
|---|
lunget¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
lunget(func_retval__: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine lunget
make_legal_comment¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
make_legal_comment(comment_in: str, comment_out: str) -> None
Wrapper for Fortran routine make_legal_comment
| Parameters: |
|
|---|
mass_of¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
mass_of(species: typing.SupportsInt | typing.SupportsIndex) -> float
Function mass_of (species) result (mass)
Routine to return the mass, in units of eV/c^2, of a particle. To convert to AMU divide mass_of value by the constant atomic_mass_unit.
Note: For atoms where the isotopic number is given, the mass is calculated using the neutral atomic mass adjusted by the weight of any added or missing electrons. The calculated mass is off very slightly due to binding energy effects. Exception: For #1H+ (proton) and #2H+ (deuteron) the exact mass is used since it is known.
| Parameters: |
|
|---|
| Returns: |
|
|---|
match_reg¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
match_reg(str: str, pat: str, is_match: bool) -> None
Wrapper for Fortran routine match_reg
| Parameters: |
|
|---|
match_wild¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
match_wild(string: str, template_: str, is_match: bool) -> None
Wrapper for Fortran routine match_wild
| Parameters: |
|
|---|
match_word¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
match_word(string: str, names: pybmad._pybmad.CharacterAlloc1D, ix: typing.SupportsInt | typing.SupportsIndex, exact_case: bool | None = None, can_abbreviate: bool | None = None, matched_name: str | None = None) -> None
Wrapper for Fortran routine match_word
| Parameters: |
|
|---|
maximize_projection¶
Fortran source: sim_utils/math/naff.f90
maximize_projection(seed: typing.SupportsFloat | typing.SupportsIndex, cdata: pybmad._pybmad.ComplexArray1D, func_retval__: typing.SupportsFloat | typing.SupportsIndex) -> None
function maximize_projection
Optimizer that uses Numerical Recipes brent to find a local maximum, which is the frequency that maximizes the projection.
milli_sleep¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
milli_sleep(milli_sec: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine milli_sleep
| Parameters: |
|
|---|
modulo2_dp¶
Fortran source: sim_utils/special_functions/modulo2_mod.f90
modulo2_dp(x: typing.SupportsFloat | typing.SupportsIndex, amp: typing.SupportsFloat | typing.SupportsIndex) -> float
Function modulo2 (x, amp) result (mod2)
Function to return mod2 = x + 2 * n * amp where n is an integer chosen such that -amp <= mod2 < amp
| Parameters: |
|
|---|
| Returns: |
|
|---|
modulo2_int¶
Fortran source: sim_utils/special_functions/modulo2_mod.f90
modulo2_int(x: typing.SupportsInt | typing.SupportsIndex, amp: typing.SupportsInt | typing.SupportsIndex) -> int
Function modulo2 (x, amp) result (mod2)
Function to return mod2 = x + 2 * n * amp where n is an integer chosen such that -amp <= mod2 < amp
| Parameters: |
|
|---|
| Returns: |
|
|---|
modulo2_qp¶
Fortran source: sim_utils/special_functions/modulo2_mod.f90
modulo2_qp(x: typing.SupportsFloat | typing.SupportsIndex, amp: typing.SupportsFloat | typing.SupportsIndex) -> float
Function modulo2 (x, amp) result (mod2)
Function to return mod2 = x + 2 * n * amp where n is an integer chosen such that -amp <= mod2 < amp
| Parameters: |
|
|---|
| Returns: |
|
|---|
modulo2_sp¶
Fortran source: sim_utils/special_functions/modulo2_mod.f90
modulo2_sp(x: typing.SupportsFloat | typing.SupportsIndex, amp: typing.SupportsFloat | typing.SupportsIndex) -> float
Function modulo2 (x, amp) result (mod2)
Function to return mod2 = x + 2 * n * amp where n is an integer chosen such that -amp <= mod2 < amp
| Parameters: |
|
|---|
| Returns: |
|
|---|
n_bins_automatic¶
Fortran source: sim_utils/math/bin_mod.f90
n_bins_automatic(n_data: typing.SupportsInt | typing.SupportsIndex, n: typing.SupportsInt | typing.SupportsIndex) -> None
Function to automatically select the number of bins
n_choose_k¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
n_choose_k(n: typing.SupportsInt | typing.SupportsIndex, k: typing.SupportsInt | typing.SupportsIndex) -> float
Wrapper for Fortran routine n_choose_k
| Parameters: |
|
|---|
| Returns: |
|
|---|
n_spline_create¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
n_spline_create(deriv0: pybmad._pybmad.RealArray1D, deriv1: pybmad._pybmad.RealArray1D, x1: typing.SupportsFloat | typing.SupportsIndex, n_spline: pybmad._pybmad.RealArray1D) -> None
Wrapper for Fortran routine n_spline_create
| Parameters: |
|
|---|
naff¶
Fortran source: sim_utils/math/naff.f90
naff(cdata: pybmad._pybmad.ComplexArray1D, freqs: pybmad._pybmad.RealArray1D, amps: pybmad._pybmad.ComplexArray1D, opt_dump_spectra: typing.SupportsInt | typing.SupportsIndex | None = None, opt_zero_first: bool | None = None) -> None
subroutine naff(cdata,freqs,amps,opt_dump_spectra,opt_zero_first)
This subroutine implements the NAFF algorithm for calculating the spectra of periodic data.
See naff_mod documentation for details.
Frequencies returned are in units of 2pi. That is, freqs ranges from 0 to 1.
freqs and amps must be allocated before hand. This subroutine will repeat the decomposition loop until all elements of freqs and amps are populated.
nametable_add¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
nametable_add(nametable: pybmad._pybmad.NametableStruct, name: str, ix_name: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine nametable_add
| Parameters: |
|
|---|
nametable_bracket_indexx¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
nametable_bracket_indexx(nametable: pybmad._pybmad.NametableStruct, name: str, ix_max: typing.SupportsInt | typing.SupportsIndex, n_match: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine nametable_bracket_indexx
| Parameters: |
|
|---|
nametable_change1¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
nametable_change1(nametable: pybmad._pybmad.NametableStruct, name: str, ix_name: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine nametable_change1
| Parameters: |
|
|---|
nametable_init¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
nametable_init(nametable: pybmad._pybmad.NametableStruct, n_min: typing.SupportsInt | typing.SupportsIndex | None = None, n_max: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine nametable_init
| Parameters: |
|
|---|
nametable_remove¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
nametable_remove(nametable: pybmad._pybmad.NametableStruct, ix_name: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine nametable_remove
| Parameters: |
|
|---|
negative_ampsquared¶
Fortran source: sim_utils/math/fourier_mod.f90
negative_ampsquared(frequency: typing.SupportsFloat | typing.SupportsIndex, amp: typing.SupportsFloat | typing.SupportsIndex, status: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine negative_ampsquared
| Parameters: |
|
|---|
negative_dampsquared¶
Fortran source: sim_utils/math/fourier_mod.f90
negative_dampsquared(frequency: typing.SupportsFloat | typing.SupportsIndex, damp: typing.SupportsFloat | typing.SupportsIndex, status: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine negative_dampsquared
| Parameters: |
|
|---|
omega_to_quat¶
Fortran source: sim_utils/math/rotation_3d_mod.f90
omega_to_quat(omega: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]) -> typing.Annotated[list[float], "FixedSize(4)"]
Function omega_to_quat (omega) result (quat)
Routine to convert from omega + angle representation to a quaternion.
| Parameters: |
|
|---|
| Returns: |
|
|---|
openpmd_species_name¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
openpmd_species_name(species: typing.SupportsInt | typing.SupportsIndex) -> str
Function openpmd_species_name (species) result(pmd_name)
Routine to return the openPMD name of a particle species given the Bmad species ID. Note: the pmd_name does not include the particle charge. For example, if species corresponds to He+ then the pmd_name will be "He".
| Parameters: |
|
|---|
| Returns: |
|
|---|
ordinal_str¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
ordinal_str(n: typing.SupportsInt | typing.SupportsIndex, str: str) -> None
Wrapper for Fortran routine ordinal_str
| Parameters: |
|
|---|
out_io¶
Fortran sources (overloaded):
out_io_real:sim_utils/io/output_mod.f90out_io_int:sim_utils/io/output_mod.f90out_io_logical:sim_utils/io/output_mod.f90out_io_line12:sim_utils/io/output_mod.f90out_io_lines:sim_utils/io/output_mod.f90
out_io(args, *kwargs) Overloaded function.
- out_io(level: typing.SupportsInt | typing.SupportsIndex, routine_name: str, line: str, i_num: typing.SupportsInt | typing.SupportsIndex, insert_tag_line: bool | None = None) -> None
Wrapper for Fortran routine out_io_int
| Parameters: |
|
|---|
| Parameters: |
|
|---|
| Parameters: |
|
|---|
| Parameters: |
|
|---|
| Parameters: |
|
|---|
out_io_buffer_get_line¶
Fortran source: sim_utils/io/output_mod.f90
out_io_buffer_get_line(ix_line: typing.SupportsInt | typing.SupportsIndex, line: str) -> None
Function out_io_buffer_get_line(ix_line) result (line)
Routine to return the nuber of lines in the internal buffer. See the output_direct documentation for more details.
out_io_buffer_num_lines¶
Fortran source: sim_utils/io/output_mod.f90
out_io_buffer_num_lines(n_lines: typing.SupportsInt | typing.SupportsIndex) -> None
Function out_io_buffer_num_lines() result (n_lines)
Routine to return the nuber of lines in the internal buffer. See the output_direct documentation for more details.
out_io_buffer_reset¶
Fortran source: sim_utils/io/output_mod.f90
out_io_buffer_reset() -> None
Subroutine out_io_buffer_reset ()
Routine to initialize the buffer used for capturing output.
out_io_print_and_capture_setup¶
Fortran source: sim_utils/io/output_mod.f90
out_io_print_and_capture_setup(print_on: bool | None = None, capture_state: str | None = None, capture_add_null: bool | None = None) -> None
Subroutine out_io_print_and_capture_setup (print_on, capture_state, capture_add_null)
Set whether a message from a call to out_io is sent to the terminal for printing and/or captured for program use.
Capture may be desired, for example, to display the output in a separate window or captured output could be passed to a python process for processing.
The procedure for how a message is handled is as follows: First: When out_io is called, the message level is used to determine if anything is to be printed or captured at all. When a program is started, everything will pass this test for printing and/or capturing. This behavior can be modified by calls to the output_direct routine. Second: If a message is to be printed and/or captured (passes the first step), then the internal print_on flag is used to determine if printing to the terminal and the internal capture_state flag is used to determine if capture is to be done. The initial setting of these flags is print_on = True and capture_state = 'OFF'. These internal flags can be set using the print_on and capture_state arguments of this routine.
Notice that whether a message is also written to a file is independent of print and capture logic (see output_direct for more details).
There are two capture modes. buffered (blocked) and unbuffered (unblocked) output. If a message is to be captured as outlined above, one and only one capture mode is used
Unbuffered output is used when running multithreaded so that the program does not have to wait for output. For example, with a GUI. With unbuffered output, out_io calls three routines: out_io_called(level, routine_name) ! Called at the start of a message. out_io_line(line) ! Called for each line of a message. out_io_end() ! Called at end of a message. The versions of these routines in the sim_utils library are just dummies. The idea is that modified versions of these routines can be used to capture the output.
Buffered output uses an internal buffer to store the output. Output that has been buffered is retrieved by using the routines: out_io_buffer_reset out_io_buffer_num_lines and out_io_buffer_get_line
| Parameters: |
|
|---|
parse_fortran_format¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
parse_fortran_format(format_str: str, n_repeat: typing.SupportsInt | typing.SupportsIndex, power: typing.SupportsInt | typing.SupportsIndex, descrip: str, width: typing.SupportsInt | typing.SupportsIndex, digits: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine parse_fortran_format
| Parameters: |
|
|---|
pointer_to_locations¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
pointer_to_locations(string: str, array: pybmad._pybmad.IntAlloc1D, num: typing.SupportsInt | typing.SupportsIndex, ix_min: typing.SupportsInt | typing.SupportsIndex, ix_max: typing.SupportsInt | typing.SupportsIndex, names: pybmad._pybmad.CharacterAlloc1D | None = None, exact_case: bool | None = None, print_err: bool | None = None) -> None
Wrapper for Fortran routine pointer_to_locations
| Parameters: |
|
|---|
pointer_to_ran_state¶
Fortran source: sim_utils/math/random_mod.f90
pointer_to_ran_state(ran_state: pybmad._pybmad.RandomStateStruct | None = None, ix_thread: typing.SupportsInt | typing.SupportsIndex | None = None) -> pybmad._pybmad.RandomStateStruct | None
Function pointer_to_ran_state(ran_state, ix_thread) result (ran_state_ptr)
Routine to point to the appropriate state structure for generating random numbers
| Parameters: |
|
|---|
| Returns: |
|
|---|
poly_eval¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
poly_eval(poly: pybmad._pybmad.RealArray1D, x: typing.SupportsFloat | typing.SupportsIndex, diff_coef: bool | None = None) -> float
Wrapper for Fortran routine poly_eval
| Parameters: |
|
|---|
| Returns: |
|
|---|
probability_funct¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
probability_funct(x: typing.SupportsFloat | typing.SupportsIndex, prob: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine probability_funct
| Parameters: |
|
|---|
projdd¶
Fortran source: sim_utils/math/naff.f90
projdd(a: pybmad._pybmad.ComplexArray1D, b: pybmad._pybmad.ComplexArray1D, func_retval__: typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine projdd
| Parameters: |
|
|---|
quadratic_roots¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
quadratic_roots(coefs: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]) -> typing.Annotated[list[complex], "FixedSize(2)"]
Wrapper for Fortran routine quadratic_roots
| Parameters: |
|
|---|
| Returns: |
|
|---|
quat_conj¶
Fortran sources (overloaded):
quat_conj_real:sim_utils/math/rotation_3d_mod.f90quat_conj_complex:sim_utils/math/rotation_3d_mod.f90
quat_conj(args, *kwargs) Overloaded function.
- quat_conj(q_in: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"]) -> typing.Annotated[list[complex], "FixedSize(4)"]
Function quat_conj (q_in) result (q_out)
Overloaded name to create the conjugate of a quaternian. Overloaded functions are: Function quat_conj_real (q_in) result (q_out) Function quat_conj_complex (q_in) result (q_out)
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
| Returns: |
|
|---|
quat_inverse¶
Fortran source: sim_utils/math/rotation_3d_mod.f90
quat_inverse(q_in: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"]) -> typing.Annotated[list[float], "FixedSize(4)"]
Function quat_inverse (q_in) result (q_out)
Routine to create the inverse of a quaternian.
| Parameters: |
|
|---|
| Returns: |
|
|---|
quat_mul¶
Fortran sources (overloaded):
quat_mul_real:sim_utils/math/rotation_3d_mod.f90quat_mul_complex:sim_utils/math/rotation_3d_mod.f90
quat_mul(args, *kwargs) Overloaded function.
- quat_mul(q1: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"], q2: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"], q3: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"] | None = None, q4: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"] | None = None, q5: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"] | None = None, q6: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"] | None = None, q7: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"] | None = None, q8: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"] | None = None, q9: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"] | None = None) -> typing.Annotated[list[complex], "FixedSize(4)"]
Function quat_mul_real (q1, q2, q3, q4, q5, q6, q7, q8, q9) result (q_out)
Overloaded name to multiply quaternions q_out = q1 * q2 * q3 * q4 * ... Note: q_out = q1 * q2 represents a rotation of q2 first followed by q1. Overloaded functions are: Function quat_mul_real (q1, q2, q3, q4, q5, q6, q7, q8, q9) result (q_out) Function quat_mul_real (q1, q2, q3, q4, q5, q6, q7, q8, q9) result (q_out)
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
| Returns: |
|
|---|
quat_rotate¶
Fortran sources (overloaded):
quat_rotate_real:sim_utils/math/rotation_3d_mod.f90quat_rotate_complex:sim_utils/math/rotation_3d_mod.f90
quat_rotate(args, *kwargs) Overloaded function.
- quat_rotate(quat: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"], vec_in: typing.Annotated[collections.abc.Sequence[typing.SupportsComplex | typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]) -> typing.Annotated[list[complex], "FixedSize(3)"]
Function quat_rotate (quat, vec_in) result (vec_out)
Overloaded name to rotate a vector using a quaternion.. Overloaded functions are: Function quat_rotate_real (quat, vec_in) result (vec_out) Function quat_rotate_complex (quat, vec_in) result (vec_out)
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
| Returns: |
|
|---|
quat_to_axis_angle¶
Fortran source: sim_utils/math/rotation_3d_mod.f90
quat_to_axis_angle(quat: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"]) -> pybmad._pybmad.QuatToAxisAngle
Subroutine quat_to_axis_angle (quat, axis, angle)
Routine to convert from quaternion to axis + angle representation. The angle will be in the range 0 <= angle <= pi.
| Parameters: |
|
|---|
| Returns: |
|
|---|
quat_to_omega¶
Fortran source: sim_utils/math/rotation_3d_mod.f90
quat_to_omega(quat: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"]) -> typing.Annotated[list[float], "FixedSize(3)"]
Function quat_to_omega (quat) result (omega)
Routine to convert rotation from quaternion representation to omega (axis + angle).
| Parameters: |
|
|---|
| Returns: |
|
|---|
quat_to_w_mat¶
Fortran source: sim_utils/math/rotation_3d_mod.f90
quat_to_w_mat(quat: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"]) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(3)"]], "FixedSize(3)"]
Function quat_to_w_mat (quat) result (w_mat)
Routine to construct the 3D rotation matrix w_mat given a rotation quaternion
| Parameters: |
|
|---|
| Returns: |
|
|---|
query_string¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
query_string(query_str: str, upcase: bool, return_str: str, ix: typing.SupportsInt | typing.SupportsIndex, ios: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine query_string
| Parameters: |
|
|---|
quote¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
quote(str: str, q_str: str) -> None
Wrapper for Fortran routine quote
| Parameters: |
|
|---|
quoten¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
quoten(str: pybmad._pybmad.CharacterAlloc1D, q_str: str, delim: str | None = None) -> None
Wrapper for Fortran routine quoten
| Parameters: |
|
|---|
ran_default_state¶
Fortran source: sim_utils/math/random_mod.f90
ran_default_state(set_state: pybmad._pybmad.RandomStateStruct | None = None) -> pybmad._pybmad.RandomStateStruct
Subroutine ran_default_state (set_state, get_state)
Routine to set or get the state of the default random number generator. See the ran_seed_put documentation for more details
| Parameters: |
|
|---|
| Returns: |
|
|---|
ran_engine¶
Fortran source: sim_utils/math/random_mod.f90
ran_engine(set: str | None = None, get: str | None = None, ran_state: pybmad._pybmad.RandomStateStruct | None = None) -> None
Subroutine ran_engine (set, get, ran_state)
Routine to set what random number generator algorithm is used. If this routine is never called then pseudo_random$ is used. With sobseq quasi-random numbers the maximum dimension is 6.
| Parameters: |
|
|---|
ran_gauss_converter¶
Fortran source: sim_utils/math/random_mod.f90
ran_gauss_converter(set: str | None = None, set_sigma_cut: typing.SupportsFloat | typing.SupportsIndex | None = None, ran_state: pybmad._pybmad.RandomStateStruct | None = None) -> pybmad._pybmad.RanGaussConverter
Subroutine ran_gauss_converter (set, set_sigma_cut, get, get_sigma_cut, ran_state)
Routine to set what conversion routine is used for converting uniformly distributed random numbers to Gaussian distributed random numbers.
If this routine is not called then exact_gaussian$ is used.
exact_gaussian$ is a straight forward converter as explained in Numerical recipes.
quick_gaussian$ is a quick a dirty approximation with a cutoff so that no numbers will be generated beyound what is set for sigma_cut.
A negative sigma_cut means that the exact_gaussian$ will not be limited and the quick_gaussian$ will use a default of 10.0
Note: Because of technical issues, when using the quasi_random$ number generator (see the ran_engine routine), the quick_gaussian$ method will automatically be used independent of what was set with this routine.
| Parameters: |
|
|---|
| Returns: |
|
|---|
ran_gauss_scalar¶
Fortran source: sim_utils/math/random_mod.f90
ran_gauss_scalar(ran_state: pybmad._pybmad.RandomStateStruct | None = None, sigma_cut: typing.SupportsFloat | typing.SupportsIndex | None = None, index_quasi: typing.SupportsInt | typing.SupportsIndex | None = None) -> float
Subroutine ran_gauss (harvest, ran_state, sigma_cut)
Routine to return a gaussian distributed random number with unit sigma. This routine uses the same algorithm as gasdev from Numerical Recipes.
Note: ran_gauss is an overloaded name for: ran_gauss_scalar ! harvest is a scalar ran_gauss_vector ! harvest is a 1-D array.
Note: Use ran_seed_put for initialization. Note: Use ran_engine to set which random number generator to use. Note: Use ran_gauss_converter to set which conversion routine to use.
| Parameters: |
|
|---|
| Returns: |
|
|---|
ran_gauss_vector¶
Fortran source: sim_utils/math/random_mod.f90
ran_gauss_vector(harvest: pybmad._pybmad.RealArray1D, ran_state: pybmad._pybmad.RandomStateStruct | None = None, sigma_cut: typing.SupportsFloat | typing.SupportsIndex | None = None) -> None
Subroutine ran_gauss (harvest, ran_state, sigma_cut)
Routine to return a gaussian distributed random number with unit sigma. This routine uses the same algorithm as gasdev from Numerical Recipes.
Note: ran_gauss is an overloaded name for: ran_gauss_scalar ! harvest is a scalar ran_gauss_vector ! harvest is a 1-D array.
Note: Use ran_seed_put for initialization. Note: Use ran_engine to set which random number generator to use. Note: Use ran_gauss_converter to set which conversion routine to use.
| Parameters: |
|
|---|
ran_seed_get¶
Fortran source: sim_utils/math/random_mod.f90
ran_seed_get() -> int
Subroutine ran_seed_get (seed)
Routine to return the seed used for the random number generator.
| Parameters: |
|
|---|
ran_seed_put¶
Fortran source: sim_utils/math/random_mod.f90
ran_seed_put(seed: typing.SupportsInt | typing.SupportsIndex, mpi_offset: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Subroutine ran_seed_put (seed, mpi_offset)
Routine to seed a random number generator.
If a program never calls ran_seed_put, or ran_seed_put is called with seed = 0, the system clock will be used to generate the seed.
Note: The seed is only used with the pseudo_random$ engine. Note: Use the subroutine ran_seed_get(seed) to get the seed used. Note: Use pointer_to_ran_state() to access the ran state directly.
| Parameters: |
|
|---|
ran_uniform¶
Fortran sources (overloaded):
ran_uniform_scalar:sim_utils/math/random_mod.f90ran_uniform_vector:sim_utils/math/random_mod.f90
ran_uniform(args, *kwargs) Overloaded function.
- ran_uniform(ran_state: pybmad._pybmad.RandomStateStruct | None = None, index_quasi: typing.SupportsInt | typing.SupportsIndex | None = None) -> float
Subroutine ran_uniform (harvest, ran_state)
Routine to return a random number uniformly distributed in the interval [0, 1]. This routine uses the same algorithm as ran or sobseq from Numberical Recipes in Fortran90. See ran_engine.
Note: ran_uniform is an overloaded name for: ran_uniform_scalar ! harvest is a scalar ran_uniform_vector ! harvest is a 1-D array.
Note: Use ran_seed_put for initialization. Note: Use ran_engine to set which random number generator to use.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
rcelbd¶
Fortran source: sim_utils/special_functions/elliptic_integral_mod.f90
rcelbd(mc: typing.SupportsFloat | typing.SupportsIndex, elb: typing.SupportsFloat | typing.SupportsIndex, eld: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine rcelbd
| Parameters: |
|
|---|
read_a_line¶
Fortran source: sim_utils/io/input_mod.f90
read_a_line(prompt: str, trim_prompt: bool | None = None, prompt_color: str | None = None, prompt_bold: bool | None = None, history_file: str | None = None) -> str
Subroutine read_a_line (prompt, line_out, trim_prompt, prompt_color, prompt_bold, history_file)
Subroutine to read a line of input from the terminal. The line is also add to the history buffer so that the up-arrow and down-arrow keys can be used to recall past commands.
Also see: readline_read_history readline_write_history
System Libraries that need to be linked to: readline curses
| Parameters: |
|
|---|
| Returns: |
|
|---|
readline_read_history¶
Fortran source: sim_utils/io/input_mod.f90
readline_read_history(history_file: str) -> int
Subroutine readline_read_history (history_file, status)
Routine to add the contents of a file to the readline history list. Use this routine with the read_a_line routine.
| Parameters: |
|
|---|
| Returns: |
|
|---|
readline_write_history¶
Fortran source: sim_utils/io/input_mod.f90
readline_write_history(history_file: str) -> int
Subroutine readline_write_history (history_file, status)
Routine to write the contents of the readline history list to a file. Use this routine with the read_a_line routine.
| Parameters: |
|
|---|
| Returns: |
|
|---|
real_num_fortran_format¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
real_num_fortran_format(number: typing.SupportsFloat | typing.SupportsIndex, width: typing.SupportsInt | typing.SupportsIndex, fmt_str: str, n_blanks: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine real_num_fortran_format
| Parameters: |
|
|---|
real_path¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
real_path(path_in: str, path_out: str, is_ok: bool) -> None
Wrapper for Fortran routine real_path
| Parameters: |
|
|---|
real_str¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
real_str(r_num: typing.SupportsFloat | typing.SupportsIndex, str: str, n_signif: typing.SupportsInt | typing.SupportsIndex | None = None, n_decimal: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine real_str
| Parameters: |
|
|---|
real_to_string¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
real_to_string(real_num: typing.SupportsFloat | typing.SupportsIndex, width: typing.SupportsInt | typing.SupportsIndex, str: str, n_signif: typing.SupportsInt | typing.SupportsIndex | None = None, n_decimal: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine real_to_string
| Parameters: |
|
|---|
reallocate_spline¶
Fortran source: sim_utils/math/spline_mod.f90
reallocate_spline(spline: pybmad._pybmad.SplineStructAlloc1D, n: typing.SupportsInt | typing.SupportsIndex, n_min: typing.SupportsInt | typing.SupportsIndex | None = None, exact: bool | None = None) -> None
Subroutine reallocate_spline (spline, n, n_min, exact)
Subroutine to allocate an allocatable spline_struct array. The data of the array is preserved but data at the end of the array will be lost if n is less than the original size of the array
| Parameters: |
|
|---|
relbd¶
Fortran source: sim_utils/special_functions/elliptic_integral_mod.f90
relbd(phi: typing.SupportsFloat | typing.SupportsIndex, phic: typing.SupportsFloat | typing.SupportsIndex, mc: typing.SupportsFloat | typing.SupportsIndex, b: typing.SupportsFloat | typing.SupportsIndex, d: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine relbd
| Parameters: |
|
|---|
relcbd¶
Fortran source: sim_utils/special_functions/elliptic_integral_mod.f90
relcbd(c0: typing.SupportsFloat | typing.SupportsIndex, mc: typing.SupportsFloat | typing.SupportsIndex, b: typing.SupportsFloat | typing.SupportsIndex, dx: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine relcbd
| Parameters: |
|
|---|
relsbd¶
Fortran source: sim_utils/special_functions/elliptic_integral_mod.f90
relsbd(s0: typing.SupportsFloat | typing.SupportsIndex, mc: typing.SupportsFloat | typing.SupportsIndex, b: typing.SupportsFloat | typing.SupportsIndex, d: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine relsbd
| Parameters: |
|
|---|
rgelbd¶
Fortran source: sim_utils/special_functions/elliptic_integral_mod.f90
rgelbd(phi: typing.SupportsFloat | typing.SupportsIndex, mc: typing.SupportsFloat | typing.SupportsIndex, elb: typing.SupportsFloat | typing.SupportsIndex, eld: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine rgelbd
| Parameters: |
|
|---|
rms_value¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
rms_value(val_arr: pybmad._pybmad.RealArray1D, good_val: pybmad._pybmad.BoolAlloc1D | None = None) -> pybmad._pybmad.RmsValue
Wrapper for Fortran routine rms_value
| Parameters: |
|
|---|
| Returns: |
|
|---|
rot_2d¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
rot_2d(vec_in: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(2)"], angle: typing.SupportsFloat | typing.SupportsIndex) -> typing.Annotated[list[float], "FixedSize(2)"]
Wrapper for Fortran routine rot_2d
| Parameters: |
|
|---|
| Returns: |
|
|---|
rotate_vec¶
Fortran source: sim_utils/math/rotation_3d_mod.f90
rotate_vec(vec: pybmad._pybmad.RealArray1D, axis: typing.SupportsInt | typing.SupportsIndex, angle: typing.SupportsFloat | typing.SupportsIndex) -> None
Subroutine rotate_vec (vec, axis, angle)
Basic routine to rotate vector components around the x, y, or z axis.
| Parameters: |
|
|---|
rotate_vec_given_axis_angle¶
Fortran source: sim_utils/math/rotation_3d_mod.f90
rotate_vec_given_axis_angle(vec_in: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"], axis: pybmad._pybmad.RealArray1D, angle: typing.SupportsFloat | typing.SupportsIndex) -> typing.Annotated[list[float], "FixedSize(3)"]
Function rotate_vec_given_axis_angle (vec_in, axis, angle) result (vec_out)
Routine to rotate a vector.
| Parameters: |
|
|---|
| Returns: |
|
|---|
rp8¶
Fortran source: sim_utils/interfaces/precision_def.f90
rp8(int_in: typing.SupportsInt | typing.SupportsIndex) -> float
Function rp8(int_in) result (re_out)
Routine to convert from integer to real of type rp. This routine is used to avoid the implicit integer to single precision that happens when multiplying int*real(rp).
| Parameters: |
|
|---|
| Returns: |
|
|---|
rserbd¶
Fortran source: sim_utils/special_functions/elliptic_integral_mod.f90
rserbd(y: typing.SupportsFloat | typing.SupportsIndex, m: typing.SupportsFloat | typing.SupportsIndex, b: typing.SupportsFloat | typing.SupportsIndex, d: typing.SupportsFloat | typing.SupportsIndex) -> None
Wrapper for Fortran routine rserbd
| Parameters: |
|
|---|
run_timer¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
run_timer(command: str, time: typing.SupportsFloat | typing.SupportsIndex | None = None, time0: typing.SupportsFloat | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine run_timer
| Parameters: |
|
|---|
serbd¶
Fortran source: sim_utils/special_functions/elliptic_integral_mod.f90
serbd(y: typing.SupportsFloat | typing.SupportsIndex, m: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.Serbd
Wrapper for Fortran routine serbd
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_env¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
set_env(env_name: str, env_value: str, err_flag: bool) -> None
Wrapper for Fortran routine set_env
| Parameters: |
|
|---|
set_parameter¶
Fortran sources (overloaded):
set_parameter_real:sim_utils/interfaces/sim_utils_interface.f90set_parameter_int:sim_utils/interfaces/sim_utils_interface.f90set_parameter_logic:sim_utils/interfaces/sim_utils_interface.f90
set_parameter(args, *kwargs) Overloaded function.
- set_parameter(param_val: typing.SupportsInt | typing.SupportsIndex, set_val: typing.SupportsInt | typing.SupportsIndex, save_val: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine set_parameter_int
| Parameters: |
|
|---|
| Parameters: |
|
|---|
| Parameters: |
|
|---|
set_species_charge¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
set_species_charge(species_in: typing.SupportsInt | typing.SupportsIndex, charge: typing.SupportsInt | typing.SupportsIndex) -> int
Function set_species_charge(species_in, charge) result(species_charged)
Routine to return the ID for a particle of the same type as species_in but with a different charge. Exception: If species_in corresponds to a subatomic particle, the charge argument is ignored and species_charged will be set equal to species_in.
| Parameters: |
|
|---|
| Returns: |
|
|---|
sign_of¶
Fortran sources (overloaded):
sign_of_real:sim_utils/special_functions/sign_of_mod.f90sign_of_int:sim_utils/special_functions/sign_of_mod.f90
sign_of(args, *kwargs) Overloaded function.
- sign_of(num: typing.SupportsInt | typing.SupportsIndex, zero_is_zero: bool | None = None) -> int
Function sign_of (num, zero_is_zero) result (num_sign)
Routine to return the sign of a number. Note: Fortran instrinsic sign function is similar to sign_of with zero_is_zero = False.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Parameters: |
|
|---|
| Returns: |
|
|---|
sinc¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
sinc(x: typing.SupportsFloat | typing.SupportsIndex, nd: typing.SupportsInt | typing.SupportsIndex | None = None) -> float
Wrapper for Fortran routine sinc
| Parameters: |
|
|---|
| Returns: |
|
|---|
sincc¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
sincc(x: typing.SupportsFloat | typing.SupportsIndex, nd: typing.SupportsInt | typing.SupportsIndex | None = None) -> float
Wrapper for Fortran routine sincc
| Parameters: |
|
|---|
| Returns: |
|
|---|
sinhx_x¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
sinhx_x(x: typing.SupportsFloat | typing.SupportsIndex, nd: typing.SupportsInt | typing.SupportsIndex | None = None) -> float
Wrapper for Fortran routine sinhx_x
| Parameters: |
|
|---|
| Returns: |
|
|---|
skip_header¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
skip_header(ix_unit: typing.SupportsInt | typing.SupportsIndex, error_flag: bool) -> None
Wrapper for Fortran routine skip_header
| Parameters: |
|
|---|
special_projection¶
Fortran source: sim_utils/math/naff.f90
special_projection(f: typing.SupportsFloat | typing.SupportsIndex, func_retval__: typing.SupportsFloat | typing.SupportsIndex, status: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
function special_projection
Calculates
Used only by maximize projection. Uses data global to the function to accomodate stock NR routine.
species_id¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
species_id(name: str, default_: typing.SupportsInt | typing.SupportsIndex | None = None, print_err: bool | None = None) -> int
Function species_id (name, default, print_err) result(species)
Routine to return the integer ID index of a particle species given the name.
For subatomic particles, the case does not matter. For all other types of particles, the case does matter.
| Parameters: |
|
|---|
| Returns: |
|
|---|
species_id_from_openpmd¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
species_id_from_openpmd(pmd_name: str, charge: typing.SupportsInt | typing.SupportsIndex) -> int
Function species_id_from_openpmd (pmd_name, charge) result(species)
Routine to return the Bmad species ID given the openPMD species name and given particle charge. Note: If pmd_name corresponds to a subatomic particle, the charge argument is ignored.
| Parameters: |
|
|---|
| Returns: |
|
|---|
species_name¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
species_name(species: typing.SupportsInt | typing.SupportsIndex) -> str
Function species_name (species) result(name)
Routine to return the name of a particle species given the integer index.
| Parameters: |
|
|---|
| Returns: |
|
|---|
species_of¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
species_of(mass: typing.SupportsFloat | typing.SupportsIndex, charge: typing.SupportsInt | typing.SupportsIndex) -> int
Function species_of (mass, charge) result (species)
Routine to return the integer ID index of a particle species given the mass and charge. Note: Currently this routine only works for subatomic particles and is used for decoding PTC flat files.
| Parameters: |
|
|---|
| Returns: |
|
|---|
spin_of¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
spin_of(species: typing.SupportsInt | typing.SupportsIndex, non_subatomic_default: typing.SupportsFloat | typing.SupportsIndex | None = None) -> float
Function spin_of (species, non_subatomic_default) result (spin)
Routine to return the spin, in units of hbar, of a particle. This routine is only valid for subatomic particles. For all other particles, the returned spin value will be the value of non_subatomic_default.
| Parameters: |
|
|---|
| Returns: |
|
|---|
spline1¶
Fortran source: sim_utils/math/spline_mod.f90
spline1(a_spline: pybmad._pybmad.SplineStruct, x: typing.SupportsFloat | typing.SupportsIndex, n: typing.SupportsInt | typing.SupportsIndex | None = None) -> float
Function spline1 (a_spline, x, n) result (y)
Function for spline evaluation using a single spline (instead of a spline array). Also see: spline_evaluate spline_akima_interpolate
Modules used: use spline_mod
| Parameters: |
|
|---|
| Returns: |
|
|---|
spline_akima¶
Fortran source: sim_utils/math/spline_mod.f90
spline_akima(spline: pybmad._pybmad.SplineStructArray1D) -> bool
Subroutine spline_akima (spline, ok)
Given a set of (x,y) points we want to interpolate between the points. This subroutine computes the semi-hermite cubic spline developed by Hiroshi Akima. The spline goes thorugh all the points (that is, it is not a smoothing spline). For interpolation use: spline_evaluate spline_akima_interpolate ! You do not need to call spline_akima if you use this routine.
Reference: H Akima, "A New Method of Interpolation and Smooth Curve Fitting Based on Local Procedures", J. Assoc. Comp. Mach., Vol 17(4), 589-602 (1970).
Modules used: use spline_mod
| Parameters: |
|
|---|
| Returns: |
|
|---|
spline_akima_interpolate¶
Fortran source: sim_utils/math/spline_mod.f90
spline_akima_interpolate(x_knot: pybmad._pybmad.RealArray1D, y_knot: pybmad._pybmad.RealArray1D, x: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.SplineAkimaInterpolate
Subroutine spline_akima_interpolate (x_knot, y_knot, x, ok, y, dy)
Routine to interpolate using an akima spline.
When evaluating at enough points, this routine is slower than calling spline_akima to first evaluate the spline coefficients and then repeatedly calling spline_evaluate.
The advantage of this routine is that only the (x, y) knot points need to be stored and it will be faster if the number of evaluations is small.
This routine will extrapolate past the range of x_knot(:) up to a distance equal to the length between an end point and the point just inside the end point.
| Parameters: |
|
|---|
| Returns: |
|
|---|
spline_evaluate¶
Fortran source: sim_utils/math/spline_mod.f90
spline_evaluate(spline: pybmad._pybmad.SplineStructArray1D, x: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.SplineEvaluate
Subroutine spline_evaluate (spline, x, ok, y, dy)
Subroutine to evalueate a spline at a set of points.
A point outside of the range of knot points is an error. Also see: spline1 spline_akima_interpolate
A spline may be generated using, for example, the spline_akima routine.
Modules used: use spline_mod
| Parameters: |
|
|---|
| Returns: |
|
|---|
sqrt_alpha¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
sqrt_alpha(alpha: typing.SupportsFloat | typing.SupportsIndex, x: typing.SupportsFloat | typing.SupportsIndex) -> float
Wrapper for Fortran routine sqrt_alpha
| Parameters: |
|
|---|
| Returns: |
|
|---|
sqrt_one¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
sqrt_one(x: typing.SupportsFloat | typing.SupportsIndex, ds1: typing.SupportsFloat | typing.SupportsIndex, nd: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
Wrapper for Fortran routine sqrt_one
| Parameters: |
|
|---|
str_count¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
str_count(str: str, match_: str, num: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine str_count
| Parameters: |
|
|---|
str_downcase¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
str_downcase(src: str) -> str
Wrapper for Fortran routine str_downcase
| Parameters: |
|
|---|
| Returns: |
|
|---|
str_first_in_set¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
str_first_in_set(line: str, set: str, ix_match: typing.SupportsInt | typing.SupportsIndex, ignore_clauses: bool | None = None) -> None
Wrapper for Fortran routine str_first_in_set
| Parameters: |
|
|---|
str_first_not_in_set¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
str_first_not_in_set(line: str, set: str, ix_match: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine str_first_not_in_set
| Parameters: |
|
|---|
str_last_in_set¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
str_last_in_set(line: str, set: str, ix_match: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine str_last_in_set
| Parameters: |
|
|---|
str_last_not_in_set¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
str_last_not_in_set(line: str, set: str, ix_match: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine str_last_not_in_set
| Parameters: |
|
|---|
str_match_wild¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
str_match_wild(str: str, pat: str, a_match: bool) -> None
Wrapper for Fortran routine str_match_wild
| Parameters: |
|
|---|
str_substitute¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
str_substitute(string: str, str_match: str | None = None, str_replace: str | None = None, do_trim: bool | None = None, ignore_escaped: bool | None = None) -> None
Wrapper for Fortran routine str_substitute
| Parameters: |
|
|---|
str_upcase¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
str_upcase(src: str) -> str
Wrapper for Fortran routine str_upcase
| Parameters: |
|
|---|
| Returns: |
|
|---|
string_to_int¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
string_to_int(line: str, default_: typing.SupportsInt | typing.SupportsIndex, err_flag: bool, value: typing.SupportsInt | typing.SupportsIndex, err_print_flag: bool | None = None) -> None
Wrapper for Fortran routine string_to_int
| Parameters: |
|
|---|
string_to_real¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
string_to_real(line: str, default_: typing.SupportsFloat | typing.SupportsIndex, err_flag: bool, value: typing.SupportsFloat | typing.SupportsIndex, err_print_flag: bool | None = None) -> None
Wrapper for Fortran routine string_to_real
| Parameters: |
|
|---|
string_trim¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
string_trim(in_string: str, out_string: str, word_len: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine string_trim
| Parameters: |
|
|---|
string_trim2¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
string_trim2(in_str: str, delimitors: str, out_str: str, ix_word: typing.SupportsInt | typing.SupportsIndex, delim: str, ix_next: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine string_trim2
| Parameters: |
|
|---|
suggest_lmdif¶
Fortran source: sim_utils/optimizers/lmdif_mod.f90
suggest_lmdif(XV: pybmad._pybmad.RealArray1D, FV: pybmad._pybmad.RealArray1D, eps: typing.SupportsFloat | typing.SupportsIndex, itermx: typing.SupportsInt | typing.SupportsIndex, reset_flag: bool | None = None) -> bool
subroutine suggest_lmdif (xv, fv, eps, itermx, at_end, reset_flag)
Reverse communication subroutine. It suggests values for your input variables based on the previous value of your merit function.
Use initial_lmdif to initialize internal variables
| Parameters: |
|
|---|
| Returns: |
|
|---|
super_bicubic_coef¶
Fortran source: sim_utils/math/super_recipes_mod.f90
super_bicubic_coef(y: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"], y1: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"], y2: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"], y12: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"], d1: typing.SupportsFloat | typing.SupportsIndex, d2: typing.SupportsFloat | typing.SupportsIndex) -> typing.Annotated[list[typing.Annotated[list[float], "FixedSize(4)"]], "FixedSize(4)"]
Subroutine super_bicubic_coef(y, y1, y2, y12, d1, d2, c)
Routine to compute coefficients for bicubic interpolation. This is from NR bcucof.
| Parameters: |
|
|---|
| Returns: |
|
|---|
super_bicubic_interpolation¶
Fortran source: sim_utils/math/super_recipes_mod.f90
super_bicubic_interpolation(y: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"], y1: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"], y2: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"], y12: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(4)"], x1l: typing.SupportsFloat | typing.SupportsIndex, x1u: typing.SupportsFloat | typing.SupportsIndex, x2l: typing.SupportsFloat | typing.SupportsIndex, x2u: typing.SupportsFloat | typing.SupportsIndex, x1: typing.SupportsFloat | typing.SupportsIndex, x2: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.SuperBicubicInterpolation
Subroutine super_bicubic_interpolation(y, y1, y2, y12, x1l, x1u, x2l, x2u, x1, x2, ansy, ansy1, ansy2)
Routine to do bicubic interpolation. This is from NR bcuint.
Note! The four grid points are arrayed in counter-clockwise order beginning from the lower left. So, for example, y = [y_ll, y_lu, y_uu, y_ul] where "l" = lower, "u" = upper index.
| Parameters: |
|
|---|
| Returns: |
|
|---|
super_polint¶
Fortran source: sim_utils/math/super_recipes_mod.f90
super_polint(xa: pybmad._pybmad.RealArray1D, ya: pybmad._pybmad.RealArray1D, x: typing.SupportsFloat | typing.SupportsIndex) -> pybmad._pybmad.SuperPolint
Function super_polint (xa, ya, x, y, dy)
This is essentially polint from Numerical Recipes.
| Parameters: |
|
|---|
| Returns: |
|
|---|
super_poly¶
Fortran source: sim_utils/math/super_recipes_mod.f90
super_poly(x: typing.SupportsFloat | typing.SupportsIndex, coeffs: pybmad._pybmad.RealArray1D) -> float
Function super_poly (x, coef) result (value)
Routine to compute Sum: coef(i)*x^i
| Parameters: |
|
|---|
| Returns: |
|
|---|
super_sobseq¶
Fortran source: sim_utils/math/random_mod.f90
super_sobseq(x: pybmad._pybmad.RealArray1D, ran_state: pybmad._pybmad.RandomStateStruct | None = None) -> None
Subroutine super_sobseq (x, ran_state)
Routine patterened after sobseq in Numerical Recipes. Difference is that this version has an argument for the internal state.
| Parameters: |
|
|---|
super_sort¶
Fortran source: sim_utils/math/super_recipes_mod.f90
super_sort(arr: pybmad._pybmad.IntArray1D) -> None
Subroutine super_sort(arr)
Routine to sort an integer array in place. This is the NR routine sort modified to sort integers.
| Parameters: |
|
|---|
system_command¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
system_command(line: str) -> bool
Wrapper for Fortran routine system_command
| Parameters: |
|
|---|
| Returns: |
|
|---|
test_xgelbd¶
Fortran source: sim_utils/special_functions/elliptic_integral_mod.f90
test_xgelbd() -> None
Wrapper for Fortran routine test_xgelbd
to_str¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
to_str(num: typing.SupportsFloat | typing.SupportsIndex, string: str, max_signif: typing.SupportsInt | typing.SupportsIndex | None = None) -> None
no longer exists subroutine test_tune_tracker_lock (tracker_locked) implicit none logical tracker_locked(2) end subroutine
tricubic_cmplx_eval¶
Fortran source: sim_utils/math/cubic_interpolation_mod.f90
tricubic_cmplx_eval(x_norm: typing.SupportsFloat | typing.SupportsIndex, y_norm: typing.SupportsFloat | typing.SupportsIndex, z_norm: typing.SupportsFloat | typing.SupportsIndex, tri_coef: pybmad._pybmad.TricubicCmplxCoefStruct) -> pybmad._pybmad.TricubicCmplxEval
Function tricubic_cmplx_eval (x_norm, y_norm, z_norm, tri_coef, df_dx, df_dy, df_dz) result (f_val)
Routine to evaluate a tricubic interpolating complex function.
Use the routine tricubic_interpolation_cmplx_coefs to generate tri_coef.
Note: In the equations below, the eight points of the grid box being interpolated range from (x0, y0, z0) to (x0+dx, y0+dy, z0+dz).
| Parameters: |
|
|---|
| Returns: |
|
|---|
type_this_file¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
type_this_file(filename: str) -> None
Wrapper for Fortran routine type_this_file
| Parameters: |
|
|---|
upcase_string¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
upcase_string(string: str) -> None
Wrapper for Fortran routine upcase_string
| Parameters: |
|
|---|
virtual_memory_usage¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
virtual_memory_usage(usage: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine virtual_memory_usage
| Parameters: |
|
|---|
w_mat_to_axis_angle¶
Fortran source: sim_utils/math/rotation_3d_mod.f90
w_mat_to_axis_angle(w_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]], "FixedSize(3)"]) -> pybmad._pybmad.WMatToAxisAngle
Subroutine w_mat_to_axis_angle (w_mat, axis, angle)
Routine to find the rotation axis and rotation angle corresponding to a given 3D rotation matrix.
The rotation angle is chosen in the range [0, pi].
| Parameters: |
|
|---|
| Returns: |
|
|---|
w_mat_to_quat¶
Fortran source: sim_utils/math/rotation_3d_mod.f90
w_mat_to_quat(w_mat: typing.Annotated[collections.abc.Sequence[typing.Annotated[collections.abc.Sequence[typing.SupportsFloat | typing.SupportsIndex], "FixedSize(3)"]], "FixedSize(3)"]) -> typing.Annotated[list[float], "FixedSize(4)"]
Function w_mat_to_quat (w_mat) result (quat)
Routine to find the quaternion corresponding to a given 3D rotation matrix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
word_len¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
word_len(wording: str, wlen: typing.SupportsInt | typing.SupportsIndex) -> None
Wrapper for Fortran routine word_len
| Parameters: |
|
|---|
word_read¶
Fortran source: sim_utils/interfaces/sim_utils_interface.f90
word_read(in_str: str, delim_list: str, word: str, ix_word: typing.SupportsInt | typing.SupportsIndex, delim: str, delim_found: bool, out_str: str, ignore_interior: bool | None = None) -> None
Wrapper for Fortran routine word_read
| Parameters: |
|
|---|
x0_radiation_length¶
Fortran source: sim_utils/interfaces/particle_species_mod.f90
x0_radiation_length(species: typing.SupportsInt | typing.SupportsIndex) -> float
Function x0_radiation_length(species) result (x0)
Routine to return the X0 raidation length for atomes.
| Parameters: |
|
|---|
| Returns: |
|
|---|
zig_table_init¶
Fortran source: sim_utils/math/random_mod.f90
zig_table_init() -> None
Subroutine zig_table_init ()
Private routine to initialize the Ziggurat lookup tables on first use. Based on Marsaglia & Tsang (2000), "The Ziggurat Method for Generating Random Variables", Journal of Statistical Software 5(8).