Unverified Commit e3a3c500 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

change indentation and whitespace to LAMMPS style

parent a3e255b3
Loading
Loading
Loading
Loading
+14 −12
Changes for src/USER-MISC/fix_wall_stochastic.cpp: 14 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@

#include "fix_wall_stochastic.h"
#include <cstring>
#include <cstdlib>
#include "atom.h"
#include "comm.h"
#include "update.h"
@@ -24,7 +25,6 @@
#include "error.h"
#include "force.h"
#include "random_mars.h"
#include <stdlib.h> 


using namespace LAMMPS_NS;
@@ -49,11 +49,18 @@ FixWallStochastic::FixWallStochastic(LAMMPS *lmp, int narg, char **arg) :
  nwall = 0;
  int scaleflag = 1;
  reflectionstyle = NONE;

  //RanMars *random;
  if (strcmp(arg[3],"diffusive") == 0)  {reflectionstyle = DIFFUSIVE; arginc = 6;}
  else if (strcmp(arg[3],"maxwell") == 0)  {reflectionstyle = MAXWELL; arginc = 7;}
  else if (strcmp(arg[3],"cercignanilampis") == 0)  {reflectionstyle = CERCIGNANILAMPIS; arginc = 9;}
  else error->all(FLERR,"Illegal fix wall/stochastic command");
  if (strcmp(arg[3],"diffusive") == 0) {
    reflectionstyle = DIFFUSIVE;
    arginc = 6;
  } else if (strcmp(arg[3],"maxwell") == 0) {
    reflectionstyle = MAXWELL;
    arginc = 7;
  } else if (strcmp(arg[3],"cercignanilampis") == 0) {
    reflectionstyle = CERCIGNANILAMPIS;
    arginc = 9;
  } else error->all(FLERR,"Illegal fix wall/stochastic command");

  if (reflectionstyle != NONE) {

@@ -157,7 +164,6 @@ FixWallStochastic::FixWallStochastic(LAMMPS *lmp, int narg, char **arg) :
        else coord0[m] *= zscale;
      }
    }

  }
}

@@ -168,27 +174,22 @@ void FixWallStochastic::wall_particle(int m, int which, double coord)
  int i, dir, dim, side, sign;
  double vsave,factor,timecol,difftest,theta;

  
  double *rmass;
  double *mass = atom->mass;


  // coord = current position of wall
  // evaluate variable if necessary, wrap with clear/add


  double **x = atom->x;
  double **v = atom->v;
  int *mask = atom->mask;
  int *type = atom->type;
  int nlocal = atom->nlocal;


  dim = which / 2;
  side = which % 2;


    for (i = 0; i < nlocal; i++) 
  for (i = 0; i < nlocal; i++) {
    if (mask[i] & groupbit) {

      sign = 0;
@@ -252,3 +253,4 @@ void FixWallStochastic::wall_particle(int m, int which, double coord)
      }// if sign
    }// if mask
  }
}
+0 −8
Changes for src/USER-MISC/fix_wall_stochastic.h: 0 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -20,8 +20,6 @@ FixStyle(wall/stochastic,FixWallStochastic)
#ifndef LMP_FIX_WALL_STOCHASTIC_H
#define LMP_FIX_WALL_STOCHASTIC_H


#include "random_mars.h"
#include "fix_wall_reflect.h"

namespace LAMMPS_NS {
@@ -31,17 +29,11 @@ class FixWallStochastic : public FixWallReflect {
  FixWallStochastic(class LAMMPS *, int, char **);
  void wall_particle(int m,int which, double coord);





 protected:
  class RanMars *random;
  int seedfix;
  double walltemp[6],wallvel[6][3],wallaccom[6][3];
  int reflectionstyle;

  
};

}