@@ -43,7 +43,7 @@ ComputePressureBocs::ComputePressureBocs(LAMMPS *lmp, int narg, char **arg) :
4343 vptr(nullptr ), id_temp(nullptr )
4444{
4545 if (narg < 4 ) utils::missing_cmd_args (FLERR," compute pressure/bocs" , error);
46- if (igroup) error->all (FLERR," Compute pressure/bocs must use group all" );
46+ if (igroup) error->all (FLERR, 1 , " Compute pressure/bocs must use group all" );
4747
4848 scalar_flag = vector_flag = 1 ;
4949 size_vector = 6 ;
@@ -64,9 +64,9 @@ ComputePressureBocs::ComputePressureBocs(LAMMPS *lmp, int narg, char **arg) :
6464
6565 temperature = modify->get_compute_by_id (id_temp);
6666 if (!temperature)
67- error->all (FLERR," Could not find compute pressure/bocs temperature compute {}" , id_temp);
67+ error->all (FLERR, 3 , " Could not find compute pressure/bocs temperature compute {}" , id_temp);
6868 if (temperature->tempflag == 0 )
69- error->all (FLERR," Compute pressure/bocs temperature compute {} does not compute "
69+ error->all (FLERR, 3 , " Compute pressure/bocs temperature compute {} does not compute "
7070 " temperature" , id_temp);
7171 }
7272
@@ -104,8 +104,8 @@ ComputePressureBocs::ComputePressureBocs(LAMMPS *lmp, int narg, char **arg) :
104104 // error check
105105
106106 if (keflag && id_temp == nullptr )
107- error->all (FLERR," Compute pressure/bocs requires temperature ID "
108- " to include kinetic energy" );
107+ error->all (FLERR, 3 ,
108+ " Compute pressure/bocs requires temperature ID to include kinetic energy" );
109109
110110 vector = new double [size_vector];
111111 nvirial = 0 ;
@@ -119,9 +119,9 @@ ComputePressureBocs::ComputePressureBocs(LAMMPS *lmp, int narg, char **arg) :
119119
120120ComputePressureBocs::~ComputePressureBocs ()
121121{
122- delete [] id_temp;
123- delete [] vector;
124- delete [] vptr;
122+ delete[] id_temp;
123+ delete[] vector;
124+ delete[] vptr;
125125 if (phi_coeff) free (phi_coeff);
126126}
127127
@@ -139,7 +139,8 @@ void ComputePressureBocs::init()
139139 if (keflag) {
140140 temperature = modify->get_compute_by_id (id_temp);
141141 if (!temperature)
142- error->all (FLERR," Could not find compute pressure/bocs temperature compute {}" , id_temp);
142+ error->all (FLERR, Error::NOLASTLINE,
143+ " Could not find compute pressure/bocs temperature compute {}" , id_temp);
143144 }
144145
145146 // detect contributions to virial
@@ -214,10 +215,10 @@ double ComputePressureBocs::find_index(double * grid, double value)
214215
215216 if (value >= grid[i] && value <= (grid[i] + spacing)) { return i; }
216217
217- error->all (FLERR," find_index could not find value in grid for value: {} " , value);
218- for ( int i = 0 ; i < gridsize; ++i)
219- {
220- fprintf (stderr, " grid %d: %f\n " ,i, grid[i]);
218+ error->all (FLERR, Error::NOLASTLINE,
219+ " find_index could not find value in grid for value: {} " , value);
220+ for ( int i = 0 ; i < gridsize; ++i) {
221+ fprintf (stderr, " grid %d: %f\n " , i, grid[i]);
221222 }
222223
223224 exit (1 );
@@ -237,7 +238,7 @@ double ComputePressureBocs::get_cg_p_corr(double ** grid, int basis_type,
237238 return grid[1 ][i] + (deltax) * ( grid[1 ][i+1 ] - grid[1 ][i] ) / ( grid[0 ][i+1 ] - grid[0 ][i] );
238239 else if (basis_type == BASIS_CUBIC_SPLINE)
239240 return grid[1 ][i] + (grid[2 ][i] * deltax) + (grid[3 ][i] * pow (deltax,2 )) + (grid[4 ][i] * pow (deltax,3 ));
240- else error->all (FLERR," bad spline type passed to get_cg_p_corr()\n " );
241+ else error->all (FLERR, Error::NOLASTLINE, " bad spline type passed to get_cg_p_corr()" );
241242 return 0.0 ;
242243}
243244
@@ -251,7 +252,7 @@ void ComputePressureBocs::send_cg_info(int basis_type, int sent_N_basis,
251252 double sent_vavg)
252253{
253254 if (basis_type == BASIS_ANALYTIC) p_basis_type = BASIS_ANALYTIC;
254- else error->all (FLERR," Incorrect basis type passed to ComputePressureBocs\n " );
255+ else error->all (FLERR, Error::NOLASTLINE, " Incorrect basis type passed to ComputePressureBocs" );
255256
256257 p_match_flag = 1 ;
257258
@@ -276,7 +277,7 @@ void ComputePressureBocs::send_cg_info(int basis_type,
276277 else if (basis_type == BASIS_CUBIC_SPLINE) { p_basis_type = BASIS_CUBIC_SPLINE; }
277278 else
278279 {
279- error->all (FLERR," Incorrect basis type passed to ComputePressureBocs\n " );
280+ error->all (FLERR, Error::NOLASTLINE, " Incorrect basis type passed to ComputePressureBocs" );
280281 }
281282 splines = in_splines;
282283 spline_length = gridsize;
@@ -293,7 +294,7 @@ double ComputePressureBocs::compute_scalar()
293294{
294295 invoked_scalar = update->ntimestep ;
295296 if (update->vflag_global != invoked_scalar)
296- error->all (FLERR," Virial was not tallied on needed timestep" );
297+ error->all (FLERR, Error::NOLASTLINE, " Virial was not tallied on needed timestep" );
297298
298299 // invoke temperature if it hasn't been already
299300
@@ -328,9 +329,8 @@ double ComputePressureBocs::compute_scalar()
328329 scalar = (virial[0 ] + virial[1 ] + virial[2 ]) / 3.0 *
329330 inv_volume * nktv2p + (correction);
330331 } else {
331- if (p_match_flag)
332- {
333- error->all (FLERR," Pressure matching not implemented in 2-d.\n " );
332+ if (p_match_flag) {
333+ error->all (FLERR, Error::NOLASTLINE, " Pressure matching not implemented in 2-d." );
334334 exit (1 );
335335 } // The rest of this can probably be deleted.
336336 inv_volume = 1.0 / (domain->xprd * domain->yprd );
@@ -354,10 +354,10 @@ void ComputePressureBocs::compute_vector()
354354{
355355 invoked_vector = update->ntimestep ;
356356 if (update->vflag_global != invoked_vector)
357- error->all (FLERR," Virial was not tallied on needed timestep" );
357+ error->all (FLERR, Error::NOLASTLINE, " Virial was not tallied on needed timestep" );
358358
359359 if (force->kspace && kspace_virial && force->kspace ->scalar_pressure_flag )
360- error->all (FLERR," Must use 'kspace_modify pressure/scalar no' for "
360+ error->all (FLERR, Error::NOLASTLINE, " Must use 'kspace_modify pressure/scalar no' for "
361361 " tensor components with kspace_style msm" );
362362
363363 // invoke temperature if it hasn't been already
0 commit comments