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

Function CVSetEta

externalpackages/PVODE/source/cvode.cpp:2274–2291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2272*******************************************************************/
2273
2274static void CVSetEta(CVodeMem cv_mem)
2275{
2276
2277 /* If eta below the threshhold THRESH, reject a change of step size */
2278 if (eta < THRESH) {
2279 eta = ONE;
2280 hprime = h;
2281 } else {
2282 /* Limit eta by etamax and hmax, then set hprime */
2283 eta = MIN(eta, etamax);
2284 eta /= MAX(ONE, ABS(h)*hmax_inv*eta);
2285 hprime = h * eta;
2286 }
2287
2288 /* Reset etamx for the next step size change, and scale acor */
2289 etamax = (nst <= SMALL_NST) ? ETAMX2 : ETAMX3;
2290 N_VScale(ONE/tq[2], acor, acor);
2291}
2292
2293/*************** CVComputeEtaqm1 **********************************
2294

Callers 1

CVPrepareNextStepFunction · 0.85

Calls 1

N_VScaleFunction · 0.85

Tested by

no test coverage detected