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

Function CVAltSum

externalpackages/PVODE/source/cvode.cpp:1716–1730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1714******************************************************************/
1715
1716static real CVAltSum(int iend, real a[], int k)
1717{
1718 int i, sign;
1719 real sum;
1720
1721 if (iend < 0) return(ZERO);
1722
1723 sum = ZERO;
1724 sign = 1;
1725 for (i=0; i <= iend; i++) {
1726 sum += sign * (a[i] / (i+k));
1727 sign = -sign;
1728 }
1729 return(sum);
1730}
1731
1732/***************** CVSetBDF **************************************
1733

Callers 3

CVSetAdamsFunction · 0.85
CVAdamsStartFunction · 0.85
CVAdamsFinishFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected