From 58849bac281f3d60ca3200038c47007e1ae845a8 Mon Sep 17 00:00:00 2001 From: emile Date: Mon, 15 Oct 2018 15:19:52 +0200 Subject: The size of the stars is now proportional to its mass --- forces/forces.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'forces') diff --git a/forces/forces.go b/forces/forces.go index 4589246..e3f822d 100644 --- a/forces/forces.go +++ b/forces/forces.go @@ -105,8 +105,6 @@ func CalcAllForces(starSlice []structs.Star, threads int) []structs.Star { localRangeStart := i * localRangeLen localRangeEnd := (i * localRangeLen) + localRangeLen - // fmt.Printf("starting worker nr. %d, processing %d stars\n", i, localRangeEnd-localRangeStart) - // calculate the forces for all the stars in the given slice in the given range and return them using the // given channel go forcesThread(starSlice, localRangeStart, localRangeEnd, channel) @@ -164,7 +162,7 @@ func NextTimestep(starSlice []structs.Star, deltat int) []structs.Star { newStar := structs.Star{ C: structs.Coord{X: newX, Y: newY, Z: newZ}, F: structs.Force{}, - Mass: 50000, + Mass: starSlice[index].Mass, } // append the new star to the newSlice -- cgit 1.4.1