reduce compiler warnings, remove dead code, follow LAMMPS conventions more closely
This commit is contained in:
@ -45,8 +45,10 @@ static constexpr double EPSILON = 1e-1;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeRHEOInterface::ComputeRHEOInterface(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg), fix_rheo(nullptr), compute_kernel(nullptr), fp_store(nullptr),
|
||||
rho0(nullptr), norm(nullptr), normwf(nullptr), chi(nullptr), id_fix_pa(nullptr)
|
||||
Compute(lmp, narg, arg), chi(nullptr), fp_store(nullptr), fix_rheo(nullptr),
|
||||
rho0(nullptr), norm(nullptr), normwf(nullptr), id_fix_pa(nullptr), list(nullptr),
|
||||
compute_kernel(nullptr), fix_pressure(nullptr)
|
||||
|
||||
{
|
||||
if (narg != 3) error->all(FLERR,"Illegal compute rheo/interface command");
|
||||
|
||||
@ -228,12 +230,11 @@ void ComputeRHEOInterface::compute_peratom()
|
||||
|
||||
int ComputeRHEOInterface::pack_forward_comm(int n, int *list, double *buf, int /*pbc_flag*/, int * /*pbc*/)
|
||||
{
|
||||
int i, j, k, m;
|
||||
m = 0;
|
||||
int m = 0;
|
||||
double *rho = atom->rho;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
for (int i = 0; i < n; i++) {
|
||||
int j = list[i];
|
||||
if (comm_stage == 0) {
|
||||
buf[m++] = fp_store[j][0];
|
||||
buf[m++] = fp_store[j][1];
|
||||
@ -250,11 +251,10 @@ int ComputeRHEOInterface::pack_forward_comm(int n, int *list, double *buf, int /
|
||||
|
||||
void ComputeRHEOInterface::unpack_forward_comm(int n, int first, double *buf)
|
||||
{
|
||||
int i, k, m, last;
|
||||
double *rho = atom->rho;
|
||||
m = 0;
|
||||
last = first + n;
|
||||
for (i = first; i < last; i++) {
|
||||
int m = 0;
|
||||
int last = first + n;
|
||||
for (int i = first; i < last; i++) {
|
||||
if (comm_stage == 0) {
|
||||
fp_store[i][0] = buf[m++];
|
||||
fp_store[i][1] = buf[m++];
|
||||
@ -270,12 +270,10 @@ void ComputeRHEOInterface::unpack_forward_comm(int n, int first, double *buf)
|
||||
|
||||
int ComputeRHEOInterface::pack_reverse_comm(int n, int first, double *buf)
|
||||
{
|
||||
int i, k, m, last;
|
||||
double *rho = atom->rho;
|
||||
|
||||
m = 0;
|
||||
last = first + n;
|
||||
for (i = first; i < last; i++) {
|
||||
int m = 0;
|
||||
int last = first + n;
|
||||
for (int i = first; i < last; i++) {
|
||||
buf[m++] = norm[i];
|
||||
buf[m++] = chi[i];
|
||||
buf[m++] = normwf[i];
|
||||
@ -288,12 +286,11 @@ int ComputeRHEOInterface::pack_reverse_comm(int n, int first, double *buf)
|
||||
|
||||
void ComputeRHEOInterface::unpack_reverse_comm(int n, int *list, double *buf)
|
||||
{
|
||||
int i, k, j, m;
|
||||
double *rho = atom->rho;
|
||||
int *status = atom->rheo_status;
|
||||
m = 0;
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
int m = 0;
|
||||
for (int i = 0; i < n; i++) {
|
||||
int j = list[i];
|
||||
norm[j] += buf[m++];
|
||||
chi[j] += buf[m++];
|
||||
if (status[j] & PHASECHECK){
|
||||
|
||||
Reference in New Issue
Block a user