use get_(fix|compute)_by_id() instead of find_(fix|compute)()
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user