about summary refs log tree commit diff
path: root/forces
diff options
context:
space:
mode:
authoremile <hanemile@protonmail.com>2018-10-15 15:19:52 +0200
committeremile <hanemile@protonmail.com>2018-10-15 15:19:52 +0200
commit58849bac281f3d60ca3200038c47007e1ae845a8 (patch)
tree0bd5c7c8655dcd285c04ca62823d4fda9cf3d5be /forces
parent95f9ab588b7840739fbd782653926a3a74e99ab4 (diff)
The size of the stars is now proportional to its mass
Diffstat (limited to 'forces')
-rw-r--r--forces/forces.go4
1 files changed, 1 insertions, 3 deletions
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