yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10960
[Branch ~yade-pkg/yade/git-trunk] Rev 4018: Prevent adding liqVol-parameters into VTK-files
------------------------------------------------------------
revno: 4018
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Wed 2014-06-11 14:05:52 +0200
message:
Prevent adding liqVol-parameters into VTK-files
for the case, when "liquidcontrol" not enabled.
Fixes crashes in some cases.
modified:
pkg/dem/VTKRecorder.cpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/dem/VTKRecorder.cpp'
--- pkg/dem/VTKRecorder.cpp 2014-06-05 13:19:44 +0000
+++ pkg/dem/VTKRecorder.cpp 2014-06-11 12:05:52 +0000
@@ -479,10 +479,12 @@
spheresCoordNumbSPH->InsertNextValue(b->coordNumber());
#endif
#ifdef YADE_LIQMIGRATION
- spheresLiqVol->InsertNextValue(b->Vf);
- const Real tmpVolIter = liqVolIterBody(b);
- spheresLiqVolIter->InsertNextValue(tmpVolIter);
- spheresLiqVolTotal->InsertNextValue(tmpVolIter + b->Vf);
+ if (recActive[REC_LIQ]) {
+ spheresLiqVol->InsertNextValue(b->Vf);
+ const Real tmpVolIter = liqVolIterBody(b);
+ spheresLiqVolIter->InsertNextValue(tmpVolIter);
+ spheresLiqVolTotal->InsertNextValue(tmpVolIter + b->Vf);
+ }
#endif
if (recActive[REC_MATERIALID]) spheresMaterialId->InsertNextValue(b->material->id);
continue;
@@ -626,9 +628,11 @@
spheresUg->GetPointData()->AddArray(spheresCoordNumbSPH);
#endif
#ifdef YADE_LIQMIGRATION
- spheresUg->GetPointData()->AddArray(spheresLiqVol);
- spheresUg->GetPointData()->AddArray(spheresLiqVolIter);
- spheresUg->GetPointData()->AddArray(spheresLiqVolTotal);
+ if (recActive[REC_LIQ]) {
+ spheresUg->GetPointData()->AddArray(spheresLiqVol);
+ spheresUg->GetPointData()->AddArray(spheresLiqVolIter);
+ spheresUg->GetPointData()->AddArray(spheresLiqVolTotal);
+ }
#endif
if (recActive[REC_STRESS]){
spheresUg->GetPointData()->AddArray(spheresNormalStressVec);