Last commit for atom.h: 8a155c1522c0818d43b6bae4cc5806ea41f88793

Parallel md code using OpenMP and MPI

Ramses van Zon [2016-09-29 14:34:01]
Parallel md code using OpenMP and MPI
/* atom.h - defines the atom_t type and its mpi type */
#ifndef ATOMH
#define ATOMH
#include "mpi.h"

typedef struct atom_t {
    double    rx, ry, rz; /**< position */
    double    px, py, pz; /**< momentum */
    double    fx, fy, fz; /**< force */
    long long index;      /**< mostly for debugging: which particle are you? */
    int       cx, cy, cz; /**< cell indices in each directorion */
    int       c;          /**< super-cell-index (mapping from c{x,y,z} varies)*/
} atom_t;

/**
 * MPI data type to exchange atoms between processes
 */
extern MPI_Datatype MPI_ATOM;


/**
 * Function to create and commit the MPI data type MPI_ATOM, which
 * must be done once before use. Call this function just after your
 * MPI_Init() call.
 */
MPI_Datatype define_MPI_ATOM();

#endif
ViewGit