I am doing grid convergence study, but k-wave did not give converged solution for some cases yet. With the last grid k-wave took 2 weeks to finish. I will definitely need an optimized C++ version.
k-Wave
A MATLAB toolbox for the time-domain
simulation of acoustic wave fields
Can I use the C++ version to simulate 2D cases?
(2 posts) (2 voices)-
Posted 9 years ago #
-
HI weiyanglin,
Unfortunately we don't have a 2D C++ code. However, you could use the 3D C++ code with one of the dimension sizes set to 1. If you try and use the C++ code via MATLAB (i.e., using
kspaceFirstOrder3DC
), the code will complain about the various matrices not being in 3D. However, if you follow the Saving Input Files In Parts Example, it should work (perhaps with minor changes to some sub-functions).We haven't benchmarked the code in this case, but I imagine it will still be faster than the MATLAB code. Let me know if you try this and get stuck on something.
If it's warranted by the performance, I will have a look into creating a
kspaceFirstOrder2DC
function to automate this for the next release.Brad.
Posted 9 years ago #
Reply
You must log in to post.