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

SparseTimeFunction type instabilities #42

Open
samtkaplan opened this issue Sep 22, 2021 · 0 comments
Open

SparseTimeFunction type instabilities #42

samtkaplan opened this issue Sep 22, 2021 · 0 comments
Assignees

Comments

@samtkaplan
Copy link
Member

samtkaplan commented Sep 22, 2021

The SparseTimeFunction applies to either a 2D or 3D earth model. However, the data associated with a SparseTimeFunction is always 2D. This means that we have introduced a type instability for methods that use SparseTimeFunction. For example:

g = grid(rec)

will not be type stable, because we don't know (before-hand) if g should be 2D or if g should be 3D. One solution would be to add another type parameter to SparseTimeFunction that says if its associated with a 2D or 3D model.

I suppose the simplest solution would be to make N correspond to the model dimension. If, I undersand correctly, then the DevitoArray for a SparseTimeFunction is always N=2; so, that could be hard-coded.

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

No branches or pull requests

3 participants