| 1 |
m2n::PtrM2N M2NConfiguration::getM2N(const std::string &acceptor, const std::string &connector) |
| 2 |
{ |
| 3 |
using std::get; |
| 4 |
for (M2NTuple &tuple : _m2ns) { |
| 5 |
if ((get<1>(tuple) == acceptor) && (get<4>(tuple) == connector)) { |
| 6 |
return get<0>(tuple); |
| 7 |
} else if ((get<4>(tuple) == acceptor) && (get<1>(tuple) == connector)) { |
| 8 |
return get<0>(tuple); |
| 9 |
} |
| 10 |
} |
| 11 |
PRECICE_ERROR("There is no m2n communication configured between participants \"" + acceptor + "\" and \"" + connector + "\". Please add an appropriate \"<m2n />\" tag."); |
| 12 |
} |