[wip] add input validation for work_package in DHT_Wrapper and InterpolationModule

This commit is contained in:
Max Lübke 2024-12-20 10:12:19 +01:00
parent 554d501ed0
commit 2df3f9f34a
2 changed files with 9 additions and 0 deletions

View File

@ -133,6 +133,10 @@ void DHT_Wrapper::fillDHT(const WorkPackage &work_package) {
continue;
}
if (work_package.input[i][0] != 2) {
continue;
}
// check if calcite or dolomite is absent and present, resp.n and vice
// versa in input/output. If this is the case -> Do not write to DHT!
// HACK: hardcoded, should be fixed!

View File

@ -76,6 +76,11 @@ void InterpolationModule::tryInterpolation(WorkPackage &work_package) {
const auto dht_results = this->dht_instance.getDHTResults();
for (int wp_i = 0; wp_i < work_package.size; wp_i++) {
if (work_package.input[wp_i][0] != 2) {
interp_result.status[wp_i] = INSUFFICIENT_DATA;
continue;
}
if (work_package.mapping[wp_i] != CHEM_PQC) {
interp_result.status[wp_i] = NOT_NEEDED;
continue;