two other dirs depend on changed esph and desph

This commit is contained in:
Steve Plimpton
2020-04-30 21:22:19 -06:00
parent 5e619b65f6
commit 9dacbe5f46
9 changed files with 53 additions and 53 deletions

View File

@ -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) {

View File

@ -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];

View File

@ -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];

View File

@ -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;
};

View File

@ -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;

View File

@ -203,8 +203,8 @@ void FixSMDIntegrateTlsph::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 *rmass = atom->rmass;
int *mask = atom->mask;
int nlocal = atom->nlocal;
@ -231,7 +231,7 @@ void FixSMDIntegrateTlsph::final_integrate() {
}
}
e[i] += dtv * de[i];
esph[i] += dtv * desph[i];
}
}
}

View File

@ -42,7 +42,7 @@ using namespace FixConst;
FixSMDIntegrateUlsph::FixSMDIntegrateUlsph(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg) {
if ((atom->e_flag != 1) || (atom->vfrac_flag != 1))
if ((atom->esph_flag != 1) || (atom->vfrac_flag != 1))
error->all(FLERR, "fix smd/integrate_ulsph command requires atom_style with both energy and volume");
if (narg < 3)
@ -239,8 +239,8 @@ void FixSMDIntegrateUlsph::initial_integrate(int /*vflag*/) {
void FixSMDIntegrateUlsph::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 *vfrac = atom->vfrac;
double *radius = atom->radius;
double *contact_radius = atom->contact_radius;
@ -286,7 +286,7 @@ void FixSMDIntegrateUlsph::final_integrate() {
}
}
e[i] += dtf * de[i];
esph[i] += dtf * desph[i];
if (adjust_radius_flag) {
if (nn[i] < min_nn) {

View File

@ -418,7 +418,7 @@ void PairTlsph::ComputeForces(int eflag, int vflag) {
double **x0 = atom->x0;
double **f = atom->f;
double *vfrac = atom->vfrac;
double *de = atom->de;
double *desph = atom->desph;
double *rmass = atom->rmass;
double *radius = atom->radius;
double *damage = atom->damage;
@ -592,7 +592,7 @@ void PairTlsph::ComputeForces(int eflag, int vflag) {
f[i][0] += sumForces(0);
f[i][1] += sumForces(1);
f[i][2] += sumForces(2);
de[i] += deltaE;
desph[i] += deltaE;
// tally atomistic stress tensor
if (evflag) {
@ -703,7 +703,7 @@ void PairTlsph::AssembleStress() {
double *damage = atom->damage;
double *rmass = atom->rmass;
double *vfrac = atom->vfrac;
double *e = atom->e;
double *esph = atom->esph;
double pInitial, d_iso, pFinal, p_rate, plastic_strain_increment;
int i, itype;
int nlocal = atom->nlocal;
@ -745,7 +745,7 @@ void PairTlsph::AssembleStress() {
d_iso = D[i].trace(); // volumetric part of stretch rate
d_dev = Deviator(D[i]); // deviatoric part of stretch rate
strain = 0.5 * (Fincr[i].transpose() * Fincr[i] - eye);
mass_specific_energy = e[i] / rmass[i]; // energy per unit mass
mass_specific_energy = esph[i] / rmass[i]; // energy per unit mass
rho = rmass[i] / (detF[i] * vfrac[i]);
vol_specific_energy = mass_specific_energy * rho; // energy per current volume
@ -2034,12 +2034,12 @@ void PairTlsph::ComputeStressDeviator(const int i, const Matrix3d sigmaInitial_d
int *type = atom->type;
double *rmass = atom->rmass;
//double *vfrac = atom->vfrac;
double *e = atom->e;
double *esph = atom->esph;
double dt = update->dt;
double yieldStress;
int itype;
double mass_specific_energy = e[i] / rmass[i]; // energy per unit mass
double mass_specific_energy = esph[i] / rmass[i]; // energy per unit mass
plastic_strain_increment = 0.0;
itype = type[i];

View File

@ -357,7 +357,7 @@ void PairULSPH::compute(int eflag, int vflag) {
double **vint = atom->v; // Velocity-Verlet algorithm velocities
double **f = atom->f;
double *vfrac = atom->vfrac;
double *de = atom->de;
double *desph = atom->desph;
double *rmass = atom->rmass;
double *radius = atom->radius;
double *contact_radius = atom->contact_radius;
@ -586,7 +586,7 @@ void PairULSPH::compute(int eflag, int vflag) {
f[i][0] += sumForces(0);
f[i][1] += sumForces(1);
f[i][2] += sumForces(2);
de[i] += deltaE;
desph[i] += deltaE;
// accumulate smooth velocities
shepardWeight[i] += jvol * wf;
@ -597,7 +597,7 @@ void PairULSPH::compute(int eflag, int vflag) {
f[j][0] -= sumForces(0);
f[j][1] -= sumForces(1);
f[j][2] -= sumForces(2);
de[j] += deltaE;
desph[j] += deltaE;
shepardWeight[j] += ivol * wf;
smoothVel[j] -= ivol * wf * dvint;
@ -639,7 +639,7 @@ void PairULSPH::AssembleStressTensor() {
double *rmass = atom->rmass;
double *eff_plastic_strain = atom->eff_plastic_strain;
double **tlsph_stress = atom->smd_stress;
double *e = atom->e;
double *esph = atom->esph;
int *type = atom->type;
int i, itype;
int nlocal = atom->nlocal;
@ -686,7 +686,7 @@ void PairULSPH::AssembleStressTensor() {
break;
case EOS_PERFECT_GAS:
PerfectGasEOS(Lookup[EOS_PERFECT_GAS_GAMMA][itype], vol, rmass[i], e[i], newPressure, c0[i]);
PerfectGasEOS(Lookup[EOS_PERFECT_GAS_GAMMA][itype], vol, rmass[i], esph[i], newPressure, c0[i]);
break;
case EOS_LINEAR:
newPressure = Lookup[BULK_MODULUS][itype] * (rho / Lookup[REFERENCE_DENSITY][itype] - 1.0);