File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -286,17 +286,28 @@ void Neutrals::nan_test(std::string variable) {
286
286
// ----------------------------------------------------------------------
287
287
288
288
bool Neutrals::check_for_nonfinites () {
289
- bool non_finites_exist = false ;
289
+ bool isBad = false ;
290
+ bool didWork = true ;
291
+
292
+ isBad = !all_finite (density_scgc, " density_scgc" );
293
+ if (isBad) {
294
+ report.error (" non-finite found in neutral density!" );
295
+ didWork = false ;
296
+ }
290
297
291
- if (!all_finite (density_scgc, " density_scgc" ) ||
292
- !all_finite (temperature_scgc, " temperature_scgc" ) ||
293
- !all_finite (velocity_vcgc, " velocity_vcgc" ))
294
- non_finites_exist = true ;
298
+ isBad = !all_finite (temperature_scgc, " temperature_scgc" );
299
+ if (isBad) {
300
+ report.error (" non-finite found in neutral temperature!" );
301
+ didWork = false ;
302
+ }
295
303
296
- if (non_finites_exist)
297
- throw std::string (" Check for nonfinites failed!!!\n " );
304
+ isBad = !all_finite (velocity_vcgc, " velocity_vcgc" );
305
+ if (isBad) {
306
+ report.error (" non-finite found in neutral velocity!" );
307
+ didWork = false ;
308
+ }
298
309
299
- return non_finites_exist ;
310
+ return didWork ;
300
311
}
301
312
302
313
// ----------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments