NeutralParticleReservoir Derived Type

type, public :: NeutralParticleReservoir

Neutral Particle Reservoir

References

Li, Kim-Hung (4 December 1994). "Reservoir-Sampling Algorithms of Time Complexity O(n(1+log(N/n)))". ACM Transactions on Mathematical Software. 20 (4): 481–493. doi:10.1145/198429.198435


Inherits

type~~neutralparticlereservoir~~InheritsGraph type~neutralparticlereservoir NeutralParticleReservoir type~neutralparticle NeutralParticle type~neutralparticlereservoir->type~neutralparticle R

Inherited by

type~~neutralparticlereservoir~~InheritedByGraph type~neutralparticlereservoir NeutralParticleReservoir type~neutralpopulation NeutralPopulation type~neutralpopulation->type~neutralparticlereservoir res type~spatialspectra SpatialSpectra type~spatialspectra->type~neutralparticlereservoir dcx, halo, fida, pfida type~neutrals Neutrals type~neutrals->type~neutralpopulation full, half, third, dcx, halo

Contents


Components

TypeVisibilityAttributesNameInitial
integer(kind=Int32), public :: n =0

Number of neutral particles seen by the reservoir

integer(kind=Int32), public :: i =0

Number of the next particle that will be stored in the reservoir

integer(kind=Int32), public :: k =0

Size of the reservoir

real(kind=Float64), public :: W =0.d0

Sampling weight

type(NeutralParticle), public, dimension(reservoir_size):: R

Neutral Particle Reservoir


Source Code

type NeutralParticleReservoir
    !+ Neutral Particle Reservoir
    !+###References
    !+ Li, Kim-Hung (4 December 1994). "Reservoir-Sampling Algorithms of Time
    !+ Complexity O(n(1+log(N/n)))". ACM Transactions on Mathematical Software. 20
    !+ (4): 481–493. doi:10.1145/198429.198435
    integer(Int32) :: n = 0
        !+ Number of neutral particles seen by the reservoir
    integer(Int32) :: i = 0
        !+ Number of the next particle that will be stored in the reservoir
    integer(Int32) :: k = 0
        !+ Size of the reservoir
    real(Float64)  :: W = 0.d0
        !+ Sampling weight
    type(NeutralParticle), dimension(reservoir_size) :: R
        !+ Neutral Particle Reservoir
end type NeutralParticleReservoir