HPCSys-Lab / simwave

Simulates the propagation of the acoustic wave using the finite difference method in 2D and 3D domains.
GNU General Public License v3.0
39 stars 14 forks source link

`findiff` #25

Closed krober10nd closed 3 years ago

krober10nd commented 3 years ago
krober10nd commented 3 years ago
krober10nd commented 3 years ago

Because this package requires no more dependencies other than numpy, sympy, and scipy (two of which are already used). and can give you literally any order coefficients, I think we should incorporate this package to calculate the coefficients on the fly for the stencil.

I would also imagine a scenario where you could make findiff optional and then in the case it's optional only have a limited spatial order set. This way we maintain the philosophy of as little as possible dependencies.

jaimesouza commented 3 years ago

I agree It is a good ideia to incorporate findiff to calculate the coefficients. I am gonna do that.

krober10nd commented 3 years ago

You can make packages optional too via the setup.cfg file like this:

https://github.com/krober10nd/SeismicMesh/blob/1d15a6abee2391719b98e86c9a20c666c77a2397/setup.cfg#L41

so then you could something like this

pip install pywave[all] 

which would install all package dependencies

or

pip install pywave[lite]

which wouldn't and thus would have reduced functionality but be easier to install.

jaimesouza commented 3 years ago

I think we can just use it without options. It is not a complex package.

krober10nd commented 3 years ago

Okay, just to note that by default the [all] option is used so it just gives you more flexibility. In fact, if you do benchmarking with another package (which is necessary), then you don't want that the benchmarking dependencies install with the main package.

In general, the philosophy should be as-few-as-possible dependencies.

krober10nd commented 3 years ago

We're already seen how well the opposite works :]

jaimesouza commented 3 years ago

We're already seen how well the opposite works :]

Yep, I know haha

But, In this case findiff is going to be a fundamental (and also required) package to calculate the coefficients, for both space and time (only second time order for now, but more options in the future)