Skip to content

Commit

Permalink
small corrections in the DIFFRACTION package, mostly cosmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
akohlmey committed Sep 2, 2024
1 parent 1b54131 commit 7c80b00
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
12 changes: 6 additions & 6 deletions src/DIFFRACTION/compute_saed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ void ComputeSAED::compute_vector()

// Setting up OMP
#if defined(_OPENMP)
if (me == 0 && echo) utils::logmesg(lmp," using {}OMP threads\n",comm->nthreads);
if (me == 0 && echo) utils::logmesg(lmp," using {} OMP thread(s)\n",comm->nthreads);
#endif

if (me == 0 && echo) utils::logmesg(lmp,"\n");
Expand Down Expand Up @@ -478,7 +478,7 @@ void ComputeSAED::compute_vector()
}
}
} // End of pragma omp for region
delete [] f;
delete[] f;
}

auto scratch = new double[2*nRows];
Expand All @@ -499,10 +499,10 @@ void ComputeSAED::compute_vector()
utils::logmesg(lmp," 100% \nTime elapsed during compute_saed = {:.2f} sec "
"using {:.2f} Mbytes/processor\n-----\n", t2-t0, bytes/1024.0/1024.0);

delete [] xlocal;
delete [] typelocal;
delete [] scratch;
delete [] Fvec;
delete[] xlocal;
delete[] typelocal;
delete[] scratch;
delete[] Fvec;
}

/* ----------------------------------------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions src/DIFFRACTION/compute_xrd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ void ComputeXRD::compute_array()

// Setting up OMP
#if defined(_OPENMP)
if ((me == 0) && echo) utils::logmesg(lmp," using {} OMP threads\n",comm->nthreads);
if ((me == 0) && echo) utils::logmesg(lmp," using {} OMP thread(s)\n",comm->nthreads);
#endif

if ((me == 0) && echo) {
Expand Down Expand Up @@ -482,7 +482,7 @@ void ComputeXRD::compute_array()
}
} // End of pragma omp for region
} // End of if LP=1 check
delete [] f;
delete[] f;
} // End of pragma omp parallel region

auto scratch = new double[2*size_array_rows];
Expand All @@ -503,10 +503,10 @@ void ComputeXRD::compute_array()
utils::logmesg(lmp," 100% \nTime elapsed during compute_xrd = {:.2f} sec "
"using {:.2f} Mbytes/processor\n-----\n", t2-t0, bytes/1024.0/1024.0);

delete [] scratch;
delete [] Fvec;
delete [] xlocal;
delete [] typelocal;
delete[] scratch;
delete[] Fvec;
delete[] xlocal;
delete[] typelocal;
}

/* ----------------------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions src/DIFFRACTION/fix_saed_vtk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ FixSAEDVTK::FixSAEDVTK(LAMMPS *lmp, int narg, char **arg) :
memory->create(vector_total,nrows,"saed/vtk:vector_total");

vector_flag = 1;
extvector = 0;
size_vector = nrows;

if (nOutput == 0) {
Expand Down Expand Up @@ -248,8 +249,8 @@ FixSAEDVTK::FixSAEDVTK(LAMMPS *lmp, int narg, char **arg) :

FixSAEDVTK::~FixSAEDVTK()
{
delete [] filename;
delete [] ids;
delete[] filename;
delete[] ids;
memory->destroy(vector);
memory->destroy(vector_total);
if (fp && comm->me == 0) fclose(fp);
Expand Down

0 comments on commit 7c80b00

Please sign in to comment.