Skip to content

Commit 91916d7

Browse files
committed
Merge branch 'master' into modules_V
2 parents 5fe8cdb + f07f1c8 commit 91916d7

26 files changed

+2082
-1327
lines changed

src/Core/Algorithms/Legacy/Fields/Mapping/MapFieldDataFromNodeToElem.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ MapFieldDataFromNodeToElemT(const MapFieldDataFromNodeToElemAlgo* algo,
6464
VField *ifield = input->vfield();
6565
VField *ofield = output->vfield();
6666

67-
/// Make sure that the data vector has the proper length
67+
/// Make sure that the data vector has the same length
68+
ofield->resize_fdata();
69+
6870
VMesh* mesh = input->vmesh();
6971

7072
VMesh::Elem::array_type elems;
@@ -93,7 +95,6 @@ MapFieldDataFromNodeToElemT(const MapFieldDataFromNodeToElemAlgo* algo,
9395
val += tval;
9496
}
9597

96-
ofield->resize_fdata();
9798
val = static_cast<DATA>(val * static_cast<double>((1.0 / static_cast<double>(nsize))));
9899
ofield->set_value(val, *it);
99100
++it;
@@ -209,7 +210,9 @@ MapFieldDataFromNodeToElemT(const MapFieldDataFromNodeToElemAlgo* algo,
209210
algo->update_progress_max(c, sz);
210211
}
211212
}
212-
} else return false;
213+
}
214+
else
215+
return false;
213216

214217
return true;
215218
}

0 commit comments

Comments
 (0)