Skip to content

Bad indexing of array mp[]. #114

@imckstewart

Description

@imckstewart

There are several places within photon() where the array mp of type gridPointData (not the most explanatory name I could have chosen!) is referenced in a way which would cause an error if more than one species was present. Each ith species has its mp which is dimensioned so as to hold N_photons x N_lines, where N_lines varies from species to species; but photon() has several loops over the total number of lines from all species, with loop variable iline, in which mp for the zeroth species is referenced with the array index iline+iphot*m[0].nline. This works only if the number of species is 1.

I note that this error trap was already present in version 1.3.1; the old indexing scheme being carried over without examination when the mp variable was introduced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions