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