-
Notifications
You must be signed in to change notification settings - Fork 2
Refactor #21
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
Refactor #21
Conversation
|
These look really useful. Thanks. I'll grab and merge a bunch of these but skip the vectorisation of PP and deduplication of tabulation. My feeling is both need more test cases (or at least, for me to think about what isn't currently tested). |
|
Thanks @auggiemarignier! I've merged almost all of this on main now. The missing bits are on #23 (vectorise PP) and #24 (sort out the tabulation). Both look good but would benefit from a test or two and I would really like to get my head around the vectorisation. I'll close this PR. |
A suggested refactoring of the code.
OneDModelclass that can take any combination ofrho, vp, vs, qkappa, qmupolynomial coefficients and breakpoints.vpand the resulting object would still have a premrho, which could be a problem.PREMinstance ofOneDModelis made available to importxphysicsmodule. These are now only functions of the five basic polynomials - no more precompute of derived polynomials so this may be an inefficiency for some applications.OneDModelcontains thin wrappers around these functions so the API doesn't change from a user's perspective.uv, files rearranged intosrcandnotebooksfolders