Skip to content
Snippets Groups Projects
Commit 71f69912 authored by Stan Moore's avatar Stan Moore
Browse files

Small tweaks to fix_enforce2d_kokkos

parent 5d133214
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,7 @@ FixEnforce2DKokkos<DeviceType>::FixEnforce2DKokkos(LAMMPS *lmp, int narg, char *
execution_space = ExecutionSpaceFromDevice<DeviceType>::space;
datamask_read = V_MASK | F_MASK | OMEGA_MASK | MASK_MASK
| TORQUE_MASK | ANGMOM_MASK; // | */ // MASK_MASK;
| TORQUE_MASK | ANGMOM_MASK;
datamask_modify = V_MASK | F_MASK | OMEGA_MASK
| TORQUE_MASK | ANGMOM_MASK;
......@@ -52,7 +52,6 @@ template <class DeviceType>
void FixEnforce2DKokkos<DeviceType>::post_force(int vflag)
{
atomKK->sync(execution_space,datamask_read);
atomKK->modified(execution_space,datamask_modify);
v = atomKK->k_v.view<DeviceType>();
f = atomKK->k_f.view<DeviceType>();
......@@ -120,16 +119,18 @@ void FixEnforce2DKokkos<DeviceType>::post_force(int vflag)
break;
}
default:
error->all(FLERR, "flag_mask outside of what it should be");
error->all(FLERR, "Flag in fix_enforce2d_kokkos outside of what it should be");
}
copymode = 0;
// Probably sync here again?
atomKK->sync(execution_space,datamask_read);
atomKK->modified(execution_space,datamask_modify);
for (int m = 0; m < nfixlist; m++)
for (int m = 0; m < nfixlist; m++) {
atomKK->sync(flist[m]->execution_space,flist[m]->datamask_read);
flist[m]->enforce2d();
atomKK->modified(flist[m]->execution_space,flist[m]->datamask_modify);
}
}
......@@ -138,7 +139,6 @@ template <int omega_flag, int angmom_flag, int torque_flag>
void FixEnforce2DKokkos<DeviceType>::post_force_item( int i ) const
{
if (mask[i] & groupbit){
// x(i,2) = 0; // Enforce2d does not set x[2] to zero either... :/
v(i,2) = 0.0;
f(i,2) = 0.0;
......
......@@ -32,7 +32,6 @@ class FixEnforce2DKokkos : public FixEnforce2D {
public:
FixEnforce2DKokkos(class LAMMPS *, int, char **);
// ~FixEnforce2DKokkos() {}
// void init();
void setup(int);
void post_force(int);
......@@ -78,18 +77,8 @@ struct FixEnforce2DKokkosPostForceFunctor {
/* ERROR/WARNING messages:
E: Illegal ... command
E: Flag in fix_enforce2d_kokkos outside of what it should be
Self-explanatory. Check the input script syntax and compare to the
documentation for the command. You can use -echo screen as a
command-line option when running LAMMPS to see the offending line.
E: Cannot use fix enforce2d with 3d simulation
Self-explanatory.
E: Fix enforce2d must be defined after fix %s
UNDOCUMENTED
LAMMPS developer-only error.
*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment