[ODE] dxQuickStepper - fix

Patrick Enoch Hendrix_ at gmx.net
Thu May 10 14:24:59 MST 2007


the POSITIONAL_CORRECTION feature has been removed since I last updated.

please ignore this thread.

Patrick

On 10. May 2007, at 15:17 Uhr, Remi Ricard wrote:

> Hi,
>> hi,
>>
>> this calculation appears to be true:
>>
>> 0*nan = nan
>>
>> somehow my compilers (CodeWarrior / XCode gcc ) do not optimize  
>> that  away (multiplication by zero).
>>
>>
>> since the clvel and cavel are not zeroed when  
>> POSITIONAL_CORRECTION  is not defined, the quickstepper needs to  
>> be changed:
>>
>>
>> 		// put v/h + invM*fe into tmp1
>> 		for (i=0; i<nb; i++)
>> 		{
>> 			dReal body_invMass = body[i]->invMass;
>> 			for (j=0; j<3; j++) tmp1[i*6+j] = body[i]->facc[j] *  
>> body_invMass +
>>                                                (body[i]->lvel[j] / 
>> * +0*body[i]->clvel[j]*/) * stepsize1;
>> 			dMULTIPLY0_331 (tmp1 + i*6 + 3,invI + i*12,body[i]->tacc);
>> 			for (j=0; j<3; j++) tmp1[i*6+3+j] += (body[i]->avel[j]/*+0*body 
>> [i]-  >cavel[j]*/) * stepsize1;
>> 		}
>>
>>
>> ... or bracket it with #ifdef's, or remove the multiplication   
>> completely.
>>
>
> Which revision of the file are you talking about. I can find this  
> in my quickstep.cpp file
>
> Remi



More information about the ODE mailing list