Add Space class

The Space class handles the simulation space
This commit is contained in:
jun
2023-08-06 20:30:39 -03:00
parent eb32e48140
commit 51b0def9e6
7 changed files with 314 additions and 25 deletions

View File

@@ -13,18 +13,35 @@
#include "md/Atom.hpp"
#include "md/AtomsGenerator.hpp"
#include "md/Space.hpp"
#include "md/System.hpp"
int main() {
std::cout << "kk eae men" << std::endl;
System system(0.001);
// TODO: get these from command line arguments
double lattice = 5.26;
int numberOfCells = 5;
double temperature = 300;
std::vector<Atom> atoms = generateFCCAtoms(5.26, 3, "Ar", 1);
initMaxwellBoltzmannVelocities(atoms, 300);
system.addAtom(std::move(atoms));
Space space(3 * 1.5);
system.printAtoms();
std::vector<Atom> atoms = generateFCCAtoms(lattice, numberOfCells, "Ar", 1);
initMaxwellBoltzmannVelocities(atoms, temperature);
std::cout << "Adding atoms to space..." << std::endl;
space.addAtom(atoms);
std::cout << "Setting box..." << std::endl;
space.setBox(lattice * numberOfCells, lattice * numberOfCells, lattice * numberOfCells);
std::cout << "Preparing space..." << std::endl;
space.prepareSpace();
std::cout << "Building cells..." << std::endl;
space.buildCells();
space.printCells();
return 0;
}