mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-16 12:54:50 +01:00
[wip] add input validation for work_package in DHT_Wrapper and InterpolationModule
This commit is contained in:
parent
894cc256b2
commit
912ab21802
@ -133,6 +133,10 @@ void DHT_Wrapper::fillDHT(const WorkPackage &work_package) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (work_package.input[i][0] != 2) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// check if calcite or dolomite is absent and present, resp.n and vice
|
// 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!
|
// versa in input/output. If this is the case -> Do not write to DHT!
|
||||||
// HACK: hardcoded, should be fixed!
|
// HACK: hardcoded, should be fixed!
|
||||||
|
|||||||
@ -76,6 +76,11 @@ void InterpolationModule::tryInterpolation(WorkPackage &work_package) {
|
|||||||
const auto dht_results = this->dht_instance.getDHTResults();
|
const auto dht_results = this->dht_instance.getDHTResults();
|
||||||
|
|
||||||
for (int wp_i = 0; wp_i < work_package.size; wp_i++) {
|
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) {
|
if (work_package.mapping[wp_i] != CHEM_PQC) {
|
||||||
interp_result.status[wp_i] = NOT_NEEDED;
|
interp_result.status[wp_i] = NOT_NEEDED;
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user