| 89 | } |
| 90 | |
| 91 | std::map<int, int> LocationHelper::adaptLocationIndex(SimulationParameters& parameters, int fromLocationIndex, int offset) |
| 92 | { |
| 93 | std::map<int, int> result; |
| 94 | result.emplace(0, 0); |
| 95 | for (int i = 0; i < parameters.numZones; ++i) { |
| 96 | auto& zone = parameters.zone[i]; |
| 97 | if (zone.locationIndex >= fromLocationIndex) { |
| 98 | result.emplace(zone.locationIndex, zone.locationIndex + offset); |
| 99 | zone.locationIndex += offset; |
| 100 | } else { |
| 101 | result.emplace(zone.locationIndex, zone.locationIndex); |
| 102 | } |
| 103 | } |
| 104 | for (int i = 0; i < parameters.numRadiationSources; ++i) { |
| 105 | auto& source = parameters.radiationSource[i]; |
| 106 | if (source.locationIndex >= fromLocationIndex) { |
| 107 | result.emplace(source.locationIndex, source.locationIndex + offset); |
| 108 | source.locationIndex += offset; |
| 109 | } else { |
| 110 | result.emplace(source.locationIndex, source.locationIndex); |
| 111 | } |
| 112 | } |
| 113 | return result; |
| 114 | } |
| 115 | |
| 116 | std::string LocationHelper::generateZoneName(SimulationParameters& parameters) |
| 117 | { |
nothing calls this directly
no outgoing calls
no test coverage detected