![]() |
WaveSimPP 1.0
A C library for solving the wave equation and reconstructing the wave field
|
Namespaces | |
namespace | waveSimCore |
Functions | |
boost::multi_array< double, 2 > | waveSimCore::get_sigma_1 (boost::multi_array< double, 1 > x, double dx, int nx, int nz, double c_max, int n=15, double R=1e-3, double m=2.0) |
boost::multi_array< double, 2 > | waveSimCore::get_sigma_2 (boost::multi_array< double, 1 > z, double dz, int nx, int nz, double c_max, int n=10, double R=1e-3, double m=2.0) |
boost::multi_array< double, 2 > | waveSimCore::get_profile (double xmin, double xmax, double zmin, double zmax, int nx, int nz, double r) |
Get the velocity profile of the model as a 2D Array. | |
boost::multi_array< double, 2 > | waveSimCore::dfdx (boost::multi_array< double, 2 > f, double dx) |
Takes the partial derivative of a 2D matrix f with respect to x. | |
boost::multi_array< double, 2 > | waveSimCore::dfdz (boost::multi_array< double, 2 > f, double dz) |
Takes the partial derivative of a 2D matrix f with respect to z. | |
boost::multi_array< double, 2 > | waveSimCore::d2fdx2 (boost::multi_array< double, 2 > f, double dx) |
Takes the second partial derivative of a 2D matrix f with respect to x. | |
boost::multi_array< double, 2 > | waveSimCore::d2fdz2 (boost::multi_array< double, 2 > f, double dz) |
Takes the second partial derivative of a 2D matrix f with respect to z. | |
boost::multi_array< double, 2 > | waveSimCore::divergence (boost::multi_array< double, 2 > f1, boost::multi_array< double, 2 > f2, double dx, double dz) |
boost::multi_array< double, 3 > | waveSimCore::wave_solver (boost::multi_array< double, 2 > c, double dt, double dx, double dz, int nt, int nx, int nz, boost::multi_array< double, 3 > f) |
boost::multi_array< double, 3 > | waveSimCore::wave_solver_complex (boost::multi_array< double, 2 > c, double dt, double dx, double dz, int nt, int nx, int nz, boost::multi_array< double, 3 > f, boost::multi_array< double, 2 > sigma_1, boost::multi_array< double, 2 > sigma_2) |
boost::multi_array< double, 3 > | waveSimCore::ricker (int i_s, int j_s, double f, double amp, double shift, double tmin, double tmax, int nt, int nx, int nz) |
Get the Ricker wavelet as a 3D Array. | |
boost::multi_array< double, 2 > waveSimCore::d2fdx2 | ( | boost::multi_array< double, 2 > | f, |
double | dx | ||
) |
Takes the second partial derivative of a 2D matrix f with respect to x.
Definition at line 32 of file helper_func.hpp.
boost::multi_array< double, 2 > waveSimCore::d2fdz2 | ( | boost::multi_array< double, 2 > | f, |
double | dz | ||
) |
Takes the second partial derivative of a 2D matrix f with respect to z.
Definition at line 40 of file helper_func.hpp.
boost::multi_array< double, 2 > waveSimCore::dfdx | ( | boost::multi_array< double, 2 > | f, |
double | dx | ||
) |
Takes the partial derivative of a 2D matrix f with respect to x.
Definition at line 18 of file helper_func.hpp.
boost::multi_array< double, 2 > waveSimCore::dfdz | ( | boost::multi_array< double, 2 > | f, |
double | dz | ||
) |
Takes the partial derivative of a 2D matrix f with respect to z.
Definition at line 25 of file helper_func.hpp.
boost::multi_array< double, 2 > waveSimCore::divergence | ( | boost::multi_array< double, 2 > | f1, |
boost::multi_array< double, 2 > | f2, | ||
double | dx, | ||
double | dz | ||
) |
Takes the divergence of a 2D matrices fx,fz with respect to x and z
Returns dfx/dx + dfz/dz
Definition at line 49 of file helper_func.hpp.
boost::multi_array< double, 2 > waveSimCore::get_profile | ( | double | xmin, |
double | xmax, | ||
double | zmin, | ||
double | zmax, | ||
int | nx, | ||
int | nz, | ||
double | r | ||
) |
Get the velocity profile of the model as a 2D Array.
Definition at line 16 of file computational.hpp.
boost::multi_array< double, 2 > waveSimCore::get_sigma_1 | ( | boost::multi_array< double, 1 > | x, |
double | dx, | ||
int | nx, | ||
int | nz, | ||
double | c_max, | ||
int | n = 15 , |
||
double | R = 1e-3 , |
||
double | m = 2.0 |
||
) |
Returns the sigma 1 coefficient for the PML boundary conditions
sigma_1 and sigma_2 are the coefficients for the x and z directions respectively
Check Johnson, Steven G. (2021).
Definition at line 21 of file coeff.hpp.
boost::multi_array< double, 2 > waveSimCore::get_sigma_2 | ( | boost::multi_array< double, 1 > | z, |
double | dz, | ||
int | nx, | ||
int | nz, | ||
double | c_max, | ||
int | n = 10 , |
||
double | R = 1e-3 , |
||
double | m = 2.0 |
||
) |
Returns the sigma 2 coefficient for the PML boundary conditions
sigma_1 and sigma_2 are the coefficients for the x and z directions respectively
Check Johnson, Steven G. (2021).
Definition at line 56 of file coeff.hpp.
boost::multi_array< double, 3 > waveSimCore::ricker | ( | int | i_s, |
int | j_s, | ||
double | f, | ||
double | amp, | ||
double | shift, | ||
double | tmin, | ||
double | tmax, | ||
int | nt, | ||
int | nx, | ||
int | nz | ||
) |
Get the Ricker wavelet as a 3D Array.
Definition at line 14 of file source.hpp.
boost::multi_array< double, 3 > waveSimCore::wave_solver | ( | boost::multi_array< double, 2 > | c, |
double | dt, | ||
double | dx, | ||
double | dz, | ||
int | nt, | ||
int | nx, | ||
int | nz, | ||
boost::multi_array< double, 3 > | f | ||
) |
This function solves the wave equation using the methods explained in the readme
The boundary conditions are so that waves bounce at the boundary
Definition at line 27 of file solver.hpp.
boost::multi_array< double, 3 > waveSimCore::wave_solver_complex | ( | boost::multi_array< double, 2 > | c, |
double | dt, | ||
double | dx, | ||
double | dz, | ||
int | nt, | ||
int | nx, | ||
int | nz, | ||
boost::multi_array< double, 3 > | f, | ||
boost::multi_array< double, 2 > | sigma_1, | ||
boost::multi_array< double, 2 > | sigma_2 | ||
) |
Solves the wave equation using a more complex solver compared to wave_solver
Also has different boundary conditions. In this one the boundary extends to infinity
Definition at line 22 of file solver_complex.hpp.