← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2889: Add mask-option to SpheresFactory

 

------------------------------------------------------------
revno: 2889
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: yade
timestamp: Tue 2011-07-19 08:28:58 +0200
message:
  Add mask-option to SpheresFactory
modified:
  pkg/dem/SpheresFactory.cpp
  pkg/dem/SpheresFactory.hpp


--
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/SpheresFactory.cpp'
--- pkg/dem/SpheresFactory.cpp	2011-04-20 13:10:23 +0000
+++ pkg/dem/SpheresFactory.cpp	2011-07-19 06:28:58 +0000
@@ -79,6 +79,7 @@
 		b->shape=sphere; 
 		b->state=state; 
 		b->material=material;
+		if (mask>0) {b->groupMask=mask;}
 		// insert particle in the simulation
 		scene->bodies->insert(b);
 		// increment total mass we've spit out

=== modified file 'pkg/dem/SpheresFactory.hpp'
--- pkg/dem/SpheresFactory.hpp	2011-04-20 13:10:23 +0000
+++ pkg/dem/SpheresFactory.hpp	2011-07-19 06:28:58 +0000
@@ -21,6 +21,7 @@
 		((Real,vAngle,NaN,,"Maximum angle by which the initial sphere velocity deviates from the normal."))
 		((Vector3r,normal,Vector3r(NaN,NaN,NaN),,"Spitting direction (and orientation of the region's geometry)."))
 		((int,materialId,-1,,"Shared material id to use for newly created spheres (can be negative to count from the end)"))
+		((int,mask,-1,,"groupMask to apply for newly created spheres "))
 		((Real,totalMass,0,,"Mass of spheres that was produced so far. |yupdate|"))
 		((Real,goalMass,0,,"Total mass that should be attained at the end of the current step. |yupdate|"))
 		((int,maxParticles,100,,"The number of particles at which to stop generating new ones (regardless of massFlowRate"))