[ODE] dxQuickStepper - fix

Remi Ricard remi.ricard at simlog.com
Thu May 10 06:17:04 MST 2007


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