Skip to content

SparseTimeFunction type instabilities #42

@samtkaplan

Description

@samtkaplan

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions