reset particle properties only if initVal == 0

else old value may still be required;
potentially, an extra flag in registerParticleProperty to indicate
resetting may be a better approach
This commit is contained in:
danielque
2020-09-08 11:12:55 +02:00
parent b06bb1f98a
commit 75ffbe02ae

View File

@ -829,7 +829,7 @@ bool cfdemCloud::reAllocArrays()
++iter ++iter
) )
{ {
if (iter().size > 0) { if (iter().size > 0 && iter().initVal == 0.0) {
if ((*(iter().ti)) == typeid(int**)) { if ((*(iter().ti)) == typeid(int**)) {
int**& property = iter().ref<int**>(); int**& property = iter().ref<int**>();
for (int index=0; index<numberOfParticles(); ++index) { for (int index=0; index<numberOfParticles(); ++index) {