spawn_criterium Function

public function spawn_criterium(idx) result(spawnInit)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: idx

Return Value logical


Contents

Source Code


Source Code

    function spawn_criterium(idx) result(spawnInit)
        ! makes something an initiator if the sign of spawns is sufficiently unique
        integer, intent(in) :: idx
        logical :: spawnInit

        real(dp) :: negSpawn(lenof_sign), posSpawn(lenof_sign)

        if (tLogAverageSpawns) then
            negSpawn = get_neg_spawns(idx)
            posSpawn = get_pos_spawns(idx)
            if (any((negSpawn + posSpawn) >= minInitSpawns)) then
                if (all(min(negSpawn, posSpawn) > eps)) then
                    spawnInit = all(max(negSpawn, posSpawn) / min(negSpawn, posSpawn) > spawnSgnThresh)
                else
                    spawnInit = .true.
                end if
            else
                spawnInit = .false.
            end if
        else
            spawnInit = .false.
        end if

    end function spawn_criterium