Unverified Commit 6576c4cb authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #2260 from akohlmey/collected-small-changes

Collected small changes
parents ca7039aa d09d40af
Loading
Loading
Loading
Loading

.github/codecov.yml

0 → 100644
+29 −0
Original line number Diff line number Diff line
comment: false
coverage:
  notify:
    slack:
      default:
        url: "secret:HWZbvgtc6OD7F3v3PfrK3/rzCJvScbh69Fi1CkLwuHK0+wIBIHVR+Q5i7q6F9Ln4OChbiRGtYAEUUsT8/jmBu4qDpIi8mx746codc0z/Z3aafLd24pBrCEPLvdCfIZxqPnw3TuUgGhwmMDZf0+thg8YNUr/MbOZ7Li2L6+ZbYuA="
        threshold: 10%
        only_pulls: false
        branches:
          - "master"
        flags:
          - "unit"
        paths:
          - "src"
  status:
    project:
        default:
            branches:
              - "master"
            paths:
              - "src"
            informational: true
    patch:
        default:
            branches:
              - "master"
            paths:
              - "src"
            informational: true
+9 −6
Original line number Diff line number Diff line
@@ -23,14 +23,17 @@ if(ENABLE_TESTING)
        OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
      include(CheckCXXCompilerFlag)
      set(CMAKE_CUSTOM_LINKER_DEFAULT default)
      check_cxx_compiler_flag(-fuse-ld=lld HAVE_LLD_LINKER)
      check_cxx_compiler_flag(-fuse-ld=gold HAVE_GOLD_LINKER)
      check_cxx_compiler_flag(-fuse-ld=bfd HAVE_BFD_LINKER)
      if(HAVE_LLD_LINKER)
      check_cxx_compiler_flag(-fuse-ld=lld HAVE_LLD_LINKER_FLAG)
      check_cxx_compiler_flag(-fuse-ld=gold HAVE_GOLD_LINKER_FLAG)
      check_cxx_compiler_flag(-fuse-ld=bfd HAVE_BFD_LINKER_FLAG)
      find_program(HAVE_LLD_LINKER_BIN lld ld.lld)
      find_program(HAVE_GOLD_LINKER_BIN ld.gold)
      find_program(HAVE_BFD_LINKER_BIN ld.bfd)
      if(HAVE_LLD_LINKER_FLAG AND HAVE_LLD_LINKER_BIN)
        set(CMAKE_CUSTOM_LINKER_DEFAULT lld)
      elseif(HAVE_GOLD_LINKER)
      elseif(HAVE_GOLD_LINKER_FLAG AND HAVE_GOLD_LINKER_BIN)
        set(CMAKE_CUSTOM_LINKER_DEFAULT gold)
      elseif(HAVE_BFD_LINKER)
      elseif(HAVE_BFD_LINKER_FLAG AND HAVE_BFD_LINKER_BIN)
        set(CMAKE_CUSTOM_LINKER_DEFAULT bfd)
      endif()
      set(CMAKE_CUSTOM_LINKER_VALUES lld gold bfd default)
+18 −0
Original line number Diff line number Diff line
@@ -118,6 +118,24 @@ Doc page with :doc:`ERROR messages <Errors_messages>`
   incorrect periodic images of atoms in interaction lists.  To avoid, either use
   :doc:`pair style zero <pair_zero>` with a suitable cutoff or use :doc:`comm_modify cutoff <comm_modify>`.

*Communication cutoff is shorter than a bond length based estimate. This may lead to errors.*

   Since LAMMPS stores topology data with individual atoms, all atoms
   comprising a bond, angle, dihedral or improper must be present on any
   sub-domain that "owns" the atom with the information, either as a
   local or a ghost atom. The communication cutoff is what determines up
   to what distance from a sub-domain boundary ghost atoms are created.
   The communication cutoff is by default the largest non-bonded cutoff
   plus the neighbor skin distance, but for short or non-bonded cutoffs
   and/or long bonds, this may not be sufficient. This warning indicates
   that there is an increased risk of a simulation stopping unexpectedly
   because of Bond/Angle/Dihedral/Improper atoms missing.  It can be
   silenced by manually setting the communication cutoff via
   :doc:`comm_modify cutoff <comm_modify>`.  However, since the
   heuristic used to determine the estimate is not always accurate, it
   is not changed automatically and the warning may be ignored depending
   on the specific system being simulated.

