address compilation failures

This commit is contained in:
Axel Kohlmeyer
2022-12-31 22:10:32 -05:00
parent 8016378241
commit 3a55a374a9
10 changed files with 62 additions and 8 deletions

View File

@ -33,7 +33,7 @@ enum{NOBIAS,BIAS};
FixNHEff::FixNHEff(LAMMPS *lmp, int narg, char **arg) : FixNH(lmp, narg, arg)
{
if (!atom->electron_flag)
error->all(FLERR,"Fix nvt/nph/npt/eff requires atom style electron");
error->all(FLERR,"Fix {} requires atom style electron", style);
}
/* ----------------------------------------------------------------------

View File

@ -42,8 +42,21 @@ FixNVTSllodEff::FixNVTSllodEff(LAMMPS *lmp, int narg, char **arg) :
// default values
psllod_flag = 0;
if (mtchain_default_flag) mtchain = 1;
// select SLLOD/p-SLLOD/g-SLLOD variant
int iarg = 3;
while (iarg < narg) {
if (strcmp(arg[iarg],"psllod") == 0) {
if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix nvt/sllod/eff psllod", error);
psllod_flag = utils::logical(FLERR,arg[iarg+1],false,lmp);
iarg += 2;
} else iarg++;
}
// create a new compute temp style
// id = fix-ID + temp

View File

@ -31,6 +31,7 @@ class FixNVTSllodEff : public FixNHEff {
private:
int nondeformbias;
int psllod_flag;
void nh_v_temp() override;
};

View File

@ -35,14 +35,26 @@ FixNVTSllodIntel::FixNVTSllodIntel(LAMMPS *lmp, int narg, char **arg) :
FixNHIntel(lmp, narg, arg)
{
if (!tstat_flag)
error->all(FLERR,"Temperature control must be used with fix nvt/sllod");
error->all(FLERR,"Temperature control must be used with fix nvt/sllod/intel");
if (pstat_flag)
error->all(FLERR,"Pressure control can not be used with fix nvt/sllod");
error->all(FLERR,"Pressure control can not be used with fix nvt/sllod/intel");
// default values
psllod_flag = 0;
if (mtchain_default_flag) mtchain = 1;
// select SLLOD/p-SLLOD/g-SLLOD variant
int iarg = 3;
while (iarg < narg) {
if (strcmp(arg[iarg],"psllod") == 0) {
if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix nvt/sllod/intel psllod", error);
psllod_flag = utils::logical(FLERR,arg[iarg+1],false,lmp);
iarg += 2;
} else iarg++;
}
// create a new compute temp style
// id = fix-ID + temp

View File

@ -36,6 +36,7 @@ class FixNVTSllodIntel : public FixNHIntel {
private:
int nondeformbias;
int psllod_flag; // 0 for SLLOD, 1 for p-SLLOD
void nh_v_temp() override;
};

View File

@ -47,12 +47,25 @@ FixNVTSllodKokkos<DeviceType>::FixNVTSllodKokkos(LAMMPS *lmp, int narg, char **a
this->domainKK = (DomainKokkos *) this->domain;
if (!this->tstat_flag)
this->error->all(FLERR,"Temperature control must be used with fix nvt/kk");
this->error->all(FLERR,"Temperature control must be used with fix nvt/sllod/kk");
if (this->pstat_flag)
this->error->all(FLERR,"Pressure control can not be used with fix nvt/kk");
this->error->all(FLERR,"Pressure control can not be used with fix nvt/sllod/kk");
this->psllod_flag = 0;
if (this->mtchain_default_flag) this->mtchain = 1;
// select SLLOD/p-SLLOD/g-SLLOD variant
int iarg = 3;
while (iarg < narg) {
if (strcmp(arg[iarg],"psllod") == 0) {
if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix nvt/sllod/kk psllod", this->error);
this->psllod_flag = utils::logical(FLERR,arg[iarg+1],false,this->lmp);
iarg += 2;
} else iarg++;
}
this->id_temp = utils::strdup(std::string(this->id)+"_temp");
this->modify->add_compute(fmt::format("{} all temp/deform/kk",this->id_temp));
this->tcomputeflag = 1;

View File

@ -50,6 +50,7 @@ class FixNVTSllodKokkos : public FixNHKokkos<DeviceType> {
private:
int nondeformbias;
int psllod_flag;
void nh_v_temp() override;

View File

@ -43,14 +43,26 @@ FixNVTSllodOMP::FixNVTSllodOMP(LAMMPS *lmp, int narg, char **arg) :
FixNHOMP(lmp, narg, arg)
{
if (!tstat_flag)
error->all(FLERR,"Temperature control must be used with fix nvt/sllod");
error->all(FLERR,"Temperature control must be used with fix nvt/sllod/omp");
if (pstat_flag)
error->all(FLERR,"Pressure control can not be used with fix nvt/sllod");
error->all(FLERR,"Pressure control can not be used with fix nvt/sllod/omp");
// default values
psllod_flag = 0;
if (mtchain_default_flag) mtchain = 1;
// select SLLOD/p-SLLOD/g-SLLOD variant
int iarg = 3;
while (iarg < narg) {
if (strcmp(arg[iarg],"psllod") == 0) {
if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix nvt/sllod/omp psllod", error);
psllod_flag = utils::logical(FLERR,arg[iarg+1],false,lmp);
iarg += 2;
} else iarg++;
}
// create a new compute temp style
// id = fix-ID + temp

View File

@ -31,6 +31,7 @@ class FixNVTSllodOMP : public FixNHOMP {
private:
int nondeformbias;
int psllod_flag; // 0 for SLLOD, 1 for p-SLLOD
void nh_v_temp() override;
};

View File

@ -363,7 +363,7 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) :
} else if (strcmp(arg[iarg],"psllod") == 0) {
iarg += 2;
} else error->all(FLERR,"Unknown fix nvt/npt/nph keyword: {}", arg[iarg]);
}