Skip to content

[bug] Single element targets with multiple interaction potentials were defaulting to an interaction index of 0 #337

Description

@drobnyjt

Description
Single element targets with multiple interaction potentials were defaulting to an interaction index of 0

To Reproduce

    options = {
        'name': 'input_file',
        'track_trajectories': False, # whether to track trajectories for plotting; memory intensive
        'track_recoils': True, # whether to track recoils; must enable for sputtering
        'track_recoil_trajectories': False, # whether to track recoil trajectories for plotting
        'track_displacements': False, # whether to track collisions with T > Ed for each species
        'track_energy_losses': False, # whether to track detailed collision energies; memory intensive
        'write_buffer_size': 8192, # how big the buffer is for file writing
        'weak_collision_order': 0, # weak collisions at radii (k + 1)*r; enable only when required
        'suppress_deep_recoils': False, # suppress recoils too deep to ever sputter
        'high_energy_free_flight_paths': False, # SRIM-style high energy free flight distances; use with caution
        'num_threads': 4, # number of threads to run in parallel
        'num_chunks': 10, # code will write to file every nth chunk; for very large simulations, increase num_chunks
        'electronic_stopping_mode': 'LOW_ENERGY_LOCAL',
        'mean_free_path_model': 'LIQUID', # liquid is amorphous (constant mean free path); gas is exponentially-distributed mean free paths
        'interaction_potential': [['ZBL', 'ZBL'],
                                  ['ZBL', pot]],
        'scattering_integral': [
            [{'GAUSS_MEHLER': {'n_points': 9}}, {'GAUSS_MEHLER': {'n_points': 9}}],
            [{'GAUSS_MEHLER': {'n_points': 9}}, {'GAUSS_MEHLER': {'n_points': 9}}],
        ],

        'root_finder': [
            ["DEFAULTNEWTON", "DEFAULTNEWTON"],
            ["DEFAULTNEWTON", cpr]
        ],
        'seed': 0 # if <0, will generate a seed from thread-local PRNG; if >0, will be used as seed to PRNG
    }

Expected behavior
W-W in this simulation should be simulated with the potential specified with pot; however, in input.rs, it is defaulted to ZBL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions