forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13385 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
33fd65949f
commit
3a0aa84dc4
|
@ -48,6 +48,7 @@ class LAMMPS {
|
|||
|
||||
class Cuda *cuda; // CUDA accelerator class
|
||||
class KokkosLMP *kokkos; // KOKKOS accelerator class
|
||||
class AtomKokkos *atomKK; // KOKKOS version of Atom class
|
||||
|
||||
class CiteMe *citeme; // citation info
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ namespace LAMMPS_NS {
|
|||
#define MIN(A,B) ((A) < (B) ? (A) : (B))
|
||||
#define MAX(A,B) ((A) > (B) ? (A) : (B))
|
||||
|
||||
//class AtomKokkos;
|
||||
|
||||
class Pointers {
|
||||
public:
|
||||
Pointers(LAMMPS *ptr) :
|
||||
|
@ -55,7 +57,8 @@ class Pointers {
|
|||
world(ptr->world),
|
||||
infile(ptr->infile),
|
||||
screen(ptr->screen),
|
||||
logfile(ptr->logfile) {}
|
||||
logfile(ptr->logfile),
|
||||
atomKK(ptr->atomKK) {}
|
||||
virtual ~Pointers() {}
|
||||
|
||||
protected:
|
||||
|
@ -80,6 +83,8 @@ class Pointers {
|
|||
FILE *&infile;
|
||||
FILE *&screen;
|
||||
FILE *&logfile;
|
||||
|
||||
class AtomKokkos *&atomKK;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "domain.h"
|
||||
#include "comm.h"
|
||||
#include "special.h"
|
||||
#include "accelerator_kokkos.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
|
@ -112,9 +113,13 @@ void Replicate::command(int narg, char **arg)
|
|||
|
||||
// old = original atom class
|
||||
// atom = new replicated atom class
|
||||
// also set atomKK for Kokkos version of Atom class
|
||||
|
||||
Atom *old = atom;
|
||||
atom = new Atom(lmp);
|
||||
if (lmp->kokkos) atom = new AtomKokkos(lmp);
|
||||
else atom = new Atom(lmp);
|
||||
atomKK = (AtomKokkos*) atom;
|
||||
|
||||
atom->settings(old);
|
||||
atom->create_avec(old->atom_style,old->avec->nargcopy,old->avec->argcopy,0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue