Add Space class
The Space class handles the simulation space
This commit is contained in:
27
src/main.cpp
27
src/main.cpp
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user