Documentation for module parallel_rng_types

Parallel (pseudo)random number generator (RNG) for multiple streams and substreams of random numbers.

source: parallel_rng_types.F
Loading...

public Types:

rng_stream_type
...
rng_stream_p_type
...

Generic procedures:

next_random_number
random_numbers

public Subroutines/Functions:

...
...
...
...
...
SUBROUTINE
init_rng
...
FUNCTION
REAL(dp)
next_rng_seed (seed)
...
...
...
...
...
...

Parameters:

INTEGER
:: gaussian = 1
INTEGER
:: rng_record_length = 433
INTEGER
:: uniform = 2

public Types:

TYPE :: rng_stream_p_type

...


POINTER :: stream ...

TYPE :: rng_stream_type

...


CHARACTER(40)
:: name ...
INTEGER
:: distribution_type ...
REAL(dp),
DIMENSION(3,2) :: bg ...
REAL(dp),
DIMENSION(3,2) :: cg ...
REAL(dp),
DIMENSION(3,2) :: ig ...
LOGICAL
:: antithetic ...
LOGICAL
:: extended_precision ...
REAL(dp)
:: buffer ...
LOGICAL
:: buffer_filled ...


Generic procedure next_random_number

...

POINTER
:: rng_stream × ×
INTEGER,
INTENT(in)
:: low ×
INTEGER,
INTENT(in)
:: high ×
REAL(dp),
INTENT(in),
OPTIONAL
:: variance ×

Generic procedure random_numbers

...

REAL(dp)
:: array(:) ×
REAL(dp)
:: array(:,:) ×
REAL(dp)
:: array(:,:,:) ×
POINTER
:: rng_stream × × ×

SUBROUTINEcheck_rng(output_unit, ionode)

...

Arguments:
INTEGER,
INTENT(in)
:: output_unit ...
LOGICAL,
INTENT(in)
:: ionode ...

SUBROUTINEcreate_rng_stream(rng_stream, name, last_rng_stream, distribution_type, seed, antithetic, extended_precision)

...

Arguments:
POINTER
:: rng_stream ...
CHARACTER(*),
INTENT(in)
:: name ...
OPTIONAL, POINTER
:: last_rng_stream ...
INTEGER,
INTENT(in),
OPTIONAL
:: distribution_type ...
REAL(dp),
INTENT(in),
OPTIONAL
:: seed(3,2) ...
LOGICAL,
INTENT(in),
OPTIONAL
:: antithetic ...
LOGICAL,
INTENT(in),
OPTIONAL
:: extended_precision ...

SUBROUTINEdelete_rng_stream(rng_stream)

...

Arguments:
POINTER
:: rng_stream ...

SUBROUTINEdump_rng_stream(rng_stream, rng_record)

...

Arguments:
POINTER
:: rng_stream ...
CHARACTER(rng_record_length),
INTENT(out)
:: rng_record ...

SUBROUTINEget_rng_stream(rng_stream, name, distribution_type, bg, cg, ig, antithetic, extended_precision, buffer, buffer_filled)

...

Arguments:
POINTER
:: rng_stream ...
CHARACTER(*),
INTENT(out),
OPTIONAL
:: name ...
INTEGER,
INTENT(out),
OPTIONAL
:: distribution_type ...
REAL(dp),
INTENT(out),
OPTIONAL
:: bg(3,2) ...
REAL(dp),
INTENT(out),
OPTIONAL
:: cg(3,2) ...
REAL(dp),
INTENT(out),
OPTIONAL
:: ig(3,2) ...
LOGICAL,
INTENT(out),
OPTIONAL
:: antithetic ...
LOGICAL,
INTENT(out),
OPTIONAL
:: extended_precision ...
REAL(dp),
INTENT(out),
OPTIONAL
:: buffer ...
LOGICAL,
INTENT(out),
OPTIONAL
:: buffer_filled ...

SUBROUTINEinit_rng()

...

FUNCTIONnext_rng_seed(seed)

...

Return Value ::
REAL(dp)
Arguments:
REAL(dp),
INTENT(in),
OPTIONAL
:: seed(3,2) ...

SUBROUTINEread_rng_stream(rng_stream, rng_record)

...

Arguments:
POINTER
:: rng_stream ...
CHARACTER(rng_record_length),
INTENT(in)
:: rng_record ...

SUBROUTINEreset_to_next_rng_substream(rng_stream)

...

Arguments:
POINTER
:: rng_stream ...

SUBROUTINEset_rng_stream(rng_stream, name, distribution_type, bg, cg, ig, seed, antithetic, extended_precision, buffer, buffer_filled)

...

Arguments:
POINTER
:: rng_stream ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: name ...
INTEGER,
INTENT(in),
OPTIONAL
:: distribution_type ...
REAL(dp),
INTENT(in),
OPTIONAL
:: bg(3,2) ...
REAL(dp),
INTENT(in),
OPTIONAL
:: cg(3,2) ...
REAL(dp),
INTENT(in),
OPTIONAL
:: ig(3,2) ...
REAL(dp),
INTENT(in),
OPTIONAL
:: seed(3,2) ...
LOGICAL,
INTENT(in),
OPTIONAL
:: antithetic ...
LOGICAL,
INTENT(in),
OPTIONAL
:: extended_precision ...
REAL(dp),
INTENT(in),
OPTIONAL
:: buffer ...
LOGICAL,
INTENT(in),
OPTIONAL
:: buffer_filled ...

SUBROUTINEwrite_rng_matrices(output_unit)

...

Arguments:
INTEGER,
INTENT(in)
:: output_unit ...

SUBROUTINEwrite_rng_stream(rng_stream, output_unit, write_all)

...

Arguments:
POINTER
:: rng_stream ...
INTEGER,
INTENT(in)
:: output_unit ...
LOGICAL,
INTENT(in),
OPTIONAL
:: write_all ...

FUNCTIONnext_integer_random_number(rng_stream, low, high)

...

Return Value ::
INTEGER
Arguments:
POINTER
:: rng_stream ...
INTEGER,
INTENT(in)
:: low ...
INTEGER,
INTENT(in)
:: high ...

FUNCTIONnext_real_random_number(rng_stream, variance)

...

Return Value ::
REAL(dp)
Arguments:
POINTER
:: rng_stream ...
REAL(dp),
INTENT(in),
OPTIONAL
:: variance ...

SUBROUTINErandom_numbers_1(array, rng_stream)

...

Arguments:
REAL(dp)
:: array(:) ...
POINTER
:: rng_stream ...

SUBROUTINErandom_numbers_2(array, rng_stream)

...

Arguments:
REAL(dp)
:: array(:,:) ...
POINTER
:: rng_stream ...

SUBROUTINErandom_numbers_3(array, rng_stream)

...

Arguments:
REAL(dp)
:: array(:,:,:) ...
POINTER
:: rng_stream ...