make compatible with per-type and per-atom masses

This commit is contained in:
Axel Kohlmeyer
2024-07-30 16:16:05 -04:00
parent 1254d579f7
commit 5016a0848f
7 changed files with 47 additions and 21 deletions

View File

@ -113,6 +113,7 @@ void ComputeRHEOSurface::compute_peratom()
int *mask = atom->mask;
int *type = atom->type;
double *mass = atom->mass;
double *rmass = atom->rmass;
double *rho = atom->rho;
int *coordination = compute_kernel->coordination;
@ -173,9 +174,13 @@ void ComputeRHEOSurface::compute_peratom()
}
}
Voli = mass[itype] / rhoi;
Volj = mass[jtype] / rhoj;
if (rmass) {
Voli = rmass[i] / rhoi;
Volj = rmass[j] / rhoj;
} else {
Voli = mass[itype] / rhoi;
Volj = mass[jtype] / rhoj;
}
compute_kernel->calc_dw_quintic(i, j, dx[0], dx[1], dx[2], sqrt(rsq), dWij, dWji);
for (a = 0; a < dim; a++) {