Cosmetic changes only.
This commit is contained in:
parent
b34078436a
commit
039b1c36ec
@ -23,7 +23,7 @@ function ParticleDynamicalQuantities = solver(this, InitialPosition, InitialVelo
|
|||||||
ga2 = this.calculateTotalAcceleration(rt,vt) + g;
|
ga2 = this.calculateTotalAcceleration(rt,vt) + g;
|
||||||
gv2 = vt .* this.TimeStep;
|
gv2 = vt .* this.TimeStep;
|
||||||
rt = rt + 0.5 * gv2;
|
rt = rt + 0.5 * gv2;
|
||||||
vt = vt + 0.5 *ga2 .* this.TimeStep;
|
vt = vt + 0.5 * ga2 .* this.TimeStep;
|
||||||
|
|
||||||
ga3 = this.calculateTotalAcceleration(rt,vt) + g;
|
ga3 = this.calculateTotalAcceleration(rt,vt) + g;
|
||||||
gv3 = vt .* this.TimeStep;
|
gv3 = vt .* this.TimeStep;
|
||||||
@ -35,7 +35,6 @@ function ParticleDynamicalQuantities = solver(this, InitialPosition, InitialVelo
|
|||||||
|
|
||||||
InitialPosition = InitialPosition + (gv1+2*(gv2+gv3)+gv4)./6;
|
InitialPosition = InitialPosition + (gv1+2*(gv2+gv3)+gv4)./6;
|
||||||
InitialVelocity = InitialVelocity + this.TimeStep*(ga1+2*(ga2+ga3)+ga4)./6;
|
InitialVelocity = InitialVelocity + this.TimeStep*(ga1+2*(ga2+ga3)+ga4)./6;
|
||||||
%Acceleration = (ga1+2*(ga2+ga3)+ ga4)./6;
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user