Cosmetic changes only.

This commit is contained in:
Karthik 2021-07-14 20:07:22 +02:00
parent b34078436a
commit 039b1c36ec

View File

@ -11,7 +11,7 @@ function ParticleDynamicalQuantities = solver(this, InitialPosition, InitialVelo
ParticleDynamicalQuantities(i,1:3) = InitialPosition;
ParticleDynamicalQuantities(i,4:6) = InitialVelocity;
rt = InitialPosition;
vt = InitialVelocity;
@ -23,7 +23,7 @@ function ParticleDynamicalQuantities = solver(this, InitialPosition, InitialVelo
ga2 = this.calculateTotalAcceleration(rt,vt) + g;
gv2 = vt .* this.TimeStep;
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;
gv3 = vt .* this.TimeStep;
@ -35,7 +35,6 @@ function ParticleDynamicalQuantities = solver(this, InitialPosition, InitialVelo
InitialPosition = InitialPosition + (gv1+2*(gv2+gv3)+gv4)./6;
InitialVelocity = InitialVelocity + this.TimeStep*(ga1+2*(ga2+ga3)+ga4)./6;
%Acceleration = (ga1+2*(ga2+ga3)+ ga4)./6;
end
end