[ODE] ODE Change

Andrew Aye AndrewA at terminalreality.com
Wed Feb 25 10:14:09 MST 2004


Fixes some issues that arrise when disabled/enabled pairs interact.  Bug was
probably introduced when the variable inits were commented out ( which is
the other possible fix - just make sure the matrices are init to 0 - this
other way keeps with the intent to write to the variable as few times as
possible ).

 - Andrew


stepfast.cpp

dInternalStepFast

Line390
Original:
	if (body[0])
		Multiply2_sym_p8p (A, JinvM, Jinfo.J1l, m, mskip);
	if (body[1])
		MultiplyAdd2_sym_p8p (A, JinvM + 8 * m, Jinfo.J2l, m,
mskip);

Change:
	if (body[0]) {
		Multiply2_sym_p8p (A, JinvM, Jinfo.J1l, m, mskip);
		if (body[1])
			MultiplyAdd2_sym_p8p (A, JinvM + 8 * m, Jinfo.J2l,
m, mskip);
	} else {
		if (body[1])
			Multiply2_sym_p8p (A, JinvM + 8 * m, Jinfo.J2l, m,
mskip);
	}


Line 420:
Original:
	if (body[0])
		Multiply0_p81 (rhs, Jinfo.J1l, tmp1, m);
	if (body[1])
		MultiplyAdd0_p81 (rhs, Jinfo.J2l, tmp1 + 8, m);

Change:
	if (body[0]) {
		Multiply0_p81 (rhs, Jinfo.J1l, tmp1, m);
		if (body[1])
			MultiplyAdd0_p81 (rhs, Jinfo.J2l, tmp1 + 8, m);
	} else {
		if (body[1])
			Multiply0_p81 (rhs, Jinfo.J2l, tmp1 + 8, m);
	};

	


More information about the ODE mailing list