God I hate CPP
This commit is contained in:
parent
7d37960439
commit
9f34807269
@ -23,14 +23,6 @@ void DLASystem::update() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DLASystem::clearParticles() {
|
|
||||||
// delete particles and the particle list
|
|
||||||
for (size_t i = 0; i < this->particleList.size(); i++) {
|
|
||||||
delete particleList[i];
|
|
||||||
}
|
|
||||||
particleList.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
// set the value of a grid cell for a particular position
|
// set the value of a grid cell for a particular position
|
||||||
// note the position has the initial particle at (0,0)
|
// note the position has the initial particle at (0,0)
|
||||||
// but this corresponds to the middle of the grid array ie grid[ halfGrid ][ halfGrid ]
|
// but this corresponds to the middle of the grid array ie grid[ halfGrid ][ halfGrid ]
|
||||||
@ -205,7 +197,7 @@ DLASystem::DLASystem(Config config)
|
|||||||
// destructor
|
// destructor
|
||||||
DLASystem::~DLASystem() {
|
DLASystem::~DLASystem() {
|
||||||
// delete the particles
|
// delete the particles
|
||||||
clearParticles();
|
particleList.clear();
|
||||||
|
|
||||||
if (csv_out.is_open()) {
|
if (csv_out.is_open()) {
|
||||||
csv_out.flush();
|
csv_out.flush();
|
||||||
|
|||||||
@ -31,9 +31,6 @@ private:
|
|||||||
// list of particles
|
// list of particles
|
||||||
std::vector<Particle *> particleList;
|
std::vector<Particle *> particleList;
|
||||||
|
|
||||||
// delete particles and clear the particle list
|
|
||||||
void clearParticles();
|
|
||||||
|
|
||||||
// size of cluster
|
// size of cluster
|
||||||
double clusterRadius;
|
double clusterRadius;
|
||||||
// these are related to the DLA algorithm
|
// these are related to the DLA algorithm
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user