Adding errors to unpatched uses of vest with vremap

This commit is contained in:
jtclemm
2024-07-25 17:51:48 -06:00
parent 6abbbdba6c
commit 49b377fc3d
7 changed files with 37 additions and 0 deletions

View File

@ -65,6 +65,11 @@ void FixMvvDPD::init()
if (!atom->vest_flag) if (!atom->vest_flag)
error->all(FLERR,"Fix mvv/dpd requires atom attribute vest e.g. from atom style mdpd"); error->all(FLERR,"Fix mvv/dpd requires atom attribute vest e.g. from atom style mdpd");
// Cannot use vremap since its effects aren't propagated to vest
// see RHEO or SPH packages for examples patches
if (domain->deform_vremap)
error->all(FLERR, "Fix mvv/dpd cannot be used with velocity remapping");
if (!force->pair_match("^mdpd",0) && !force->pair_match("^dpd",0)) { if (!force->pair_match("^mdpd",0) && !force->pair_match("^dpd",0)) {
if (force->pair_match("^hybrid",0)) { if (force->pair_match("^hybrid",0)) {
if (!(force->pair_match("^mdpd",0,1) || force->pair_match("^dpd",0),1)) { if (!(force->pair_match("^mdpd",0,1) || force->pair_match("^dpd",0),1)) {

View File

@ -73,6 +73,11 @@ void FixMvvEDPD::init()
{ {
if (!atom->edpd_flag) error->all(FLERR,"Fix mvv/edpd requires atom style edpd"); if (!atom->edpd_flag) error->all(FLERR,"Fix mvv/edpd requires atom style edpd");
// Cannot use vremap since its effects aren't propagated to vest
// see RHEO or SPH packages for examples patches
if (domain->deform_vremap)
error->all(FLERR, "Fix mvv/edpd cannot be used with velocity remapping");
if (!force->pair_match("^edpd",0)) { if (!force->pair_match("^edpd",0)) {
if (force->pair_match("^hybrid",0)) { if (force->pair_match("^hybrid",0)) {
if (!force->pair_match("^edpd",0,1)) { if (!force->pair_match("^edpd",0,1)) {

View File

@ -71,6 +71,11 @@ void FixMvvTDPD::init()
{ {
if (!atom->tdpd_flag) error->all(FLERR,"Fix mvv/tdpd requires atom style tdpd"); if (!atom->tdpd_flag) error->all(FLERR,"Fix mvv/tdpd requires atom style tdpd");
// Cannot use vremap since its effects aren't propagated to vest
// see RHEO or SPH packages for examples patches
if (domain->deform_vremap)
error->all(FLERR, "Fix mvv/tdpd cannot be used with velocity remapping");
if (!force->pair_match("^tdpd",0)) { if (!force->pair_match("^tdpd",0)) {
if (force->pair_match("^hybrid",0)) { if (force->pair_match("^hybrid",0)) {
if (!force->pair_match("^tdpd",0,1)) { if (!force->pair_match("^tdpd",0,1)) {

View File

@ -350,7 +350,14 @@ void FixMesoMove::init () {
} }
void FixMesoMove::setup_pre_force (int /*vflag*/) { void FixMesoMove::setup_pre_force (int /*vflag*/) {
// Cannot use vremap since its effects aren't propagated to vest
// see RHEO or SPH packages for examples patches
if (domain->deform_vremap)
error->all(FLERR, "Fix meso/move cannot be used with velocity remapping");
// set vest equal to v // set vest equal to v
double **v = atom->v; double **v = atom->v;
double **vest = atom->vest; double **vest = atom->vest;
int *mask = atom->mask; int *mask = atom->mask;

View File

@ -92,6 +92,11 @@ void FixRigidMeso::setup (int vflag) {
conjqm[ibody][2] *= 2.0; conjqm[ibody][2] *= 2.0;
conjqm[ibody][3] *= 2.0; conjqm[ibody][3] *= 2.0;
} }
// Cannot use vremap since its effects aren't propagated to vest
// see RHEO or SPH packages for examples patches
if (domain->deform_vremap)
error->all(FLERR, "Fix rigid/meso cannot be used with velocity remapping");
} }
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------

View File

@ -115,6 +115,11 @@ void FixSMDIntegrateTlsph::init() {
dtv = update->dt; dtv = update->dt;
dtf = 0.5 * update->dt * force->ftm2v; dtf = 0.5 * update->dt * force->ftm2v;
vlimitsq = vlimit * vlimit; vlimitsq = vlimit * vlimit;
// Cannot use vremap since its effects aren't propagated to vest
// see RHEO or SPH packages for examples patches
if (domain->deform_vremap)
error->all(FLERR, "Fix smd/integrate_tlsph cannot be used with velocity remapping");
} }
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------

View File

@ -144,6 +144,11 @@ void FixSMDIntegrateUlsph::init() {
dtv = update->dt; dtv = update->dt;
dtf = 0.5 * update->dt * force->ftm2v; dtf = 0.5 * update->dt * force->ftm2v;
vlimitsq = vlimit * vlimit; vlimitsq = vlimit * vlimit;
// Cannot use vremap since its effects aren't propagated to vest
// see RHEO or SPH packages for examples patches
if (domain->deform_vremap)
error->all(FLERR, "Fix smd/integrate_ulsph cannot be used with velocity remapping");
} }
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------