use get_(fix|compute)_by_id() instead of find_(fix|compute)()

This commit is contained in:
Axel Kohlmeyer
2021-10-20 02:47:26 -04:00
parent 8cd4460c62
commit 2e362b1f3f
10 changed files with 268 additions and 345 deletions

View File

@ -157,8 +157,7 @@ void Min::init()
// detect if fix omp is present for clearing force arrays
int ifix = modify->find_fix("package_omp");
if (ifix >= 0) external_force_clear = 1;
if (modify->get_fix_by_id("package_omp")) external_force_clear = 1;
// set flags for arrays to clear in force_clear()
@ -230,9 +229,8 @@ void Min::setup(int flag)
// compute for potential energy
int id = modify->find_compute("thermo_pe");
if (id < 0) error->all(FLERR,"Minimization could not find thermo_pe compute");
pe_compute = modify->compute[id];
pe_compute = modify->get_compute_by_id("thermo_pe");
if (!pe_compute) error->all(FLERR,"Minimization could not find thermo_pe compute");
// style-specific setup does two tasks
// setup extra global dof vectors