Unverified Commit 1baecc68 authored by Stefan Paquay's avatar Stefan Paquay Committed by GitHub
Browse files

Merge pull request #3 from stanmoore1/kk_yukawa

Add pair_yukawa_kokkos to Install.sh and minor cleanup.

These changes look fine. Sorry for the tabs, I must have forgotten about those.
parents 5ba80662 d916416c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -229,6 +229,8 @@ action pair_tersoff_mod_kokkos.cpp pair_tersoff_mod.cpp
action pair_tersoff_mod_kokkos.h pair_tersoff_mod.h
action pair_tersoff_zbl_kokkos.cpp pair_tersoff_zbl.cpp
action pair_tersoff_zbl_kokkos.h pair_tersoff_zbl.h
action pair_yukawa_kokkos.cpp
action pair_yukawa_kokkos.h
action pppm_kokkos.cpp pppm.cpp
action pppm_kokkos.h pppm.h
action rand_pool_wrap_kokkos.cpp
+2 −28
Original line number Diff line number Diff line
@@ -16,15 +16,6 @@
------------------------------------------------------------------------- */
#include <math.h>
#include <stdlib.h>
// #include "pair_yukawa.h"
// #include "atom.h"
//#include "force.h"
//#include "comm.h"
//#include "neigh_list.h"
//#include "memory.h"
//#include "error.h"

// These were added.
#include "pair_yukawa_kokkos.h"
#include "kokkos.h"
#include "atom_kokkos.h"
@@ -40,7 +31,6 @@
#include "memory.h"
#include "error.h"
#include "atom_masks.h"
// end These were added.

using namespace LAMMPS_NS;
using namespace MathConst;
@@ -109,19 +99,6 @@ void PairYukawaKokkos<DeviceType>::allocate()
  params = k_params.template view<DeviceType>();
}

/* ----------------------------------------------------------------------
   global settings
------------------------------------------------------------------------- */

template<class DeviceType>
void PairYukawaKokkos<DeviceType>::settings(int narg, char **arg)
{
  if (narg != 2) error->all(FLERR,"Illegal pair_style command");

  PairYukawa::settings(2,arg);
}


/* ----------------------------------------------------------------------
   init specific to this pair style
------------------------------------------------------------------------- */
@@ -158,9 +135,6 @@ void PairYukawaKokkos<DeviceType>::init_style()
  } else if (neighflag == HALF || neighflag == HALFTHREAD) {
    neighbor->requests[irequest]->full = 0;
    neighbor->requests[irequest]->half = 1;
  } else if (neighflag == N2) {
    neighbor->requests[irequest]->full = 0;
    neighbor->requests[irequest]->half = 0;
  } else {
    error->all(FLERR,"Cannot use chosen neighbor list style with yukawa/kk");
  }
+16 −16
Original line number Diff line number Diff line
@@ -31,15 +31,15 @@ namespace LAMMPS_NS {
template<class DeviceType>
class PairYukawaKokkos : public PairYukawa {
 public:
  enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2};
  enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF};
  enum {COUL_FLAG=0};
  typedef DeviceType device_type;
  typedef ArrayTypes<DeviceType> AT;

  PairYukawaKokkos(class LAMMPS *);
  virtual ~PairYukawaKokkos();

  void compute(int, int);
  void settings(int, char**);
  void init_style();
  double init_one(int,int);

@@ -78,22 +78,22 @@ class PairYukawaKokkos : public PairYukawa {
  typename Kokkos::DualView<params_yukawa**,Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
  params_yukawa m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
  F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
  typename ArrayTypes<DeviceType>::t_x_array_randomread x;
  typename ArrayTypes<DeviceType>::t_x_array c_x;
  typename ArrayTypes<DeviceType>::t_f_array f;
  typename ArrayTypes<DeviceType>::t_int_1d_randomread type;
  typename AT::t_x_array_randomread x;
  typename AT::t_x_array c_x;
  typename AT::t_f_array f;
  typename AT::t_int_1d_randomread type;

  DAT::tdual_efloat_1d k_eatom;
  DAT::tdual_virial_array k_vatom;
  typename ArrayTypes<DeviceType>::t_efloat_1d d_eatom;
  typename ArrayTypes<DeviceType>::t_virial_array d_vatom;
  typename ArrayTypes<DeviceType>::t_tagint_1d tag;
  typename AT::t_efloat_1d d_eatom;
  typename AT::t_virial_array d_vatom;
  typename AT::t_tagint_1d tag;

  int newton_pair;
  double special_lj[4];

  typename ArrayTypes<DeviceType>::tdual_ffloat_2d k_cutsq;
  typename ArrayTypes<DeviceType>::t_ffloat_2d d_cutsq;
  typename AT::tdual_ffloat_2d k_cutsq;
  typename AT::t_ffloat_2d d_cutsq;


  int neighflag;