git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10030 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -45,10 +45,10 @@ action pair_coul_dsf_gpu.cpp
|
||||
action pair_coul_dsf_gpu.h
|
||||
action pair_coul_long_gpu.cpp pair_coul_long.cpp
|
||||
action pair_coul_long_gpu.h pair_coul_long.cpp
|
||||
action pair_dipole_cut_gpu.cpp pair_dipole_cut.cpp
|
||||
action pair_dipole_cut_gpu.h pair_dipole_cut.cpp
|
||||
action pair_dipole_sf_gpu.cpp pair_dipole_sf.cpp
|
||||
action pair_dipole_sf_gpu.h pair_dipole_sf.cpp
|
||||
action pair_lj_cut_dipole_cut_gpu.cpp pair_lj_cut_dipole_cut.cpp
|
||||
action pair_lj_cut_dipole_cut_gpu.h pair_lj_cut_dipole_cut.cpp
|
||||
action pair_lj_sf_dipole_sf_gpu.cpp pair_lj_sf_dipole_sf.cpp
|
||||
action pair_lj_sf_dipole_sf_gpu.h pair_lj_sf_dipole_sf.cpp
|
||||
action pair_eam_alloy_gpu.cpp pair_eam.cpp
|
||||
action pair_eam_alloy_gpu.h pair_eam.cpp
|
||||
action pair_eam_fs_gpu.cpp pair_eam.cpp
|
||||
|
||||
17
src/GPU/pair_dipole_cut_gpu.cpp → src/GPU/pair_lj_cut_dipole_cut_gpu.cpp
Normal file → Executable file
17
src/GPU/pair_dipole_cut_gpu.cpp → src/GPU/pair_lj_cut_dipole_cut_gpu.cpp
Normal file → Executable file
@ -19,7 +19,7 @@
|
||||
#include "math.h"
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "pair_dipole_cut_gpu.h"
|
||||
#include "pair_lj_cut_dipole_cut_gpu.h"
|
||||
#include "atom.h"
|
||||
#include "atom_vec.h"
|
||||
#include "comm.h"
|
||||
@ -68,7 +68,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairDipoleCutGPU::PairDipoleCutGPU(LAMMPS *lmp) : PairDipoleCut(lmp),
|
||||
PairLJCutDipoleCutGPU::PairLJCutDipoleCutGPU(LAMMPS *lmp) : PairLJCutDipoleCut(lmp),
|
||||
gpu_mode(GPU_FORCE)
|
||||
{
|
||||
respa_enable = 0;
|
||||
@ -80,14 +80,14 @@ PairDipoleCutGPU::PairDipoleCutGPU(LAMMPS *lmp) : PairDipoleCut(lmp),
|
||||
free all arrays
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
PairDipoleCutGPU::~PairDipoleCutGPU()
|
||||
PairLJCutDipoleCutGPU::~PairLJCutDipoleCutGPU()
|
||||
{
|
||||
dpl_gpu_clear();
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairDipoleCutGPU::compute(int eflag, int vflag)
|
||||
void PairLJCutDipoleCutGPU::compute(int eflag, int vflag)
|
||||
{
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = vflag_fdotr = 0;
|
||||
@ -130,7 +130,7 @@ void PairDipoleCutGPU::compute(int eflag, int vflag)
|
||||
init specific to this pair style
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairDipoleCutGPU::init_style()
|
||||
void PairLJCutDipoleCutGPU::init_style()
|
||||
{
|
||||
if (!atom->q_flag || !atom->mu_flag || !atom->torque_flag)
|
||||
error->all(FLERR,"Pair dipole/cut/gpu requires atom attributes q, mu, torque");
|
||||
@ -138,6 +138,9 @@ void PairDipoleCutGPU::init_style()
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Cannot use newton pair with dipole/cut/gpu pair style");
|
||||
|
||||
if (strcmp(update->unit_style,"electron") == 0)
|
||||
error->all(FLERR,"Cannot (yet) use 'electron' units with dipoles");
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
double cut;
|
||||
@ -174,7 +177,7 @@ void PairDipoleCutGPU::init_style()
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double PairDipoleCutGPU::memory_usage()
|
||||
double PairLJCutDipoleCutGPU::memory_usage()
|
||||
{
|
||||
double bytes = Pair::memory_usage();
|
||||
return bytes + dpl_gpu_bytes();
|
||||
@ -182,7 +185,7 @@ double PairDipoleCutGPU::memory_usage()
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairDipoleCutGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
||||
void PairLJCutDipoleCutGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
||||
int *ilist, int *numneigh,
|
||||
int **firstneigh)
|
||||
{
|
||||
18
src/GPU/pair_dipole_cut_gpu.h → src/GPU/pair_lj_cut_dipole_cut_gpu.h
Normal file → Executable file
18
src/GPU/pair_dipole_cut_gpu.h → src/GPU/pair_lj_cut_dipole_cut_gpu.h
Normal file → Executable file
@ -13,21 +13,21 @@
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
|
||||
PairStyle(dipole/cut/gpu,PairDipoleCutGPU)
|
||||
PairStyle(lj/cut/dipole/cut/gpu,PairLJCutDipoleCutGPU)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_PAIR_DIPOLE_CUT_GPU_H
|
||||
#define LMP_PAIR_DIPOLE_CUT_GPU_H
|
||||
#ifndef LMP_PAIR_LJ_CUT_DIPOLE_CUT_GPU_H
|
||||
#define LMP_PAIR_LJ_CUT_DIPOLE_CUT_GPU_H
|
||||
|
||||
#include "pair_dipole_cut.h"
|
||||
#include "pair_lj_cut_dipole_cut.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class PairDipoleCutGPU : public PairDipoleCut {
|
||||
class PairLJCutDipoleCutGPU : public PairLJCutDipoleCut {
|
||||
public:
|
||||
PairDipoleCutGPU(LAMMPS *lmp);
|
||||
~PairDipoleCutGPU();
|
||||
PairLJCutDipoleCutGPU(LAMMPS *lmp);
|
||||
~PairLJCutDipoleCutGPU();
|
||||
void cpu_compute(int, int, int, int, int *, int *, int **);
|
||||
void compute(int, int);
|
||||
void init_style();
|
||||
@ -60,4 +60,8 @@ E: Cannot use newton pair with dipole/cut/gpu pair style
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
E: Cannot (yet) use 'electron' units with dipoles
|
||||
|
||||
This feature is not yet supported.
|
||||
|
||||
*/
|
||||
17
src/GPU/pair_dipole_sf_gpu.cpp → src/GPU/pair_lj_sf_dipole_sf_gpu.cpp
Normal file → Executable file
17
src/GPU/pair_dipole_sf_gpu.cpp → src/GPU/pair_lj_sf_dipole_sf_gpu.cpp
Normal file → Executable file
@ -19,7 +19,7 @@
|
||||
#include "math.h"
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "pair_dipole_sf_gpu.h"
|
||||
#include "pair_lj_sf_dipole_sf_gpu.h"
|
||||
#include "atom.h"
|
||||
#include "atom_vec.h"
|
||||
#include "comm.h"
|
||||
@ -67,7 +67,7 @@ using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairDipoleSFGPU::PairDipoleSFGPU(LAMMPS *lmp) : PairDipoleSF(lmp),
|
||||
PairLJSFDipoleSFGPU::PairLJSFDipoleSFGPU(LAMMPS *lmp) : PairLJSFDipoleSF(lmp),
|
||||
gpu_mode(GPU_FORCE)
|
||||
{
|
||||
respa_enable = 0;
|
||||
@ -79,14 +79,14 @@ PairDipoleSFGPU::PairDipoleSFGPU(LAMMPS *lmp) : PairDipoleSF(lmp),
|
||||
free all arrays
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
PairDipoleSFGPU::~PairDipoleSFGPU()
|
||||
PairLJSFDipoleSFGPU::~PairLJSFDipoleSFGPU()
|
||||
{
|
||||
dplsf_gpu_clear();
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairDipoleSFGPU::compute(int eflag, int vflag)
|
||||
void PairLJSFDipoleSFGPU::compute(int eflag, int vflag)
|
||||
{
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = vflag_fdotr = 0;
|
||||
@ -129,7 +129,7 @@ void PairDipoleSFGPU::compute(int eflag, int vflag)
|
||||
init specific to this pair style
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairDipoleSFGPU::init_style()
|
||||
void PairLJSFDipoleSFGPU::init_style()
|
||||
{
|
||||
if (!atom->q_flag || !atom->mu_flag || !atom->torque_flag)
|
||||
error->all(FLERR,"Pair dipole/sf/gpu requires atom attributes q, mu, torque");
|
||||
@ -137,6 +137,9 @@ void PairDipoleSFGPU::init_style()
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Cannot use newton pair with dipole/sf/gpu pair style");
|
||||
|
||||
if (strcmp(update->unit_style,"electron") == 0)
|
||||
error->all(FLERR,"Cannot (yet) use 'electron' units with dipoles");
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
double cut;
|
||||
@ -173,7 +176,7 @@ void PairDipoleSFGPU::init_style()
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double PairDipoleSFGPU::memory_usage()
|
||||
double PairLJSFDipoleSFGPU::memory_usage()
|
||||
{
|
||||
double bytes = Pair::memory_usage();
|
||||
return bytes + dplsf_gpu_bytes();
|
||||
@ -181,7 +184,7 @@ double PairDipoleSFGPU::memory_usage()
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairDipoleSFGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
||||
void PairLJSFDipoleSFGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
||||
int *ilist, int *numneigh,
|
||||
int **firstneigh)
|
||||
{
|
||||
18
src/GPU/pair_dipole_sf_gpu.h → src/GPU/pair_lj_sf_dipole_sf_gpu.h
Normal file → Executable file
18
src/GPU/pair_dipole_sf_gpu.h → src/GPU/pair_lj_sf_dipole_sf_gpu.h
Normal file → Executable file
@ -13,21 +13,21 @@
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
|
||||
PairStyle(dipole/sf/gpu,PairDipoleSFGPU)
|
||||
PairStyle(lj/sf/dipole/sf/gpu,PairLJSFDipoleSFGPU)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_PAIR_DIPOLE_SF_GPU_H
|
||||
#define LMP_PAIR_DIPOLE_SF_GPU_H
|
||||
#ifndef LMP_PAIR_LJ_SF_DIPOLE_SF_GPU_H
|
||||
#define LMP_PAIR_LJ_SF_DIPOLE_SF_GPU_H
|
||||
|
||||
#include "pair_dipole_sf.h"
|
||||
#include "pair_lj_sf_dipole_sf.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class PairDipoleSFGPU : public PairDipoleSF {
|
||||
class PairLJSFDipoleSFGPU : public PairLJSFDipoleSF {
|
||||
public:
|
||||
PairDipoleSFGPU(LAMMPS *lmp);
|
||||
~PairDipoleSFGPU();
|
||||
PairLJSFDipoleSFGPU(LAMMPS *lmp);
|
||||
~PairLJSFDipoleSFGPU();
|
||||
void cpu_compute(int, int, int, int, int *, int *, int **);
|
||||
void compute(int, int);
|
||||
void init_style();
|
||||
@ -60,4 +60,8 @@ E: Cannot use newton pair with dipole/cut/gpu pair style
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
E: Cannot (yet) use 'electron' units with dipoles
|
||||
|
||||
This feature is not yet supported.
|
||||
|
||||
*/
|
||||
Reference in New Issue
Block a user