← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2849: Added syncSizesOfContainers to forceContainer::reset() for the case of not using NewtonIntegrator...

 

------------------------------------------------------------
revno: 2849
fixes bug(s): https://launchpad.net/bugs/739429
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: yade
timestamp: Tue 2011-05-03 15:18:48 +0200
message:
  Added syncSizesOfContainers to forceContainer::reset() for the case of not using NewtonIntegrator in scripts
modified:
  core/ForceContainer.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 'core/ForceContainer.hpp'
--- core/ForceContainer.hpp	2011-04-03 16:49:58 +0000
+++ core/ForceContainer.hpp	2011-05-03 13:18:48 +0000
@@ -152,6 +152,7 @@
 		/*! Reset all data, also reset summary forces/torques and mark the container clean. */
 		// perhaps should be private and friend Scene or whatever the only caller should be
 		void reset(long iter){
+			syncSizesOfContainers();
 			for(int thread=0; thread<nThreads; thread++){
 				memset(&_forceData [thread][0],0,sizeof(Vector3r)*sizeOfThreads[thread]);
 				memset(&_torqueData[thread][0],0,sizeof(Vector3r)*sizeOfThreads[thread]);