*Communication cutoff is too small for SNAP micro load balancing, increased to %lf*
   Self-explanatory.

+38 −14
Original line number Diff line number Diff line
@@ -32,11 +32,11 @@ using namespace LAMMPS_NS;

/* ---------------------------------------------------------------------- */

PairLJ_AB_MDF::PairLJ_AB_MDF(LAMMPS *lmp) : Pair(lmp) {}
PairLennardMDF::PairLennardMDF(LAMMPS *lmp) : Pair(lmp) {}

/* ---------------------------------------------------------------------- */

PairLJ_AB_MDF::~PairLJ_AB_MDF()
PairLennardMDF::~PairLennardMDF()
{
  if (allocated) {
    memory->destroy(setflag);
@@ -56,7 +56,7 @@ PairLJ_AB_MDF::~PairLJ_AB_MDF()

/* ---------------------------------------------------------------------- */

void PairLJ_AB_MDF::compute(int eflag, int vflag)
void PairLennardMDF::compute(int eflag, int vflag)
{
  int i,j,ii,jj,inum,jnum,itype,jtype;
  double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
@@ -153,7 +153,7 @@ void PairLJ_AB_MDF::compute(int eflag, int vflag)
   allocate all arrays
------------------------------------------------------------------------- */

void PairLJ_AB_MDF::allocate()
void PairLennardMDF::allocate()
{
  allocated = 1;
  int n = atom->ntypes;
@@ -180,7 +180,7 @@ void PairLJ_AB_MDF::allocate()
   global settings
------------------------------------------------------------------------- */

void PairLJ_AB_MDF::settings(int narg, char **arg)
void PairLennardMDF::settings(int narg, char **arg)
{
  if (narg != 2) error->all(FLERR,"Illegal pair_style command");

@@ -207,7 +207,7 @@ void PairLJ_AB_MDF::settings(int narg, char **arg)
   set coeffs for one or more type pairs
------------------------------------------------------------------------- */

void PairLJ_AB_MDF::coeff(int narg, char **arg)
void PairLennardMDF::coeff(int narg, char **arg)
{
  if (narg != 4 && narg != 6)
    error->all(FLERR,"Incorrect args for pair coefficients");
@@ -248,7 +248,7 @@ void PairLJ_AB_MDF::coeff(int narg, char **arg)
   init for one type pair i,j and corresponding j,i
------------------------------------------------------------------------- */

double PairLJ_AB_MDF::init_one(int i, int j)
double PairLennardMDF::init_one(int i, int j)
{
  if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set");

@@ -259,6 +259,7 @@ double PairLJ_AB_MDF::init_one(int i, int j)
  lj3[i][j] = aparm[i][j];
  lj4[i][j] = bparm[i][j];

  cut[j][i] = cut[i][j];
  cut_inner[j][i] = cut_inner[i][j];
  cut_inner_sq[j][i] = cut_inner_sq[i][j];
  lj1[j][i] = lj1[i][j];
@@ -273,7 +274,7 @@ double PairLJ_AB_MDF::init_one(int i, int j)
  proc 0 writes to restart file
------------------------------------------------------------------------- */

void PairLJ_AB_MDF::write_restart(FILE *fp)
void PairLennardMDF::write_restart(FILE *fp)
{
  write_restart_settings(fp);

@@ -294,7 +295,7 @@ void PairLJ_AB_MDF::write_restart(FILE *fp)
  proc 0 reads from restart file, bcasts
------------------------------------------------------------------------- */

void PairLJ_AB_MDF::read_restart(FILE *fp)
void PairLennardMDF::read_restart(FILE *fp)
{
  read_restart_settings(fp);
  allocate();
@@ -324,7 +325,7 @@ void PairLJ_AB_MDF::read_restart(FILE *fp)
  proc 0 writes to restart file
------------------------------------------------------------------------- */

void PairLJ_AB_MDF::write_restart_settings(FILE *fp)
void PairLennardMDF::write_restart_settings(FILE *fp)
{
  fwrite(&mix_flag,sizeof(int),1,fp);
}
@@ -333,7 +334,7 @@ void PairLJ_AB_MDF::write_restart_settings(FILE *fp)
  proc 0 reads from restart file, bcasts
------------------------------------------------------------------------- */

void PairLJ_AB_MDF::read_restart_settings(FILE *fp)
void PairLennardMDF::read_restart_settings(FILE *fp)
{
  int me = comm->me;
  if (me == 0) {
@@ -342,9 +343,32 @@ void PairLJ_AB_MDF::read_restart_settings(FILE *fp)
  MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
}

/* ----------------------------------------------------------------------
   proc 0 writes to data file
------------------------------------------------------------------------- */

void PairLennardMDF::write_data(FILE *fp)
{
  for (int i = 1; i <= atom->ntypes; i++)
    fprintf(fp,"%d %g %g\n",i,aparm[i][i],bparm[i][i]);
}

/* ----------------------------------------------------------------------
   proc 0 writes all pairs to data file
------------------------------------------------------------------------- */

void PairLennardMDF::write_data_all(FILE *fp)
{
  for (int i = 1; i <= atom->ntypes; i++)
    for (int j = i; j <= atom->ntypes; j++)
      fprintf(fp,"%d %d %g %g %g %g\n",
              i,j,aparm[i][j],bparm[i][j],
              cut_inner[i][j],cut[i][j]);
}

/* ---------------------------------------------------------------------- */

double PairLJ_AB_MDF::single(int /*i*/, int /*j*/, int itype, int jtype,
double PairLennardMDF::single(int /*i*/, int /*j*/, int itype, int jtype,
                             double rsq,
                             double /*factor_coul*/, double factor_lj,
                             double &fforce)
@@ -368,7 +392,7 @@ double PairLJ_AB_MDF::single(int /*i*/, int /*j*/, int itype, int jtype,
    dt = 30.* d*d * dd*dd * rr / dp;

    forcelj = forcelj*tt + philj*dt;
    philj *= dt;
    philj *= tt;
  }

  fforce = factor_lj*forcelj*r2inv;
@@ -378,7 +402,7 @@ double PairLJ_AB_MDF::single(int /*i*/, int /*j*/, int itype, int jtype,

/* ---------------------------------------------------------------------- */

void *PairLJ_AB_MDF::extract(const char *str, int &dim)
void *PairLennardMDF::extract(const char *str, int &dim)
{
  dim = 2;
  if (strcmp(str,"a") == 0) return (void *) aparm;
+8 −6
Original line number Diff line number Diff line
@@ -13,21 +13,21 @@

#ifdef PAIR_CLASS

PairStyle(lennard/mdf,PairLJ_AB_MDF)
PairStyle(lennard/mdf,PairLennardMDF)

#else

#ifndef LMP_PAIR_LJ_AB_MDF_H
#define LMP_PAIR_LJ_AB_MDF_H
#ifndef LMP_PAIR_LENNARD_MDF_H
#define LMP_PAIR_LENNARD_MDF_H

#include "pair.h"

namespace LAMMPS_NS {

class PairLJ_AB_MDF : public Pair {
class PairLennardMDF : public Pair {
 public:
  PairLJ_AB_MDF(class LAMMPS *);
  virtual ~PairLJ_AB_MDF();
  PairLennardMDF(class LAMMPS *);
  virtual ~PairLennardMDF();

  virtual void compute(int, int);
  void settings(int, char **);
@@ -37,6 +37,8 @@ class PairLJ_AB_MDF : public Pair {
  void read_restart(FILE *);
  void write_restart_settings(FILE *);
  void read_restart_settings(FILE *);
  void write_data(FILE *);
  void write_data_all(FILE *);
  double single(int, int, int, int, double, double, double, double &);
  void *extract(const char *, int &);

Loading