MPI: initial worker

This commit is contained in:
2023-10-29 20:50:54 -03:00
parent 869b93bab0
commit 6ac10a6b9b
2 changed files with 53 additions and 1 deletions

View File

@@ -7,4 +7,22 @@
* *
* Copyright (c) 2023 jun <https://git.firmwarejun.net/jun/MolecularDynamics2> * Copyright (c) 2023 jun <https://git.firmwarejun.net/jun/MolecularDynamics2>
* *
*/ */
#include <vector>
#include "Space.hpp"
class MolecularDynamics {
public:
explicit MolecularDynamics();
MolecularDynamics(double lattice, int numberOfCells, double temperature);
private:
double m_lattice;
int m_numberOfCells;
double m_temperature;
Space m_space;
std::vector<Atom> m_atoms;
};

34
src/md/mpi/Worker.hpp Normal file
View File

@@ -0,0 +1,34 @@
/**
* @file Worker.hpp
* @author Jun <jun@firmwarejun.net>
* @brief Worker declarations
* @version 0.1
* @date 2023-10-06
*
* Copyright (c) 2023 jun <https://git.firmwarejun.net/jun/MolecularDynamics2>
*
*/
#pragma once
#include <boost/mpi.hpp>
class Worker {
public:
Worker(boost::mpi::communicator &comm) : m_comm(comm) {}
/**
* @brief Main worker loop
*
*/
void work();
private:
boost::mpi::communicator &m_comm;
/**
* @brief Compute forces between atoms
*
*/
void computeForces();
};