avoid direct access to internal data of Modify class instance
This commit is contained in:
@ -108,15 +108,14 @@ int FixThermalConductivity::setmask()
|
||||
|
||||
void FixThermalConductivity::init()
|
||||
{
|
||||
// warn if any fix ave/spatial comes after this fix
|
||||
// warn if any fix ave/chunk comes after this fix
|
||||
// can cause glitch in averaging since ave will happen after swap
|
||||
|
||||
int foundme = 0;
|
||||
for (int i = 0; i < modify->nfix; i++) {
|
||||
if (modify->fix[i] == this) foundme = 1;
|
||||
if (foundme && strcmp(modify->fix[i]->style,"ave/spatial") == 0 && me == 0)
|
||||
error->warning(FLERR,
|
||||
"Fix thermal/conductivity comes before fix ave/spatial");
|
||||
for (const auto &ifix : modify->get_fix_list()) {
|
||||
if (ifix == this) foundme = 1;
|
||||
if (foundme && utils::strmatch(ifix->style,"^ave/chunk") && (me == 0))
|
||||
error->warning(FLERR, "Fix thermal/conductivity comes before fix ave/chunk");
|
||||
}
|
||||
|
||||
// set bounds of 2 slabs in edim
|
||||
|
||||
Reference in New Issue
Block a user