Commit d58e8662 authored by sjplimp's avatar sjplimp
Browse files

sync with GH

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15767 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 06fa6ce1
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -8,13 +8,15 @@ VENV = $(BUILDDIR)/docenv
TXT2RST       = $(VENV)/bin/txt2rst

PYTHON        = $(shell which python3)
HAS_PYTHON3    = NO
HAS_VIRTUALENV = NO

ifeq ($(shell which python3 >/dev/null 2>&1; echo $$?), 1)
$(error Python3 was not found! Please check README.md for further instructions)
ifeq ($(shell which python3 >/dev/null 2>&1; echo $$?), 0)
HAS_PYTHON3 = YES
endif

ifeq ($(shell which virtualenv >/dev/null 2>&1; echo $$?), 1)
$(error virtualenv was not found! Please check README.md for further instructions)
ifeq ($(shell which virtualenv >/dev/null 2>&1; echo $$?), 0)
HAS_VIRTUALENV = YES
endif

SOURCES=$(wildcard src/*.txt)
@@ -109,6 +111,8 @@ $(RSTDIR)/%.rst : src/%.txt $(TXT2RST)
	)

$(VENV):
	@if [ "$(HAS_PYTHON3)" == "NO" ] ; then echo "Python3 was not found! Please check README.md for further instructions" 1>&2; exit 1; fi
	@if [ "$(HAS_VIRTUALENV)" == "NO" ] ; then echo "virtualenv was not found! Please check README.md for further instructions" 1>&2; exit 1; fi
	@( \
		virtualenv -p $(PYTHON) $(VENV); \
		. $(VENV)/bin/activate; \
+14 −7
Original line number Diff line number Diff line
@@ -58,6 +58,13 @@ class lammps(object):
    # determine module location

    modpath = dirname(abspath(getsourcefile(lambda:0)))
    self.lib = None

    # if a pointer to a LAMMPS object is handed in, all symbols should already be available.
    try:
      if ptr: self.lib = CDLL("",RTLD_GLOBAL)
    except:
      self.lib = None

    # load liblammps.so unless name is given.
    # e.g. if name = "g++", load liblammps_g++.so
@@ -66,7 +73,7 @@ class lammps(object):
    # does not need to be set for regular installations.
    # fall back to loading with a relative path, which typically
    # requires LD_LIBRARY_PATH to be set appropriately.

    if not self.lib:
      try:
        if not name: self.lib = CDLL(join(modpath,"liblammps.so"),RTLD_GLOBAL)
        else: self.lib = CDLL(join(modpath,"liblammps_%s.so" % name),RTLD_GLOBAL)
+10 −28
Original line number Diff line number Diff line
@@ -642,15 +642,9 @@ void FixRX::setup_pre_force(int vflag)
  int ii;

  if(localTempFlag){
    if (newton_pair) {
      dpdThetaLocal = new double[nlocal+nghost];
      for (ii = 0; ii < nlocal+nghost; ii++)
        dpdThetaLocal[ii] = 0.0;
    } else {
      dpdThetaLocal = new double[nlocal];
      for (ii = 0; ii < nlocal; ii++)
        dpdThetaLocal[ii] = 0.0;
    }
    int count = nlocal + (newton_pair ? nghost : 0);
    dpdThetaLocal = new double[count];
    memset(dpdThetaLocal, 0, sizeof(double)*count);
    computeLocalTemperature();
  }

@@ -690,15 +684,9 @@ void FixRX::pre_force(int vflag)
  double theta;

  if(localTempFlag){
    if (newton_pair) {
      dpdThetaLocal = new double[nlocal+nghost];
      for (ii = 0; ii < nlocal+nghost; ii++)
        dpdThetaLocal[ii] = 0.0;
    } else {
      dpdThetaLocal = new double[nlocal];
      for (ii = 0; ii < nlocal; ii++)
        dpdThetaLocal[ii] = 0.0;
    }
    int count = nlocal + (newton_pair ? nghost : 0);
    dpdThetaLocal = new double[count];
    memset(dpdThetaLocal, 0, sizeof(double)*count);
    computeLocalTemperature();
  }

@@ -1677,16 +1665,10 @@ void FixRX::computeLocalTemperature()
  double wij=0.0;
  double *dpdTheta = atom->dpdTheta;

  // Initialize the local density and local temperature arrays
  if (newton_pair) {
    sumWeights = new double[nlocal+nghost];
    for (ii = 0; ii < nlocal+nghost; ii++)
      sumWeights[ii] = 0.0;
  } else {
    sumWeights = new double[nlocal];
    for (ii = 0; ii < nlocal; ii++)
      dpdThetaLocal[ii] = 0.0;
  }
  // Initialize the local temperature weight array
  int sumWeightsCt = nlocal + (newton_pair ? nghost : 0);
  sumWeights = new double[sumWeightsCt];
  memset(sumWeights, 0, sizeof(double)*sumWeightsCt);

  inum = pairDPDE->list->inum;
  ilist = pairDPDE->list->ilist;