| 574 | } |
| 575 | |
| 576 | void fields_chunk::add_source(field_type ft, src_vol &&src) { |
| 577 | auto it = std::find_if(sources[ft].begin(), sources[ft].end(), |
| 578 | [&src](const src_vol &other) { return src_vol::combinable(src, other); }); |
| 579 | |
| 580 | if (it != sources[ft].end()) { |
| 581 | it->add_amplitudes_from(src); |
| 582 | return; |
| 583 | } |
| 584 | |
| 585 | sources[ft].push_back(std::move(src)); |
| 586 | } |
| 587 | |
| 588 | void fields_chunk::remove_sources() { |
| 589 | FOR_FIELD_TYPES(ft) { sources[ft].clear(); } |
no test coverage detected