Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ode_solvers: simplified macros (dropped hidden index ci) #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

knutaros
Copy link
Contributor

Redefine macros to drop index ci, which in the old code needs to be passed to the macros although it never explicitly appears in the routines (because hidden in all other macros). The new code defines INCCMAP and INPPMAP and gives identical results.

old code:

INCC(m, ci) = ([ci,] m)

INPP(m, n, ci) = ([ci,] m, n)

DIMCC = INCC(1:numc, LOWI:ni) = ([LOWI:ni,] 1:numc)

DIMPP = INPP(1:numc, 1:numc, LOWI:ni) = ([LOWI:ni], 1:numc, 1:numc)

new code:

INCCMAP(m, ci) = ([ci,] m)

INPPMAP(m, n, ci) = ([ci,] m, n)

INCC(m) = INCCMAP(m, ci) = ([ci,] m)

INPP(m, n) = INPPMAP(m, n, ci) = ([ci,] m, n)

DIMCC = INCCMAP(1:numc, LOWI:ni) = ([LOWI:ni,] 1:numc)

DIMPP = INPPMAP(1:numc, 1:numc, LOWI:ni) = ([LOWI:ni,] 1:numc, 1:numc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant