git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14379 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2015-12-17 15:46:12 +00:00
parent df7e89f9f7
commit f7e17e97e8
7 changed files with 20 additions and 10 deletions

View File

@ -355,12 +355,12 @@ struct PairComputeFunctor<PairStyle,FULLCLUSTER,STACKPARAMS,Specialisation> {
EV_FLOAT compute_item(const typename Kokkos::TeamPolicy<device_type>::member_type& dev,
const NeighListKokkos<device_type> &list, const NoCoulTag& ) const {
EV_FLOAT ev;
const int i = dev.league_rank()*dev.team_size() + dev.team_rank();
int i = dev.league_rank()*dev.team_size() + dev.team_rank();
const X_FLOAT xtmp = c.c_x(i,0);
const X_FLOAT ytmp = c.c_x(i,1);
const X_FLOAT ztmp = c.c_x(i,2);
const int itype = c.type(i);
int itype = c.type(i);
const AtomNeighborsConst neighbors_i = list.get_neighbors_const(i);
const int jnum = list.d_numneigh[i];
@ -368,7 +368,7 @@ struct PairComputeFunctor<PairStyle,FULLCLUSTER,STACKPARAMS,Specialisation> {
F_FLOAT3 ftmp;
for (int jj = 0; jj < jnum; jj++) {
const int jjj = neighbors_i(jj);
int jjj = neighbors_i(jj);
Kokkos::parallel_reduce(Kokkos::ThreadVectorRange(dev,NeighClusterSize),[&] (const int& k, F_FLOAT3& fftmp) {
const F_FLOAT factor_lj = c.special_lj[sbmask(jjj+k)];

View File

@ -458,7 +458,7 @@ void VerletKokkos::force_clear()
size_t nbytes = sizeof(double) * nall;
if (nbytes) {
if (atomKK->k_f.modified_host > atomKK->k_f.modified_device) {
if (atomKK->k_f.modified_host() > atomKK->k_f.modified_device()) {
memset_kokkos(atomKK->k_f.view<LMPHostType>());
atomKK->modified(Host,F_MASK);
} else {
@ -475,7 +475,7 @@ void VerletKokkos::force_clear()
} else {
int nall = atomKK->nfirst;
if (atomKK->k_f.modified_host > atomKK->k_f.modified_device) {
if (atomKK->k_f.modified_host() > atomKK->k_f.modified_device()) {
memset_kokkos(atomKK->k_f.view<LMPHostType>());
atomKK->modified(Host,F_MASK);
} else {

View File

@ -604,7 +604,7 @@ void PairComb3::read_file(char *file)
FILE *fp;
if (comm->me == 0) {
fp = fopen(file,"r");
fp = force->open_potential(file);
if (fp == NULL) {
char str[128];
sprintf(str,"Cannot open COMB3 potential file %s",file);

View File

@ -104,6 +104,16 @@ void FixSRP::init()
if ((bptype < 1) || (bptype > atom->ntypes))
error->all(FLERR,"Illegal bond particle type");
// fix SRP should be the first fix running at the PRE_EXCHANGE step.
// Otherwise it might conflict with, e.g. fix deform
if (modify->n_pre_exchange > 1) {
char *first = modify->fix[modify->list_pre_exchange[0]]->id;
if ((comm->me == 0) && (strcmp(id,first) != 0))
error->warning(FLERR,"Internal fix for pair srp defined too late."
" May lead to incorrect behavior.");
}
// setup neigh exclusions for diff atom types
// bond particles do not interact with other types
// type bptype only interacts with itself

View File

@ -23,8 +23,11 @@
konglt@sjtu.edu.cn; konglt@gmail.com
------------------------------------------------------------------------- */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "fix_phonon.h"
#include "fft3d_wrap.h"
#include "atom.h"
#include "compute.h"
#include "domain.h"

View File

@ -43,10 +43,6 @@ typedef double FFT_SCALAR;
#include <complex>
#include "fix.h"
#include <map>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "fft3d_wrap.h"
namespace LAMMPS_NS {

View File

@ -23,6 +23,7 @@ namespace LAMMPS_NS {
class Modify : protected Pointers {
friend class Info;
friend class FixSRP;
public:
int nfix,maxfix;
int n_initial_integrate,n_post_integrate,n_pre_exchange,n_pre_neighbor;