Unverified Commit 4a2d3e95 authored by Richard Berger's avatar Richard Berger
Browse files

Replace Atom::count_words with utils::count_words

parent db46521d
Loading
Loading
Loading
Loading
+1 −1
Changes for src/GPU/pair_eam_alloy_gpu.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -399,7 +399,7 @@ void PairEAMAlloyGPU::read_file(char *filename)
  MPI_Bcast(line,n,MPI_CHAR,0,world);

  sscanf(line,"%d",&file->nelements);
  int nwords = atom->count_words(line);
  int nwords = utils::count_words(line);
  if (nwords != file->nelements + 1)
    error->all(FLERR,"Incorrect element names in EAM potential file");

+2 −1
Changes for src/GPU/pair_eam_fs_gpu.cpp: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include "gpu_extra.h"
#include "domain.h"
#include "suffix.h"
#include "utils.h"

using namespace LAMMPS_NS;

@@ -398,7 +399,7 @@ void PairEAMFSGPU::read_file(char *filename)
  MPI_Bcast(line,n,MPI_CHAR,0,world);

  sscanf(line,"%d",&file->nelements);
  int nwords = atom->count_words(line);
  int nwords = utils::count_words(line);
  if (nwords != file->nelements + 1)
    error->all(FLERR,"Incorrect element names in EAM potential file");

+2 −1
Changes for src/KOKKOS/pair_eam_alloy_kokkos.cpp: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include "memory_kokkos.h"
#include "error.h"
#include "atom_masks.h"
#include "utils.h"

using namespace LAMMPS_NS;

@@ -1012,7 +1013,7 @@ void PairEAMAlloyKokkos<DeviceType>::read_file(char *filename)
  MPI_Bcast(line,n,MPI_CHAR,0,world);

  sscanf(line,"%d",&file->nelements);
  int nwords = atom->count_words(line);
  int nwords = utils::count_words(line);
  if (nwords != file->nelements + 1)
    error->all(FLERR,"Incorrect element names in EAM potential file");

+2 −1
Changes for src/KOKKOS/pair_eam_fs_kokkos.cpp: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include "memory_kokkos.h"
#include "error.h"
#include "atom_masks.h"
#include "utils.h"

using namespace LAMMPS_NS;

@@ -1012,7 +1013,7 @@ void PairEAMFSKokkos<DeviceType>::read_file(char *filename)
  MPI_Bcast(line,n,MPI_CHAR,0,world);

  sscanf(line,"%d",&file->nelements);
  int nwords = atom->count_words(line);
  int nwords = utils::count_words(line);
  if (nwords != file->nelements + 1)
    error->all(FLERR,"Incorrect element names in EAM potential file");

+3 −2
Changes for src/KOKKOS/pair_exp6_rx_kokkos.cpp: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#include "neigh_request.h"
#include "atom_kokkos.h"
#include "kokkos.h"
#include "utils.h"

#ifdef _OPENMP
#include <omp.h>
@@ -1752,7 +1753,7 @@ void PairExp6rxKokkos<DeviceType>::read_file(char *file)
    // strip comment, skip line if blank

    if ((ptr = strchr(line,'#'))) *ptr = '\0';
    nwords = atom->count_words(line);
    nwords = utils::count_words(line);
    if (nwords == 0) continue;

    // concatenate additional lines until have params_per_line words
@@ -1771,7 +1772,7 @@ void PairExp6rxKokkos<DeviceType>::read_file(char *file)
      MPI_Bcast(&n,1,MPI_INT,0,world);
      MPI_Bcast(line,n,MPI_CHAR,0,world);
      if ((ptr = strchr(line,'#'))) *ptr = '\0';
      nwords = atom->count_words(line);
      nwords = utils::count_words(line);
    }

    if (nwords != params_per_line)
Loading