Commit 809d481f authored by Sievers's avatar Sievers
Browse files

Merge branch 'master' of https://github.com/charlessievers/lammps into...

Merge branch 'master' of https://github.com/charlessievers/lammps into fix_numerical_differentiation
parents 13bff076 e083f38c
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -219,7 +219,17 @@ void Temper::command(int narg, char **arg)

    timer->init_timeout();
    update->integrate->run(nevery);
    if (timer->is_timeout()) break;

    // check for timeout across all procs

    int my_timeout=0;
    int any_timeout=0;
    if (timer->is_timeout()) my_timeout=1;
    MPI_Allreduce(&my_timeout, &any_timeout, 1, MPI_INT, MPI_SUM, universe->uworld);
    if (any_timeout) {
      timer->force_timeout();
      break;
    }

    // compute PE
    // notify compute it will be called at next swap
+11 −1
Original line number Diff line number Diff line
@@ -241,7 +241,17 @@ void TemperGrem::command(int narg, char **arg)

    timer->init_timeout();
    update->integrate->run(nevery);
    if (timer->is_timeout()) break;

    // check for timeout across all procs

    int my_timeout=0;
    int any_timeout=0;
    if (timer->is_timeout()) my_timeout=1;
    MPI_Allreduce(&my_timeout, &any_timeout, 1, MPI_INT, MPI_SUM, universe->uworld);
    if (any_timeout) {
      timer->force_timeout();
      break;
    }

    // compute PE
    // notify compute it will be called at next swap
+11 −1
Original line number Diff line number Diff line
@@ -220,7 +220,17 @@ void TemperNPT::command(int narg, char **arg)

    timer->init_timeout();
    update->integrate->run(nevery);
    if (timer->is_timeout()) break;

    // check for timeout across all procs

    int my_timeout=0;
    int any_timeout=0;
    if (timer->is_timeout()) my_timeout=1;
    MPI_Allreduce(&my_timeout, &any_timeout, 1, MPI_INT, MPI_SUM, universe->uworld);
    if (any_timeout) {
      timer->force_timeout();
      break;
    }

    // compute PE
    // notify compute it will be called at next swap
+17 −2
Original line number Diff line number Diff line
@@ -23,7 +23,9 @@
#include "atom.h"
#include "force.h"
#include "comm.h"
#include "neighbor.h"
#include "neigh_list.h"
#include "neigh_request.h"
#include "memory.h"
#include "error.h"
#include "domain.h"
@@ -238,7 +240,7 @@ void PairSDPDTaitwaterIsothermal::allocate () {
void PairSDPDTaitwaterIsothermal::settings (int narg, char **arg) {
  if (narg != 2 && narg != 3)
    error->all (FLERR, "Illegal number of arguments for "
                "pair_style sdpd/taitwater/morris/isothermal");
                "pair_style sdpd/taitwater/isothermal");

  temperature = force->numeric (FLERR, arg[0]);
  viscosity = force->numeric (FLERR, arg[1]);
@@ -297,13 +299,26 @@ void PairSDPDTaitwaterIsothermal::coeff (int narg, char **arg) {
    error->all(FLERR,"Incorrect args for pair coefficients");
}

/* ----------------------------------------------------------------------
 init specific to this pair style
------------------------------------------------------------------------- */

void PairSDPDTaitwaterIsothermal::init_style()
{
  if ((!atom->rho_flag) || (atom->drho == NULL))
    error->all(FLERR,"Pair style dpd/taitwater/isothermal requires atom "
               "attributes rho and drho");

  neighbor->request(this,instance_me);
}

/* ----------------------------------------------------------------------
 init for one type pair i,j and corresponding j,i
 ------------------------------------------------------------------------- */

double PairSDPDTaitwaterIsothermal::init_one (int i, int j) {
  if (setflag[i][j] == 0)
    error->all(FLERR,"Not all pair sph/taitwater/morris coeffs are set");
    error->all(FLERR,"Not all pair sdpd/taitwater/isothermal coeffs are set");

  cut[j][i] = cut[i][j];

+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ class PairSDPDTaitwaterIsothermal : public Pair {
  void settings (int, char **);
  void coeff (int, char **);
  virtual double init_one (int, int);
  virtual void init_style();

 protected:
  double viscosity, temperature;
Loading