@ggorman @mlange05 I have some doubts about how the general case might look for running this sort of analysis using opesci.
True Velocity: Here a numpy array is handcrafted to be passed to the Forward function later. If we allow for any matrix to be provided as input, generating C code to initialise this matrix in the C program might make the generated code too messy. The other option might be to pass the matrix from python to C in-memory (Is this what you mentioned @mlange05 ?). This imposes the limitation that the C code is no longer stand-alone and always needs to be called using a python wrapper. Another option would be to let the user provide the initialisation matrix as a mathematical function in x and y. This way we could just pass that function as a kernel and keep things simple software engineering wise. The matrix used here could possibly be represented as a function in x and y using Dirac-Delta or Heaviside functions, for example.
Source: The Ricker wavelet source is provided here as a python function. Converting an arbitrary python function to generated C code would be a tough challenge. However in the case of sources, we could probably maintain a library of sources from which the user can can choose a source.
Damping function: While a similar approach as above could be taken here as well, I see that the damping function has changed between the two examples posted here (Visco-Acoustic and Acoustic). Would a library-of-damping-functions approach work here?
Edit: After posting it I realise that this question is more related to the Opesci-fd repository than this one. Remove and repost?
Its not clear at this point what you mean by "this kind of analysis"
But as we are generating code why cannot we just generate bespoke code for a given API. For now, focusing on a python API is not a bad thing as the outer loop is being written in python.
In general, the wavelet (source) is also read from a file into an array. For tests the python function could create a numpy array for the time series and pass this into the propagator.
Can we not just generate a kernel that gets passed in as an argument to the function?
@ggorman @mlange05 I have some doubts about how the general case might look for running this sort of analysis using opesci.
Edit: After posting it I realise that this question is more related to the Opesci-fd repository than this one. Remove and repost?