Merge branch 'compute-snap-apt-2' of github.com:rohskopf/lammps into HEAD
This commit is contained in:
@ -24,7 +24,6 @@
|
|||||||
#include "comm.h"
|
#include "comm.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "universe.h" // For MPI
|
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
@ -321,6 +320,7 @@ void ComputeSnap::compute_array()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clear global array
|
// clear global array
|
||||||
|
|
||||||
for (int irow = 0; irow < size_array_rows; irow++){
|
for (int irow = 0; irow < size_array_rows; irow++){
|
||||||
for (int icoeff = 0; icoeff < size_array_cols; icoeff++){
|
for (int icoeff = 0; icoeff < size_array_cols; icoeff++){
|
||||||
snap[irow][icoeff] = 0.0;
|
snap[irow][icoeff] = 0.0;
|
||||||
@ -371,7 +371,9 @@ void ComputeSnap::compute_array()
|
|||||||
const int typeoffset_global = nvalues*(itype-1);
|
const int typeoffset_global = nvalues*(itype-1);
|
||||||
|
|
||||||
if (dgradflag){
|
if (dgradflag){
|
||||||
|
|
||||||
// dBi/dRi tags
|
// dBi/dRi tags
|
||||||
|
|
||||||
snap[bik_rows + ((atom->tag[i]-1)*3*natoms) + 3*(atom->tag[i]-1) + 0][0] = atom->tag[i]-1;
|
snap[bik_rows + ((atom->tag[i]-1)*3*natoms) + 3*(atom->tag[i]-1) + 0][0] = atom->tag[i]-1;
|
||||||
snap[bik_rows + ((atom->tag[i]-1)*3*natoms) + 3*(atom->tag[i]-1) + 0][1] = atom->tag[i]-1;
|
snap[bik_rows + ((atom->tag[i]-1)*3*natoms) + 3*(atom->tag[i]-1) + 0][1] = atom->tag[i]-1;
|
||||||
snap[bik_rows + ((atom->tag[i]-1)*3*natoms) + 3*(atom->tag[i]-1) + 0][2] = 0;
|
snap[bik_rows + ((atom->tag[i]-1)*3*natoms) + 3*(atom->tag[i]-1) + 0][2] = 0;
|
||||||
@ -381,7 +383,9 @@ void ComputeSnap::compute_array()
|
|||||||
snap[bik_rows + ((atom->tag[i]-1)*3*natoms) + 3*(atom->tag[i]-1) + 2][0] = atom->tag[i]-1;
|
snap[bik_rows + ((atom->tag[i]-1)*3*natoms) + 3*(atom->tag[i]-1) + 2][0] = atom->tag[i]-1;
|
||||||
snap[bik_rows + ((atom->tag[i]-1)*3*natoms) + 3*(atom->tag[i]-1) + 2][1] = atom->tag[i]-1;
|
snap[bik_rows + ((atom->tag[i]-1)*3*natoms) + 3*(atom->tag[i]-1) + 2][1] = atom->tag[i]-1;
|
||||||
snap[bik_rows + ((atom->tag[i]-1)*3*natoms) + 3*(atom->tag[i]-1) + 2][2] = 2;
|
snap[bik_rows + ((atom->tag[i]-1)*3*natoms) + 3*(atom->tag[i]-1) + 2][2] = 2;
|
||||||
|
|
||||||
// dBi/dRj tags
|
// dBi/dRj tags
|
||||||
|
|
||||||
for (int j=0; j<natoms; j++){
|
for (int j=0; j<natoms; j++){
|
||||||
snap[bik_rows + ((j)*3*natoms) + 3*(atom->tag[i]-1) + 0][0] = atom->tag[i]-1;
|
snap[bik_rows + ((j)*3*natoms) + 3*(atom->tag[i]-1) + 0][0] = atom->tag[i]-1;
|
||||||
snap[bik_rows + ((j)*3*natoms) + 3*(atom->tag[i]-1) + 0][1] = j;
|
snap[bik_rows + ((j)*3*natoms) + 3*(atom->tag[i]-1) + 0][1] = j;
|
||||||
|
|||||||
@ -53,7 +53,6 @@ class ComputeSnap : public Compute {
|
|||||||
double cutmax;
|
double cutmax;
|
||||||
int quadraticflag;
|
int quadraticflag;
|
||||||
int bikflag, bik_rows, dgradflag, dgrad_rows;
|
int bikflag, bik_rows, dgradflag, dgrad_rows;
|
||||||
int rank;
|
|
||||||
|
|
||||||
Compute *c_pe;
|
Compute *c_pe;
|
||||||
Compute *c_virial;
|
Compute *c_virial;
|
||||||
|
|||||||
Reference in New Issue
Block a user