Fix bug with v remap option in Kokkos fix deform
This commit is contained in:
@ -27,14 +27,8 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
DomainKokkos::DomainKokkos(LAMMPS *lmp) : Domain(lmp) {}
|
DomainKokkos::DomainKokkos(LAMMPS *lmp) : Domain(lmp) {
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
void DomainKokkos::init()
|
|
||||||
{
|
|
||||||
atomKK = (AtomKokkos *) atom;
|
atomKK = (AtomKokkos *) atom;
|
||||||
Domain::init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|||||||
@ -30,7 +30,6 @@ class DomainKokkos : public Domain {
|
|||||||
public:
|
public:
|
||||||
DomainKokkos(class LAMMPS *);
|
DomainKokkos(class LAMMPS *);
|
||||||
~DomainKokkos() {}
|
~DomainKokkos() {}
|
||||||
void init();
|
|
||||||
void reset_box();
|
void reset_box();
|
||||||
void pbc();
|
void pbc();
|
||||||
void remap_all();
|
void remap_all();
|
||||||
|
|||||||
@ -38,7 +38,7 @@ using namespace LAMMPS_NS;
|
|||||||
using namespace FixConst;
|
using namespace FixConst;
|
||||||
using namespace MathConst;
|
using namespace MathConst;
|
||||||
|
|
||||||
enum{NONE,FINAL,DELTA,SCALE,VEL,ERATE,TRATE,VOLUME,WIGGLE,VARIABLE};
|
enum{NONE=0,FINAL,DELTA,SCALE,VEL,ERATE,TRATE,VOLUME,WIGGLE,VARIABLE};
|
||||||
enum{ONE_FROM_ONE,ONE_FROM_TWO,TWO_FROM_ONE};
|
enum{ONE_FROM_ONE,ONE_FROM_TWO,TWO_FROM_ONE};
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -143,7 +143,7 @@ void FixDeformKokkos::end_of_step()
|
|||||||
// set new box size for VOLUME dims that are linked to other dims
|
// set new box size for VOLUME dims that are linked to other dims
|
||||||
// NOTE: still need to set h_rate for these dims
|
// NOTE: still need to set h_rate for these dims
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
if (set[i].style != VOLUME) continue;
|
if (set[i].style != VOLUME) continue;
|
||||||
|
|
||||||
if (set[i].substyle == ONE_FROM_ONE) {
|
if (set[i].substyle == ONE_FROM_ONE) {
|
||||||
@ -227,7 +227,7 @@ void FixDeformKokkos::end_of_step()
|
|||||||
// tilt_target can be large positive or large negative value
|
// tilt_target can be large positive or large negative value
|
||||||
// add/subtract box lengths until tilt_target is closest to current value
|
// add/subtract box lengths until tilt_target is closest to current value
|
||||||
|
|
||||||
int idenom;
|
int idenom = 0;
|
||||||
if (i == 5) idenom = 0;
|
if (i == 5) idenom = 0;
|
||||||
else if (i == 4) idenom = 0;
|
else if (i == 4) idenom = 0;
|
||||||
else if (i == 3) idenom = 1;
|
else if (i == 3) idenom = 1;
|
||||||
|
|||||||
@ -175,7 +175,7 @@ void Domain::init()
|
|||||||
|
|
||||||
deform_flag = deform_vremap = deform_groupbit = 0;
|
deform_flag = deform_vremap = deform_groupbit = 0;
|
||||||
for (int i = 0; i < modify->nfix; i++)
|
for (int i = 0; i < modify->nfix; i++)
|
||||||
if (strcmp(modify->fix[i]->style,"deform") == 0) {
|
if (utils::strmatch(modify->fix[i]->style,"^deform")) {
|
||||||
deform_flag = 1;
|
deform_flag = 1;
|
||||||
if (((FixDeform *) modify->fix[i])->remapflag == Domain::V_REMAP) {
|
if (((FixDeform *) modify->fix[i])->remapflag == Domain::V_REMAP) {
|
||||||
deform_vremap = 1;
|
deform_vremap = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user