MCPcopy Create free account
hub / github.com/boutproject/BOUT-dev / CVHandleFailure

Function CVHandleFailure

externalpackages/PVODE/source/cvode.cpp:2379–2399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2377*****************************************************************/
2378
2379static int CVHandleFailure(CVodeMem cv_mem, int kflag)
2380{
2381
2382 /* Set imxer to the index of maximum weighted local error */
2383 N_VProd(acor, ewt, tempv);
2384 N_VAbs(tempv, tempv);
2385
2386 /* Depending on kflag, print error message and return error flag */
2387 switch (kflag) {
2388 case REP_ERR_FAIL: fprintf(errfp, MSG_ERR_FAILS, tn, h);
2389 return(ERR_FAILURE);
2390 case REP_CONV_FAIL: fprintf(errfp, MSG_CONV_FAILS, tn, h);
2391 return(CONV_FAILURE);
2392 case SETUP_FAILED: fprintf(errfp, MSG_SETUP_FAILED, tn);
2393 return(SETUP_FAILURE);
2394 case SOLVE_FAILED: fprintf(errfp, MSG_SOLVE_FAILED, tn);
2395 return(SOLVE_FAILURE);
2396 }
2397 fprintf(errfp, "Should be unreachable ...");
2398 return (ERR_FAILURE);
2399}
2400
2401/*******************************************************************/
2402/********* END Private Helper Functions Implementation *************/

Callers 1

CVodeFunction · 0.85

Calls 2

N_VProdFunction · 0.85
N_VAbsFunction · 0.85

Tested by

no test coverage detected