Commit 9dacbe5f authored by Steve Plimpton's avatar Steve Plimpton
Browse files

two other dirs depend on changed esph and desph

parent 5e619b65
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ FixMesoMove::FixMesoMove (LAMMPS *lmp, int narg, char **arg) :
  xvarstr(NULL), yvarstr(NULL), zvarstr(NULL),
  vxvarstr(NULL), vyvarstr(NULL), vzvarstr(NULL),
  xoriginal(NULL), displace(NULL), velocity(NULL) {
  if ((atom->e_flag != 1) || (atom->rho_flag != 1))
  if ((atom->esph_flag != 1) || (atom->rho_flag != 1))
    error->all(FLERR,
        "fix meso/move command requires atom_style with both energy and density");

@@ -393,8 +393,8 @@ void FixMesoMove::initial_integrate (int /*vflag*/) {
  double **vest = atom->vest;
  double *rho = atom->rho;
  double *drho = atom->drho;
  double *e = atom->e;
  double *de = atom->de;
  double *esph = atom->esph;
  double *desph = atom->desph;
  double **f = atom->f;
  double *rmass = atom->rmass;
  double *mass = atom->mass;
@@ -415,7 +415,7 @@ void FixMesoMove::initial_integrate (int /*vflag*/) {
        xold[1] = x[i][1];
        xold[2] = x[i][2];

        e[i] += dtf * de[i]; // half-step update of particle internal energy
        esph[i] += dtf * desph[i]; // half-step update of particle internal energy
        rho[i] += dtf * drho[i]; // ... and density

        if (vxflag) {
@@ -467,7 +467,7 @@ void FixMesoMove::initial_integrate (int /*vflag*/) {
        xold[1] = x[i][1];
        xold[2] = x[i][2];

        e[i] += dtf * de[i]; // half-step update of particle internal energy
        esph[i] += dtf * desph[i]; // half-step update of particle internal energy
        rho[i] += dtf * drho[i]; // ... and density

        if (axflag) {
@@ -535,7 +535,7 @@ void FixMesoMove::initial_integrate (int /*vflag*/) {
        xold[1] = x[i][1];
        xold[2] = x[i][2];

        e[i] += dtf * de[i]; // half-step update of particle internal energy
        esph[i] += dtf * desph[i]; // half-step update of particle internal energy
        rho[i] += dtf * drho[i]; // ... and density

        d[0] = xoriginal[i][0] - point[0];
@@ -757,8 +757,8 @@ void FixMesoMove::final_integrate () {

  double **v = atom->v;
  double **f = atom->f;
  double *e = atom->e;
  double *de = atom->de;
  double *esph = atom->esph;
  double *desph = atom->desph;
  double *rho = atom->rho;
  double *drho = atom->drho;
  double *rmass = atom->rmass;
@@ -773,7 +773,7 @@ void FixMesoMove::final_integrate () {

  for (int i = 0; i < nlocal; i++) {
    if (mask[i] & groupbit) {
      e[i] += dtf * de[i];
      esph[i] += dtf * desph[i];
      rho[i] += dtf * drho[i];

      if (xflag) {
+7 −7
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ FixRigidMeso::FixRigidMeso (LAMMPS *lmp, int narg, char **arg) :
FixRigid (lmp, narg, arg) {
  scalar_flag = 0;
  size_array_cols = 28;
  if ((atom->e_flag != 1) || (atom->rho_flag != 1))
  if ((atom->esph_flag != 1) || (atom->rho_flag != 1))
    error->all (FLERR, "fix rigid/meso command requires atom_style with"
                " both energy and density");

@@ -247,8 +247,8 @@ void FixRigidMeso::set_xv () {
  double **v = atom->v;
  double **vest = atom->vest;
  double **f = atom->f;
  double *e = atom->e;
  double *de = atom->de;
  double *esph = atom->esph;
  double *desph = atom->desph;
  double *rho = atom->rho;
  double *drho = atom->drho;
  double *rmass = atom->rmass;
@@ -272,7 +272,7 @@ void FixRigidMeso::set_xv () {
    if (body[i] < 0) continue;

    // half-step update of particle internal energy and density
    e[i] += dtf * de[i];
    esph[i] += dtf * desph[i];
    rho[i] += dtf * drho[i];

    ibody = body[i];
@@ -377,8 +377,8 @@ void FixRigidMeso::set_v () {
  double **x = atom->x;
  double **v = atom->v;
  double **f = atom->f;
  double *e = atom->e;
  double *de = atom->de;
  double *esph = atom->esph;
  double *desph = atom->desph;
  double *rho = atom->rho;
  double *drho = atom->drho;
  double *rmass = atom->rmass;
@@ -401,7 +401,7 @@ void FixRigidMeso::set_v () {
    if (body[i] < 0) continue;

    // half-step update of particle internal energy and density
    e[i] += dtf * de[i];
    esph[i] += dtf * desph[i];
    rho[i] += dtf * drho[i];

    const int ibody = body[i];
+15 −15
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ AtomVecSMD::AtomVecSMD(LAMMPS *lmp) : AtomVec(lmp)
  atom->contact_radius_flag = 1;
  atom->molecule_flag = 1;
  atom->smd_data_9_flag = 1;
  atom->e_flag = 1;
  atom->esph_flag = 1;
  atom->vest_flag = 1;
  atom->smd_stress_flag = 1;
  atom->eff_plastic_strain_flag = 1;
@@ -62,32 +62,32 @@ AtomVecSMD::AtomVecSMD(LAMMPS *lmp) : AtomVec(lmp)
  // except: fields_data_atom & fields_data_vel must match data file

  fields_grow = (char *) 
    "e de vfrac rmass x0 radius contact_radius molecule "
    "esph desph vfrac rmass x0 radius contact_radius molecule "
    "smd_data_9 vest smd_stress "
    "eff_plastic_strain eff_plastic_strain_rate damage";
  fields_copy = (char *) 
    "e vfrac rmass x0 radius contact_radius molecule "
    "esph vfrac rmass x0 radius contact_radius molecule "
    "eff_plastic_strain eff_plastic_strain_rate vest "
    "smd_data_9 smd_stress damage";
  fields_comm = (char *) "radius vfrac vest e";
  fields_comm_vel = (char *) "radius vfrac vest e";
  fields_reverse = (char *) "de";
  fields_comm = (char *) "radius vfrac vest esph";
  fields_comm_vel = (char *) "radius vfrac vest esph";
  fields_reverse = (char *) "desph";
  fields_border = (char *) 
    "x0 molecule radius rmass vfrac contact_radius e "
    "x0 molecule radius rmass vfrac contact_radius esph "
    "eff_plastic_strain smd_data_9 smd_stress";
  fields_border_vel = (char *) 
    "x0 molecule radius rmass vfrac contact_radius e "
    "x0 molecule radius rmass vfrac contact_radius esph "
    "eff_plastic_strain smd_data_9 smd_stress vest";
  fields_exchange = (char *) 
    "x0 molecule radius rmass vfrac contact_radius e "
    "x0 molecule radius rmass vfrac contact_radius esph "
    "eff_plastic_strain eff_plastic_strain_rate smd_data_9 smd_stress "
    "vest damage";
  fields_restart = (char *) 
    "x0 molecule radius rmass vfrac contact_radius e "
    "x0 molecule radius rmass vfrac contact_radius esph "
    "eff_plastic_strain eff_plastic_strain_rate smd_data_9 smd_stress "
    "vest damage";
  fields_create = (char *) 
    "x0 vest vfrac rmass radius contact_radius molecule e "
    "x0 vest vfrac rmass radius contact_radius molecule esph "
    "eff_plastic_strain eff_plastic_strain_rate smd_data_9 smd_stress damage";
  fields_data_atom = (char *) 
    "id type molecule vfrac rmass radius contact_radius x0 x";
@@ -108,8 +108,8 @@ AtomVecSMD::AtomVecSMD(LAMMPS *lmp) : AtomVec(lmp)

void AtomVecSMD::grow_pointers()
{
  e = atom->e;
  de = atom->de;
  esph = atom->esph;
  desph = atom->desph;
  vfrac = atom->vfrac;
  rmass = atom->rmass;
  x0 = atom->x0;
@@ -132,7 +132,7 @@ void AtomVecSMD::grow_pointers()

void AtomVecSMD::force_clear(int n, size_t nbytes) 
{
  memset(&de[n],0,nbytes);
  memset(&desph[n],0,nbytes);
  memset(&f[n][0],0,3*nbytes);
}

@@ -164,7 +164,7 @@ void AtomVecSMD::create_atom_post(int ilocal)

void AtomVecSMD::data_atom_post(int ilocal)
{
  e[ilocal] = 0.0;
  esph[ilocal] = 0.0;
  x0[ilocal][0] = x[ilocal][0];
  x0[ilocal][1] = x[ilocal][1];
  x0[ilocal][2] = x[ilocal][2];
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ class AtomVecSMD : public AtomVec {

 private:
  int *molecule;
  double *e,*de,*vfrac,*rmass,*radius,*contact_radius;
  double *esph,*desph,*vfrac,*rmass,*radius,*contact_radius;
  double *eff_plastic_strain,*eff_plastic_strain_rate,*damage;
  double **x0,**smd_data_9,**smd_stress,**vest;
};
+3 −3
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ ComputeSMDInternalEnergy::ComputeSMDInternalEnergy(LAMMPS *lmp, int narg, char *
  Compute(lmp, narg, arg)
{
  if (narg != 3) error->all(FLERR,"Illegal compute smd/internal_energy command");
  if (atom->e_flag != 1) error->all(FLERR,"compute smd/internal_energy command requires atom_style with internal_energy (e.g. smd)");
  if (atom->esph_flag != 1) error->all(FLERR,"compute smd/internal_energy command requires atom_style with internal_energy (e.g. smd)");

  peratom_flag = 1;
  size_peratom_cols = 0;
@@ -83,13 +83,13 @@ void ComputeSMDInternalEnergy::compute_peratom()
    vector_atom = internal_energy_vector;
  }

  double *e = atom->e;
  double *esph = atom->esph;
  int *mask = atom->mask;
  int nlocal = atom->nlocal;

    for (int i = 0; i < nlocal; i++) {
      if (mask[i] & groupbit) {
              internal_energy_vector[i] = e[i];
              internal_energy_vector[i] = esph[i];
      }
      else {
              internal_energy_vector[i] = 0.0;
Loading