← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2408: 1. Added updating volume specimen variable in rpmState

 

------------------------------------------------------------
revno: 2408
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-08-19 11:20:37 +0200
message:
  1. Added updating volume specimen variable in rpmState
modified:
  pkg/dem/Engine/GlobalEngine/ParticleSizeDistrbutionRPMRecorder.cpp


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'pkg/dem/Engine/GlobalEngine/ParticleSizeDistrbutionRPMRecorder.cpp'
--- pkg/dem/Engine/GlobalEngine/ParticleSizeDistrbutionRPMRecorder.cpp	2010-08-19 09:12:52 +0000
+++ pkg/dem/Engine/GlobalEngine/ParticleSizeDistrbutionRPMRecorder.cpp	2010-08-19 09:20:37 +0000
@@ -13,6 +13,7 @@
 		if (!b) continue;
 		YADE_PTR_CAST<RpmState>(b->state)->specimenNumber = 0;
 		YADE_PTR_CAST<RpmState>(b->state)->specimenMass = 0;
+		YADE_PTR_CAST<RpmState>(b->state)->specimenVol = 0;
 		YADE_PTR_CAST<RpmState>(b->state)->specimenMaxDiam = 0;
 	}
 	
@@ -174,7 +175,7 @@
 		}
 	}
 	
-	//Update specimen masses
+	//Update specimen masses and volumes
 	FOREACH(const shared_ptr<Body>& b, *scene->bodies){
 		if (!b) continue;
 		const Sphere* sphere = dynamic_cast<Sphere*>(b->shape.get());
@@ -187,6 +188,7 @@
 						arrayIdentIds[i].maxDistanceBetweenSpheres=sphere->radius;
 					}
 					YADE_PTR_CAST<RpmState>(b->state)->specimenMaxDiam = arrayIdentIds[i].maxDistanceBetweenSpheres;		//Each particle will contain now the maximal diametr of the specimen, to which it belongs to
+					YADE_PTR_CAST<RpmState>(b->state)->specimenVol = arrayIdentIds[i].vol;		//Each particle will contain now the volume of the specimen, to which it belongs to
 					break;
 				}
 			}