consistently print error when box has changed to triclinic without redefining kspace style
This commit is contained in:
@ -124,8 +124,7 @@ void PPPMDispIntel::init()
|
||||
|
||||
_use_lrt = fix->lrt();
|
||||
if (_use_lrt)
|
||||
error->all(FLERR,
|
||||
"LRT mode is currently not supported for pppm/disp/intel");
|
||||
error->all(FLERR, "LRT mode is currently not supported for pppm/disp/intel");
|
||||
|
||||
|
||||
// For vectorization, we need some padding in the end
|
||||
@ -142,19 +141,15 @@ void PPPMDispIntel::init()
|
||||
if (_use_table) {
|
||||
rho_points = 5000;
|
||||
memory->destroy(rho_lookup);
|
||||
memory->create(rho_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER,
|
||||
"pppmdispintel:rho_lookup");
|
||||
memory->create(rho_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER,"pppmdispintel:rho_lookup");
|
||||
memory->destroy(rho6_lookup);
|
||||
memory->create(rho6_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER,
|
||||
"pppmdispintel:rho6_lookup");
|
||||
memory->create(rho6_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER,"pppmdispintel:rho6_lookup");
|
||||
|
||||
if (differentiation_flag == 1) {
|
||||
memory->destroy(drho_lookup);
|
||||
memory->create(drho_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER,
|
||||
"pppmdispintel:drho_lookup");
|
||||
memory->create(drho_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER,"pppmdispintel:drho_lookup");
|
||||
memory->destroy(drho6_lookup);
|
||||
memory->create(drho6_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER,
|
||||
"pppmdispintel:drho6_lookup");
|
||||
memory->create(drho6_lookup, rho_points, INTEL_P3M_ALIGNED_MAXORDER,"pppmdispintel:drho6_lookup");
|
||||
}
|
||||
precompute_rho();
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ PPPMKokkos<DeviceType>::~PPPMKokkos()
|
||||
template<class DeviceType>
|
||||
void PPPMKokkos<DeviceType>::init()
|
||||
{
|
||||
if (me == 0) utils::logmesg(lmp,"PPPM initialization ...\n");
|
||||
if (me == 0) utils::logmesg(lmp,"PPPM Kokkos initialization ...\n");
|
||||
|
||||
// error check
|
||||
|
||||
@ -146,6 +146,10 @@ void PPPMKokkos<DeviceType>::init()
|
||||
error->all(FLERR,"Cannot (yet) use PPPM Kokkos with 'kspace_modify diff ad'");
|
||||
|
||||
triclinic_check();
|
||||
|
||||
if (triclinic != domain->triclinic)
|
||||
error->all(FLERR,"Must redefine kspace_style after changing to triclinic box");
|
||||
|
||||
if (domain->triclinic && slabflag)
|
||||
error->all(FLERR,"Cannot (yet) use PPPM with triclinic box and slab correction");
|
||||
if (domain->dimension == 2)
|
||||
|
||||
@ -242,12 +242,12 @@ void PPPMDisp::settings(int narg, char **arg)
|
||||
|
||||
PPPMDisp::~PPPMDisp()
|
||||
{
|
||||
delete [] factors;
|
||||
delete [] B;
|
||||
delete[] factors;
|
||||
delete[] B;
|
||||
B = nullptr;
|
||||
delete [] cii;
|
||||
delete[] cii;
|
||||
cii = nullptr;
|
||||
delete [] csumi;
|
||||
delete[] csumi;
|
||||
csumi = nullptr;
|
||||
PPPMDisp::deallocate();
|
||||
PPPMDisp::deallocate_peratom();
|
||||
@ -268,6 +268,9 @@ void PPPMDisp::init()
|
||||
|
||||
triclinic_check();
|
||||
|
||||
if (triclinic != domain->triclinic)
|
||||
error->all(FLERR,"Must redefine kspace_style after changing to triclinic box");
|
||||
|
||||
if (domain->dimension == 2)
|
||||
error->all(FLERR,"Cannot use PPPMDisp with 2d simulation");
|
||||
if (comm->style != Comm::BRICK)
|
||||
@ -1277,7 +1280,7 @@ void PPPMDisp::init_coeffs()
|
||||
int n = atom->ntypes;
|
||||
int converged;
|
||||
|
||||
delete [] B;
|
||||
delete[] B;
|
||||
B = nullptr;
|
||||
|
||||
// no mixing rule or arithmetic
|
||||
@ -3352,10 +3355,10 @@ void PPPMDisp::calc_csum()
|
||||
int ntypes = atom->ntypes;
|
||||
int i,j,k;
|
||||
|
||||
delete [] cii;
|
||||
delete[] cii;
|
||||
cii = new double[ntypes+1];
|
||||
for (i = 0; i<=ntypes; i++) cii[i] = 0.0;
|
||||
delete [] csumi;
|
||||
delete[] csumi;
|
||||
csumi = new double[ntypes+1];
|
||||
for (i = 0; i<=ntypes; i++) csumi[i] = 0.0;
|
||||
int *neach = new int[ntypes+1];
|
||||
@ -3447,8 +3450,8 @@ void PPPMDisp::calc_csum()
|
||||
}
|
||||
}
|
||||
|
||||
delete [] neach;
|
||||
delete [] neach_all;
|
||||
delete[] neach;
|
||||
delete[] neach_all;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -6538,9 +6541,9 @@ void PPPMDisp::fieldforce_none_ik()
|
||||
}
|
||||
}
|
||||
|
||||
delete [] ekx;
|
||||
delete [] eky;
|
||||
delete [] ekz;
|
||||
delete[] ekx;
|
||||
delete[] eky;
|
||||
delete[] ekz;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -6660,9 +6663,9 @@ void PPPMDisp::fieldforce_none_ad()
|
||||
}
|
||||
}
|
||||
|
||||
delete [] ekx;
|
||||
delete [] eky;
|
||||
delete [] ekz;
|
||||
delete[] ekx;
|
||||
delete[] eky;
|
||||
delete[] ekz;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -6756,13 +6759,13 @@ void PPPMDisp::fieldforce_none_peratom()
|
||||
}
|
||||
}
|
||||
|
||||
delete [] u_pa;
|
||||
delete [] v0;
|
||||
delete [] v1;
|
||||
delete [] v2;
|
||||
delete [] v3;
|
||||
delete [] v4;
|
||||
delete [] v5;
|
||||
delete[] u_pa;
|
||||
delete[] v0;
|
||||
delete[] v1;
|
||||
delete[] v2;
|
||||
delete[] v3;
|
||||
delete[] v4;
|
||||
delete[] v5;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user