(git:c5411e0)
|
Public Member Functions | |
procedure, pass(self) | fill_1 (self, array) |
Fill entity array with random numbers from the RNG stream rng_stream. | |
procedure, pass(self) | fill_2 (self, array) |
... | |
procedure, pass(self) | fill_3 (self, array) |
... | |
GENERIC, public | fill fill_1, fill_2, fill_3 |
procedure, pass(self) | next_int (self, low, high) |
Get the next integer random number between low and high from the stream. | |
procedure, pass(self) | next_real (self, variance) |
Get the next real random number from the stream rng_stream. | |
GENERIC, public | next next_int, next_real |
procedure, pass, public | dump (self, rng_record) |
Dump a RNG stream as a record given as an internal file (string). | |
procedure, pass, public | write (self, output_unit, write_all) |
... | |
procedure, pass, public | advance (self, e, c) |
Advance the state by n steps, i.e. jump n steps forward, if n > 0, or backward if n < 0. | |
procedure, pass, public | set (self, name, distribution_type, bg, cg, ig, seed, antithetic, extended_precision, buffer, buffer_filled) |
Set the components of a RNG stream. | |
procedure, pass, public | get (self, name, distribution_type, bg, cg, ig, antithetic, extended_precision, buffer, buffer_filled) |
Get the components of a RNG stream. | |
procedure, pass, public | reset (self) |
Reset a random number stream to its initial state. | |
procedure, pass, public | reset_to_substream (self) |
Reset a random number stream to the beginning of its current substream. | |
procedure, pass, public | reset_to_next_substream (self) |
Reset a random number stream to the beginning of its next substream. | |
procedure, pass, public | shuffle (self, arr) |
Shuffle an array of integers (using the Fisher-Yates shuffle) | |
type(rng_stream_type) function | rng_stream_constructor (name, last_rng_stream, distribution_type, seed, antithetic, extended_precision) |
Create a new RNG stream. | |
Data Fields | |
integer | distribution_type = UNIFORM |
real(kind=dp), dimension(3, 2) | bg = 0.0_dp |
real(kind=dp), dimension(3, 2) | cg = 0.0_dp |
real(kind=dp), dimension(3, 2) | ig = 0.0_dp |
logical | antithetic = .FALSE. |
logical | extended_precision = .FALSE. |
real(kind=dp) | buffer = 0.0_dp |
logical | buffer_filled = .FALSE. |
Definition at line 157 of file parallel_rng_types.F.
procedure, pass(self) parallel_rng_types::rng_stream_type::fill_1 | ( | class(rng_stream_type), intent(inout) | self, |
real(kind=dp), dimension(:), intent(out) | array | ||
) |
Fill entity array with random numbers from the RNG stream rng_stream.
self | ... |
array | ... |
Definition at line 171 of file parallel_rng_types.F.
procedure, pass(self) parallel_rng_types::rng_stream_type::fill_2 | ( | class(rng_stream_type), intent(inout) | self, |
real(kind=dp), dimension(:, :), intent(out) | array | ||
) |
procedure, pass(self) parallel_rng_types::rng_stream_type::fill_3 | ( | class(rng_stream_type), intent(inout) | self, |
real(kind=dp), dimension(:, :, :), intent(out) | array | ||
) |
GENERIC, public parallel_rng_types::rng_stream_type::fill |
Definition at line 174 of file parallel_rng_types.F.
procedure, pass(self) parallel_rng_types::rng_stream_type::next_int | ( | class(rng_stream_type), intent(inout) | self, |
integer, intent(in) | low, | ||
integer, intent(in) | high | ||
) |
Get the next integer random number between low and high from the stream.
self | ... |
low | ... |
high | ... |
Definition at line 176 of file parallel_rng_types.F.
procedure, pass(self) parallel_rng_types::rng_stream_type::next_real | ( | class(rng_stream_type), intent(inout) | self, |
real(kind=dp), intent(in), optional | variance | ||
) |
Get the next real random number from the stream rng_stream.
self | ... |
variance | variance of the Gaussian distribution (defaults to 1) |
Definition at line 177 of file parallel_rng_types.F.
GENERIC, public parallel_rng_types::rng_stream_type::next |
Definition at line 178 of file parallel_rng_types.F.
procedure, pass, public parallel_rng_types::rng_stream_type::dump | ( | class(rng_stream_type), intent(in) | self, |
character(len=rng_record_length), intent(out) | rng_record | ||
) |
Dump a RNG stream as a record given as an internal file (string).
self | ... |
rng_record | ... |
Definition at line 180 of file parallel_rng_types.F.
procedure, pass, public parallel_rng_types::rng_stream_type::write | ( | class(rng_stream_type), intent(in) | self, |
integer, intent(in) | output_unit, | ||
logical, intent(in), optional | write_all | ||
) |
...
self | ... |
output_unit | ... |
write_all | if .TRUE., then print all stream informations (the default is .FALSE.). |
Definition at line 181 of file parallel_rng_types.F.
procedure, pass, public parallel_rng_types::rng_stream_type::advance | ( | class(rng_stream_type), intent(inout) | self, |
integer, intent(in) | e, | ||
integer, intent(in) | c | ||
) |
Advance the state by n steps, i.e. jump n steps forward, if n > 0, or backward if n < 0.
self | ... |
e | IF e > 0, let n = 2**e + c, IF e < 0, let n = -2**(-e) + c, IF e = 0, let n = c |
c | ... |
Definition at line 182 of file parallel_rng_types.F.
procedure, pass, public parallel_rng_types::rng_stream_type::set | ( | class(rng_stream_type), intent(inout) | self, |
character(len=*), intent(in), optional | name, | ||
integer, intent(in), optional | distribution_type, | ||
real(kind=dp), dimension(3, 2), intent(in), optional | bg, | ||
real(kind=dp), dimension(3, 2), intent(in), optional | cg, | ||
real(kind=dp), dimension(3, 2), intent(in), optional | ig, | ||
real(kind=dp), dimension(3, 2), intent(in), optional | seed, | ||
logical, intent(in), optional | antithetic, | ||
logical, intent(in), optional | extended_precision, | ||
real(kind=dp), intent(in), optional | buffer, | ||
logical, intent(in), optional | buffer_filled | ||
) |
Set the components of a RNG stream.
self | ... |
name | ... |
distribution_type | ... |
bg | ... |
cg | ... |
ig | ... |
seed | ... |
antithetic | ... |
extended_precision | ... |
buffer | ... |
buffer_filled | ... |
Definition at line 183 of file parallel_rng_types.F.
procedure, pass, public parallel_rng_types::rng_stream_type::get | ( | class(rng_stream_type), intent(in) | self, |
character(len=rng_name_length), intent(out), optional | name, | ||
integer, intent(out), optional | distribution_type, | ||
real(kind=dp), dimension(3, 2), intent(out), optional | bg, | ||
real(kind=dp), dimension(3, 2), intent(out), optional | cg, | ||
real(kind=dp), dimension(3, 2), intent(out), optional | ig, | ||
logical, intent(out), optional | antithetic, | ||
logical, intent(out), optional | extended_precision, | ||
real(kind=dp), intent(out), optional | buffer, | ||
logical, intent(out), optional | buffer_filled | ||
) |
Get the components of a RNG stream.
self | ... |
name | ... |
distribution_type | ... |
bg | ... |
cg | ... |
ig | ... |
antithetic | ... |
extended_precision | ... |
buffer | ... |
buffer_filled | ... |
Definition at line 184 of file parallel_rng_types.F.
procedure, pass, public parallel_rng_types::rng_stream_type::reset | ( | class(rng_stream_type), intent(inout) | self | ) |
Reset a random number stream to its initial state.
self | ... |
Definition at line 185 of file parallel_rng_types.F.
procedure, pass, public parallel_rng_types::rng_stream_type::reset_to_substream | ( | class(rng_stream_type), intent(inout) | self | ) |
Reset a random number stream to the beginning of its current substream.
self | ... |
Definition at line 186 of file parallel_rng_types.F.
procedure, pass, public parallel_rng_types::rng_stream_type::reset_to_next_substream | ( | class(rng_stream_type), intent(inout) | self | ) |
Reset a random number stream to the beginning of its next substream.
self | ... |
Definition at line 187 of file parallel_rng_types.F.
procedure, pass, public parallel_rng_types::rng_stream_type::shuffle | ( | class(rng_stream_type), intent(inout) | self, |
integer, dimension(:), intent(inout) | arr | ||
) |
Shuffle an array of integers (using the Fisher-Yates shuffle)
self | ... |
arr | the integer array to be shuffled |
Definition at line 188 of file parallel_rng_types.F.
type(rng_stream_type) function parallel_rng_types::rng_stream_type::rng_stream_constructor | ( | character(len=*), intent(in) | name, |
type(rng_stream_type), intent(in), optional | last_rng_stream, | ||
integer, intent(in), optional | distribution_type, | ||
real(kind=dp), dimension(3, 2), intent(in), optional | seed, | ||
logical, intent(in), optional | antithetic, | ||
logical, intent(in), optional | extended_precision | ||
) |
Create a new RNG stream.
name | ... |
last_rng_stream | ... |
distribution_type | ... |
seed | ... |
antithetic | ... |
extended_precision | ... |
Definition at line 504 of file parallel_rng_types.F.
integer parallel_rng_types::rng_stream_type::distribution_type = UNIFORM |
Definition at line 162 of file parallel_rng_types.F.
real(kind=dp), dimension(3, 2) parallel_rng_types::rng_stream_type::bg = 0.0_dp |
Definition at line 164 of file parallel_rng_types.F.
real(kind=dp), dimension(3, 2) parallel_rng_types::rng_stream_type::cg = 0.0_dp |
Definition at line 164 of file parallel_rng_types.F.
real(kind=dp), dimension(3, 2) parallel_rng_types::rng_stream_type::ig = 0.0_dp |
Definition at line 164 of file parallel_rng_types.F.
logical parallel_rng_types::rng_stream_type::antithetic = .FALSE. |
Definition at line 165 of file parallel_rng_types.F.
logical parallel_rng_types::rng_stream_type::extended_precision = .FALSE. |
Definition at line 165 of file parallel_rng_types.F.
real(kind=dp) parallel_rng_types::rng_stream_type::buffer = 0.0_dp |
Definition at line 167 of file parallel_rng_types.F.
logical parallel_rng_types::rng_stream_type::buffer_filled = .FALSE. |
Definition at line 168 of file parallel_rng_types.F.