Skip to content

Commit 46a27ae

Browse files
Update load_particle.hpp
1 parent b89a411 commit 46a27ae

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/io/load_particle.hpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,15 @@ std::vector<Particle> LoadParticlesFromFile(const std::string& filename)
2020
std::ifstream in(filename);
2121

2222
Particle temp;
23-
while (in >> temp.x >> temp.y >> temp.z >> temp.vx >> temp.vy >> temp.vz >> temp.m)
23+
// Match this to the file columns: x y z vx vy vz m type
24+
while (in >> temp.x >> temp.y >> temp.z >> temp.vx >> temp.vy >> temp.vz >> temp.m >> temp.type) {
25+
26+
temp.ax = 0;
27+
temp.ay = 0;
28+
temp.az = 0;
29+
2430
p.push_back(temp);
31+
}
2532

2633
return p;
2734
}

0 commit comments

Comments
 (0)