disallow usage of qeq fixes with incompatible GPU and USER-INTEL packages

This commit is contained in:
Axel Kohlmeyer
2021-04-20 14:51:05 -04:00
parent 799fb284c8
commit fe2efa4cb3
3 changed files with 11 additions and 3 deletions

View File

@ -24,6 +24,8 @@
#include "force.h"
#include "memory.h"
#include "neigh_list.h"
#include "pair.h"
#include "suffix.h"
#include "text_file_reader.h"
#include "update.h"
@ -300,6 +302,12 @@ void FixQEq::setup_pre_force(int vflag)
if (force->newton_pair == 0)
error->all(FLERR,"QEQ with 'newton pair off' not supported");
if (force->pair) {
if (force->pair->suffix_flag & (Suffix::INTEL|Suffix::GPU))
error->all(FLERR,"QEQ is not compatiple with suffix version "
"of pair style");
}
deallocate_storage();
allocate_storage();

View File

@ -28,6 +28,8 @@ class Pair : protected Pointers {
friend class FixGPU;
friend class FixIntel;
friend class FixOMP;
friend class FixQEq;
friend class PairHybrid;
friend class ThrOMP;
friend class Info;

View File

@ -948,9 +948,7 @@ void PairHybrid::modify_special(int m, int /*narg*/, char **arg)
special[2] = utils::numeric(FLERR,arg[2],false,lmp);
special[3] = utils::numeric(FLERR,arg[3],false,lmp);
// have to cast to PairHybrid to work around C++ access restriction
if (((PairHybrid *)styles[m])->suffix_flag & (Suffix::INTEL|Suffix::GPU))
if (styles[m]->suffix_flag & (Suffix::INTEL|Suffix::GPU))
error->all(FLERR,"Pair_modify special is not compatible with "
"suffix version of hybrid substyle");