kspaceFirstOrder3D-CUDA  1.1
The CUDA/C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SolverCUDAKernels Namespace Reference

List of cuda kernels used k-space first order 3D solver. More...

Functions

int GetCUDACodeVersion ()
 Get the CUDA architecture and GPU code version the code was compiled with. More...
 
void ComputeVelocity (TRealMatrix &ux_sgx, TRealMatrix &uy_sgy, TRealMatrix &uz_sgz, const TRealMatrix &ifft_x, const TRealMatrix &ifft_y, const TRealMatrix &ifft_z, const TRealMatrix &dt_rho0_sgx, const TRealMatrix &dt_rho0_sgy, const TRealMatrix &dt_rho0_sgz, const TRealMatrix &pml_x, const TRealMatrix &pml_y, const TRealMatrix &pml_z)
 Compute acoustic velocity for default case (heterogeneous). More...
 
void ComputeVelocityScalarUniform (TRealMatrix &ux_sgx, TRealMatrix &uy_sgy, TRealMatrix &uz_sgz, const TRealMatrix &ifft_x, const TRealMatrix &ifft_y, const TRealMatrix &ifft_z, const TRealMatrix &pml_x, const TRealMatrix &pml_y, const TRealMatrix &pml_z)
 Compute acoustic velocity, scalar and uniform case. More...
 
void ComputeVelocityScalarNonuniform (TRealMatrix &ux_sgx, TRealMatrix &uy_sgy, TRealMatrix &uz_sgz, const TRealMatrix &ifft_x, const TRealMatrix &ifft_y, const TRealMatrix &ifft_z, const TRealMatrix &dxudxn_sgx, const TRealMatrix &dyudyn_sgy, const TRealMatrix &dzudzn_sgz, const TRealMatrix &pml_x, const TRealMatrix &pml_y, const TRealMatrix &pml_z)
 Compute acoustic velocity, scalar, non-uniform case. More...
 
void AddTransducerSource (TRealMatrix &ux_sgx, const TIndexMatrix &u_source_index, TIndexMatrix &delay_mask, const TRealMatrix &transducer_signal)
 Add transducer data source to X component. More...
 
void AddVelocitySource (TRealMatrix &uxyz_sgxyz, const TRealMatrix &u_source_input, const TIndexMatrix &u_source_index, const size_t t_index)
 Add in velocity source terms. More...
 
void AddPressureSource (TRealMatrix &rhox, TRealMatrix &rhoy, TRealMatrix &rhoz, const TRealMatrix &p_source_input, const TIndexMatrix &p_source_index, const size_t t_index)
 Add in pressure source term. More...
 
void Compute_p0_Velocity (TRealMatrix &ux_sgx, TRealMatrix &uy_sgy, TRealMatrix &uz_sgz, const TRealMatrix &dt_rho0_sgx, const TRealMatrix &dt_rho0_sgy, const TRealMatrix &dt_rho0_sgz)
 Compute velocity for the initial pressure problem. More...
 
void Compute_p0_Velocity (TRealMatrix &ux_sgx, TRealMatrix &uy_sgy, TRealMatrix &uz_sgz)
 Compute acoustic velocity for initial pressure problem, if rho0_sgx is scalar, uniform grid. More...
 
void Compute_p0_VelocityScalarNonUniform (TRealMatrix &ux_sgx, TRealMatrix &uy_sgy, TRealMatrix &uz_sgz, const TRealMatrix &dxudxn_sgx, const TRealMatrix &dyudyn_sgy, const TRealMatrix &dzudzn_sgz)
 Compute acoustic velocity for initial pressure problem, if rho0_sgx is scalar, non uniform grid, x component. More...
 
void ComputePressurelGradient (TCUFFTComplexMatrix &fft_x, TCUFFTComplexMatrix &fft_y, TCUFFTComplexMatrix &fft_z, const TRealMatrix &kappa, const TComplexMatrix &ddx, const TComplexMatrix &ddy, const TComplexMatrix &ddz)
 Compute part of the new velocity - gradient of p. More...
 
void ComputeVelocityGradient (TCUFFTComplexMatrix &fft_x, TCUFFTComplexMatrix &fft_y, TCUFFTComplexMatrix &fft_z, const TRealMatrix &kappa, const TComplexMatrix &ddx_k_shift_neg, const TComplexMatrix &ddy_k_shift_neg, const TComplexMatrix &ddz_k_shift_neg)
 Compute gradient of acoustic velocity on uniform grid. More...
 
void ComputeVelocityGradientNonuniform (TRealMatrix &duxdx, TRealMatrix &duydy, TRealMatrix &duzdz, const TRealMatrix &dxudxn, const TRealMatrix &dyudyn, const TRealMatrix &dzudzn)
 Shift gradient of acoustic velocity on non-uniform grid. More...
 
void Compute_p0_AddInitialPressure (TRealMatrix &p, TRealMatrix &rhox, TRealMatrix &rhoy, TRealMatrix &rhoz, const TRealMatrix &p0, const bool Is_c2_scalar, const float *c2)
 Add initial pressure to p0 (as p0 source). More...
 
void ComputeDensityNonlinearHomogeneous (TRealMatrix &rhox, TRealMatrix &rhoy, TRealMatrix &rhoz, const TRealMatrix &pml_x, const TRealMatrix &pml_y, const TRealMatrix &pml_z, const TRealMatrix &duxdx, const TRealMatrix &duydy, const TRealMatrix &duzdz)
 Calculate acoustic density for non-linear case, homogenous case. More...
 
void ComputeDensityNonlinearHeterogeneous (TRealMatrix &rhox, TRealMatrix &rhoy, TRealMatrix &rhoz, const TRealMatrix &pml_x, const TRealMatrix &pml_y, const TRealMatrix &pml_z, const TRealMatrix &duxdx, const TRealMatrix &duydy, const TRealMatrix &duzdz, const TRealMatrix &rho0)
 Calculate acoustic density for non-linear case, heterogenous case.
 
void ComputeDensityLinearHomogeneous (TRealMatrix &rhox, TRealMatrix &rhoy, TRealMatrix &rhoz, const TRealMatrix &pml_x, const TRealMatrix &pml_y, const TRealMatrix &pml_z, const TRealMatrix &duxdx, const TRealMatrix &duydy, const TRealMatrix &duzdz)
 Calculate acoustic density for linear case, homogenous case. More...
 
void ComputeDensityLinearHeterogeneous (TRealMatrix &rhox, TRealMatrix &rhoy, TRealMatrix &rhoz, const TRealMatrix &pml_x, const TRealMatrix &pml_y, const TRealMatrix &pml_z, const TRealMatrix &duxdx, const TRealMatrix &duydy, const TRealMatrix &duzdz, const TRealMatrix &rho0)
 Calculate acoustic density for linear case, heterogeneous case.
 
void ComputePressurePartsNonLinear (TRealMatrix &rho_sum, TRealMatrix &BonA_sum, TRealMatrix &du_sum, const TRealMatrix &rhox, const TRealMatrix &rhoy, const TRealMatrix &rhoz, const TRealMatrix &duxdx, const TRealMatrix &duydy, const TRealMatrix &duzdz, const bool is_BonA_scalar, const float *BonA_matrix, const bool is_rho0_scalar, const float *rho0_matrix)
 Calculate three temporary sums in the new pressure formula, non-linear absorbing case. More...
 
void ComputeAbsorbtionTerm (TCUFFTComplexMatrix &fft1, TCUFFTComplexMatrix &fft2, const TRealMatrix &absorb_nabla1, const TRealMatrix &absorb_nabla2)
 Compute absorbing term with abosrb_nabla1 and absorb_nabla2. More...
 
void SumPressureTermsNonlinear (TRealMatrix &p, const TRealMatrix &BonA_temp, const bool is_c2_scalar, const float *c2_matrix, const bool is_tau_eta_scalar, const float *absorb_tau, const float *tau_matrix, const float *absorb_eta, const float *eta_matrix)
 Sum sub-terms to calculate new pressure, non-linear case. More...
 
void SumPressureTermsLinear (TRealMatrix &p, const TRealMatrix &absorb_tau_temp, const TRealMatrix &absorb_eta_temp, const TRealMatrix &sum_rhoxyz, const bool is_c2_scalar, const float *c2_matrix, const bool is_tau_eta_scalar, const float *tau_matrix, const float *eta_matrix)
 Sum sub-terms to calculate new pressure, linear case. More...
 
void SumPressureNonlinearLossless (TRealMatrix &p, const TRealMatrix &rhox, const TRealMatrix &rhoy, const TRealMatrix &rhoz, const bool is_c2_scalar, const float *c2_matrix, const bool is_BonA_scalar, const float *BonA_matrix, const bool is_rho0_scalar, const float *rho0_matrix)
 Sum sub-terms for new p, linear lossless case. More...
 
void ComputePressurePartsLinear (TRealMatrix &sum_rhoxyz, TRealMatrix &sum_rho0_du, const TRealMatrix &rhox, const TRealMatrix &rhoy, const TRealMatrix &rhoz, const TRealMatrix &duxdx, const TRealMatrix &duydy, const TRealMatrix &duzdz, const bool is_rho0_scalar, const float *rho0_matrix)
 Calculate two temporary sums in the new pressure formula, linear absorbing case. More...
 
void SumPressureLinearLossless (TRealMatrix &p, const TRealMatrix &rhox, const TRealMatrix &rhoy, const TRealMatrix &rhoz, const bool is_c2_scalar, const float *c2_matrix)
 Sum sub-terms for new p, linear lossless case. More...
 
void TrasposeReal3DMatrixXY (float *outputMatrix, const float *inputMatrix, const dim3 &dimSizes)
 Transpose a real 3D matrix in the X-Y direction. More...
 
void TrasposeReal3DMatrixXZ (float *outputMatrix, const float *inputMatrix, const dim3 &dimSizes)
 Transpose a real 3D matrix in the X-Y direction. More...
 
void ComputeVelocityShiftInX (TCUFFTComplexMatrix &cufft_shift_temp, const TComplexMatrix &x_shift_neg_r)
 Compute the velocity shift in Fourier space over the X axis. More...
 
void ComputeVelocityShiftInY (TCUFFTComplexMatrix &cufft_shift_temp, const TComplexMatrix &y_shift_neg_r)
 Compute the velocity shift in Fourier space over the Y axis. More...
 
void ComputeVelocityShiftInZ (TCUFFTComplexMatrix &cufft_shift_temp, const TComplexMatrix &z_shift_neg_r)
 Compute the velocity shift in Fourier space over the Z axis. More...
 

Detailed Description

List of cuda kernels used k-space first order 3D solver

Function Documentation

void SolverCUDAKernels::AddPressureSource ( TRealMatrix rhox,
TRealMatrix rhoy,
TRealMatrix rhoz,
const TRealMatrix p_source_input,
const TIndexMatrix p_source_index,
const size_t  t_index 
)

Interface to kernel which adds in pressure source (to acoustic density).

Parameters
[out]rhox- Acoustic density
[out]rhoy- Acoustic density
[out]rhoz- Acoustic density
[in]p_source_input- Source input to add
[in]p_source_index- Index matrix with source
[in]t_index- Actual timestep

Definition at line 666 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::AddTransducerSource ( TRealMatrix ux_sgx,
const TIndexMatrix u_source_index,
TIndexMatrix delay_mask,
const TRealMatrix transducer_signal 
)

Interface to kernel adding transducer data to ux_sgx.

Parameters
[in,out]ux_sgx- Here we add the signal
[in]u_source_index- Where to add the signal (source)
[in,out]delay_mask- Delay mask to push the signal in the domain (incremented per invocation)
[in]transducer_signal- Transducer signal

Definition at line 495 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::AddVelocitySource ( TRealMatrix uxyz_sgxyz,
const TRealMatrix u_source_input,
const TIndexMatrix u_source_index,
const size_t  t_index 
)

Interface to CUDA kernel adding in velocity source terms.

Parameters
[in,out]uxyz_sgxyz- Velocity matrix to update
[in]u_source_input- Source input to add
[in]u_source_index- Index matrix
[in]t_index- Actual time step

Definition at line 563 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::Compute_p0_AddInitialPressure ( TRealMatrix p,
TRealMatrix rhox,
TRealMatrix rhoy,
TRealMatrix rhoz,
const TRealMatrix p0,
const bool  Is_c2_scalar,
const float *  c2 
)

Interface for kernel to add initial pressure p0 into p, rhox, rhoy, rhoz.

Parameters
[out]p- Pressure
[out]rhox- Density component
[out]rhoy- Density component
[out]rhoz- Density component
[in]p0- intial pressure
[in]Is_c2_scalar- Scalar or vector?
[in]c2- Sound speed

Definition at line 1111 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::Compute_p0_Velocity ( TRealMatrix ux_sgx,
TRealMatrix uy_sgy,
TRealMatrix uz_sgz,
const TRealMatrix dt_rho0_sgx,
const TRealMatrix dt_rho0_sgy,
const TRealMatrix dt_rho0_sgz 
)

Interface to CUDA Compute u = dt ./ rho0_sgx .* ifft(FFT).

Parameters
[in,out]ux_sgx- data stored in u matrix
[in,out]uy_sgy- data stored in u matrix
[in,out]uz_sgz- data stored in u matrix
[in]dt_rho0_sgx- inner member of the equation
[in]dt_rho0_sgy- inner member of the equation
[in]dt_rho0_sgz- inner member of the equation

Definition at line 750 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::Compute_p0_Velocity ( TRealMatrix ux_sgx,
TRealMatrix uy_sgy,
TRealMatrix uz_sgz 
)

Interface to CUDA Compute u = dt ./ rho0_sgx .* ifft(FFT). if rho0_sgx is scalar, uniform case.

Parameters
[in,out]ux_sgx- Data stored in u matrix
[in,out]uy_sgy- Data stored in u matrix
[in,out]uz_sgz- Data stored in u matrix

Definition at line 779 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

void SolverCUDAKernels::Compute_p0_VelocityScalarNonUniform ( TRealMatrix ux_sgx,
TRealMatrix uy_sgy,
TRealMatrix uz_sgz,
const TRealMatrix dxudxn_sgx,
const TRealMatrix dyudyn_sgy,
const TRealMatrix dzudzn_sgz 
)

Interface to CUDA kernel to Compute u = dt./rho0_sgy .* ifft (FFT). if rho0_sgx is scalar, nonuniform non uniform Compute_ddx_kappa_fft_pgrid, y component.

Parameters
[in,out]ux_sgx
[in,out]uy_sgy
[in,out]uz_sgz
[in]dxudxn_sgx
[in]dyudyn_sgy
[in]dzudzn_sgz

Definition at line 841 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::ComputeAbsorbtionTerm ( TCUFFTComplexMatrix fft1,
TCUFFTComplexMatrix fft2,
const TRealMatrix absorb_nabla1,
const TRealMatrix absorb_nabla2 
)

Interface to kernel which computes absorbing term with abosrb_nabla1 and absorb_nabla2.
Calculate fft_1 = absorb_nabla1 .* fft_1
Calculate fft_2 = absorb_nabla2 .* fft_2

Parameters
[in,out]fft1- Nabla1 part
[in,out]fft2- Nabla2 part
[in]absorb_nabla1
[in]absorb_nabla2

Definition at line 1668 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::ComputeDensityLinearHomogeneous ( TRealMatrix rhox,
TRealMatrix rhoy,
TRealMatrix rhoz,
const TRealMatrix pml_x,
const TRealMatrix pml_y,
const TRealMatrix pml_z,
const TRealMatrix duxdx,
const TRealMatrix duydy,
const TRealMatrix duzdz 
)

Interface to kernel which calculate new values of rho (acoustic density). Linear, homogenous case.

Parameters
[out]rhox- density x
[out]rhoy- density y
[out]rhoz- density y
[in]pml_x- pml x
[in]pml_y- pml y
[in]pml_z- pml z
[in]duxdx- gradient of velocity x
[in]duydy- gradient of velocity x
[in]duzdz- gradient of velocity z

Definition at line 1369 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::ComputeDensityNonlinearHomogeneous ( TRealMatrix rhox,
TRealMatrix rhoy,
TRealMatrix rhoz,
const TRealMatrix pml_x,
const TRealMatrix pml_y,
const TRealMatrix pml_z,
const TRealMatrix duxdx,
const TRealMatrix duydy,
const TRealMatrix duzdz 
)

Interface to kernel which calculate new values of rho (acoustic density). Non-linear, homogenous case.

Parameters
[out]rhox- density x
[out]rhoy- density y
[out]rhoz- density y
[in]pml_x- pml x
[in]pml_y- pml y
[in]pml_z- pml z
[in]duxdx- gradient of velocity x
[in]duydy- gradient of velocity x
[in]duzdz- gradient of velocity z

Definition at line 1204 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::ComputePressurelGradient ( TCUFFTComplexMatrix fft_x,
TCUFFTComplexMatrix fft_y,
TCUFFTComplexMatrix fft_z,
const TRealMatrix kappa,
const TComplexMatrix ddx,
const TComplexMatrix ddy,
const TComplexMatrix ddz 
)

Interface to kernel which computes the spectral part of pressure gradient calculation bsxfun(@times, ddx_k_shift_pos, kappa .* p_k).

Parameters
[out]fft_x- matrix to store input for iFFT (p) /dx
[out]fft_y- matrix to store input for iFFT (p) /dy
[out]fft_z- matrix to store input for iFFT (p) /dz
[in]kappa- Real matrix of kappa
[in]ddx- precomputed value of ddx_k_shift_pos
[in]ddy- precomputed value of ddy_k_shift_pos
[in]ddz- precomputed value of ddz_k_shift_pos

Definition at line 912 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::ComputePressurePartsLinear ( TRealMatrix sum_rhoxyz,
TRealMatrix sum_rho0_du,
const TRealMatrix rhox,
const TRealMatrix rhoy,
const TRealMatrix rhoz,
const TRealMatrix duxdx,
const TRealMatrix duydy,
const TRealMatrix duzdz,
const bool  is_rho0_scalar,
const float *  rho0_matrix 
)

Interface to kernel that Calculates two temporary sums in the new pressure formula, linear absorbing case.

Parameters
[out]sum_rhoxyz- rhox_sgx + rhoy_sgy + rhoz_sgz
[out]sum_rho0_du- rho0* (duxdx + duydy + duzdz);
[in]rhox
[in]rhoy
[in]rhoz
[in]duxdx
[in]duydy
[in]duzdz
[in]is_rho0_scalar
[in]rho0_matrix

Definition at line 2141 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::ComputePressurePartsNonLinear ( TRealMatrix rho_sum,
TRealMatrix BonA_sum,
TRealMatrix du_sum,
const TRealMatrix rhox,
const TRealMatrix rhoy,
const TRealMatrix rhoz,
const TRealMatrix duxdx,
const TRealMatrix duydy,
const TRealMatrix duzdz,
const bool  is_BonA_scalar,
const float *  BonA_matrix,
const bool  is_rho0_scalar,
const float *  rho0_matrix 
)

Interface to kernel which calculates three temporary sums in the new pressure formula
non-linear absorbing case. Scalar values are in constant memory

Parameters
[out]rho_sum- rhox_sgx + rhoy_sgy + rhoz_sgz
[out]BonA_sum- BonA + rho ^2 / 2 rho0 + (rhox_sgx + rhoy_sgy + rhoz_sgz)
[out]du_sum- rho0* (duxdx + duydy + duzdz)
[in]rhox,-Acoustic density X
[in]rhoy,-Acoustic density Y
[in]rhoz,-Acoustic density Z
[in]duxdx- Gradient of velocity in X
[in]duydy- Gradient of velocity in X
[in]duzdz- Gradient of velocity in X
[in]is_BonA_scalar- Is BonA a scalar value (homogeneous)
[in]BonA_matrix- Heterogeneous value for BonA
[in]is_rho0_scalar- Is rho0 a scalar value (homogeneous)
[in]rho0_matrix- Heterogeneous value for rho0

Definition at line 1544 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::ComputeVelocity ( TRealMatrix ux_sgx,
TRealMatrix uy_sgy,
TRealMatrix uz_sgz,
const TRealMatrix ifft_x,
const TRealMatrix ifft_y,
const TRealMatrix ifft_z,
const TRealMatrix dt_rho0_sgx,
const TRealMatrix dt_rho0_sgy,
const TRealMatrix dt_rho0_sgz,
const TRealMatrix pml_x,
const TRealMatrix pml_y,
const TRealMatrix pml_z 
)

Interface to the CUDA kernel computing new version of ux_sgx. Default (heterogeneous case)

Parameters
[in,out]ux_sgx
[in,out]uy_sgy
[in,out]uz_sgz
[in]ifft_x
[in]ifft_y
[in]ifft_z
[in]dt_rho0_sgx
[in]dt_rho0_sgy
[in]dt_rho0_sgz
[in]pml_x
[in]pml_y
[in]pml_z

Definition at line 247 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::ComputeVelocityGradient ( TCUFFTComplexMatrix fft_x,
TCUFFTComplexMatrix fft_y,
TCUFFTComplexMatrix fft_z,
const TRealMatrix kappa,
const TComplexMatrix ddx_k_shift_neg,
const TComplexMatrix ddy_k_shift_neg,
const TComplexMatrix ddz_k_shift_neg 
)

Interface to kernel calculating the inner part of du, dy, dz on uniform grid.

Parameters
[in,out]fft_x- FFT of ux
[in,out]fft_y- FFT of uy
[in,out]fft_z- FFT of uz
[in]kappa
[in]ddx_k_shift_neg
[in]ddy_k_shift_neg
[in]ddz_k_shift_neg

Definition at line 986 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::ComputeVelocityGradientNonuniform ( TRealMatrix duxdx,
TRealMatrix duydy,
TRealMatrix duzdz,
const TRealMatrix dxudxn,
const TRealMatrix dyudyn,
const TRealMatrix dzudzn 
)

Interface to CUDA kernel which shift new values of dux, duy and duz on non-uniform grid.

Parameters
[in,out]duxdx
[in,out]duydy
[in,out]duzdz
[in]dxudxn
[in]dyudyn
[in]dzudzn

Definition at line 1047 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::ComputeVelocityScalarNonuniform ( TRealMatrix ux_sgx,
TRealMatrix uy_sgy,
TRealMatrix uz_sgz,
const TRealMatrix ifft_x,
const TRealMatrix ifft_y,
const TRealMatrix ifft_z,
const TRealMatrix dxudxn_sgx,
const TRealMatrix dyudyn_sgy,
const TRealMatrix dzudzn_sgz,
const TRealMatrix pml_x,
const TRealMatrix pml_y,
const TRealMatrix pml_z 
)

Interface to calculate ux_sgx, uy_sgy and uz_sgz. This is the case for rho0 being a scalar and a non-uniform grid.

Parameters
[in,out]ux_sgx- updated value of ux_sgx
[in,out]uy_sgy- updated value of ux_sgx
[in,out]uz_sgz- updated value of ux_sgx
[in]ifft_x- gradient of X
[in]ifft_y- gradient of X
[in]ifft_z- gradient of X
[in]dxudxn_sgx- matrix dx shift
[in]dyudyn_sgy- matrix dy shift
[in]dzudzn_sgz- matrix dz shift
[in]pml_x- matrix of pml_x
[in]pml_y- matrix of pml_x
[in]pml_z- matrix of pml_x

Definition at line 433 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::ComputeVelocityScalarUniform ( TRealMatrix ux_sgx,
TRealMatrix uy_sgy,
TRealMatrix uz_sgz,
const TRealMatrix ifft_x,
const TRealMatrix ifft_y,
const TRealMatrix ifft_z,
const TRealMatrix pml_x,
const TRealMatrix pml_y,
const TRealMatrix pml_z 
)

Interface to the CUDA kernel computing new version of ux_sgx, uy_sgy, uz_sgz. This is the case for rho0 being a scalar and a uniform grid.

Parameters
[in,out]ux_sgx
[in,out]uy_sgy
[in,out]uz_sgz
[in]ifft_x
[in]ifft_y
[in]ifft_z
[in]pml_x
[in]pml_y
[in]pml_z

Definition at line 338 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::ComputeVelocityShiftInX ( TCUFFTComplexMatrix cufft_shift_temp,
const TComplexMatrix x_shift_neg_r 
)

Compute the velocity shift in Fourier space over the X axis. This kernel work with the original space.

Parameters
[in,out]cufft_shift_temp- Matrix to calculate 1D FFT to
[in]x_shift_neg_r

Definition at line 2764 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::ComputeVelocityShiftInY ( TCUFFTComplexMatrix cufft_shift_temp,
const TComplexMatrix y_shift_neg_r 
)

Compute the velocity shift in Fourier space over the Y axis. This kernel work with the transposed space.

Parameters
[in,out]cufft_shift_temp- Matrix to calculate 1D FFT to
[in]y_shift_neg_r

Definition at line 2805 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::ComputeVelocityShiftInZ ( TCUFFTComplexMatrix cufft_shift_temp,
const TComplexMatrix z_shift_neg_r 
)

Compute the velocity shift in Fourier space over the Z axis. This kernel work with the transposed space.

Parameters
[in,out]cufft_shift_temp- Matrix to calculate 1D FFT to
[in]z_shift_neg_r

Definition at line 2846 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

int SolverCUDAKernels::GetCUDACodeVersion ( )

Get the CUDA architecture and GPU code version the code was compiled with.

Returns
the CUDA code version the code was compiled for

Definition at line 142 of file SolverCUDAKernels.cu.

Here is the caller graph for this function:

void SolverCUDAKernels::SumPressureLinearLossless ( TRealMatrix p,
const TRealMatrix rhox,
const TRealMatrix rhoy,
const TRealMatrix rhoz,
const bool  is_c2_scalar,
const float *  c2_matrix 
)

Interface to kernel that sums sub-terms for new p, linear lossless case.

Parameters
[out]p
[in]rhox
[in]rhoy
[in]rhoz
[in]is_c2_scalar
[in]c2_matrix

Definition at line 2219 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::SumPressureNonlinearLossless ( TRealMatrix p,
const TRealMatrix rhox,
const TRealMatrix rhoy,
const TRealMatrix rhoz,
const bool  is_c2_scalar,
const float *  c2_matrix,
const bool  is_BonA_scalar,
const float *  BonA_matrix,
const bool  is_rho0_scalar,
const float *  rho0_matrix 
)

Interface to kernel that sums sub-terms for new p, non-linear lossless case.

Parameters
[out]p- New value of pressure
[in]rhox
[in]rhoy
[in]rhoz
[in]is_c2_scalar
[in]c2_matrix
[in]is_BonA_scalar
[in]BonA_matrix
[in]is_rho0_scalar
[in]rho0_matrix

Definition at line 1960 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::SumPressureTermsLinear ( TRealMatrix p,
const TRealMatrix absorb_tau_temp,
const TRealMatrix absorb_eta_temp,
const TRealMatrix sum_rhoxyz,
const bool  is_c2_scalar,
const float *  c2_matrix,
const bool  is_tau_eta_scalar,
const float *  tau_matrix,
const float *  eta_matrix 
)

Interface to kernel that sums sub-terms to calculate new pressure, linear case.

Parameters
[out]p- New value of p
[in]absorb_tau_temp- Sub-term with absorb_tau
[in]absorb_eta_temp- Sub-term with absorb_eta
[in]sum_rhoxyz- rhox_sgx + rhoy_sgy + rhoz_sgz
[in]is_c2_scalar
[in]c2_matrix
[in]is_tau_eta_scalar
[in]tau_matrix
[in]eta_matrix

Definition at line 1844 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::SumPressureTermsNonlinear ( TRealMatrix p,
const TRealMatrix BonA_temp,
const bool  is_c2_scalar,
const float *  c2_matrix,
const bool  is_tau_eta_scalar,
const float *  absorb_tau,
const float *  tau_matrix,
const float *  absorb_eta,
const float *  eta_matrix 
)

Interface to CUDA Sum sub-terms to calculate new pressure, non-linear case.

Parameters
[in,out]p- New value of pressure
[in]BonA_temp- rho0 * (duxdx + duydy + duzdz)
[in]is_c2_scalar
[in]c2_matrix
[in]is_tau_eta_scalar
[in]absorb_tau
[in]tau_matrix
[in]absorb_eta- BonA + rho ^2 / 2 rho0 + (rhox_sgx + rhoy_sgy + rhoz_sgz)
[in]eta_matrix

Definition at line 1729 of file SolverCUDAKernels.cu.

Here is the call graph for this function:

Here is the caller graph for this function:

void SolverCUDAKernels::TrasposeReal3DMatrixXY ( float *  outputMatrix,
const float *  inputMatrix,
const dim3 &  dimSizes 
)

Transpose a real 3D matrix in the X-Y direction. It is done out-of-place.

Parameters
[out]outputMatrix- Output matrix data
[in]inputMatrix- Input matrix data
[in]dimSizes- Dimension sizes of the original matrix

Definition at line 2472 of file SolverCUDAKernels.cu.

Here is the caller graph for this function:

void SolverCUDAKernels::TrasposeReal3DMatrixXZ ( float *  outputMatrix,
const float *  inputMatrix,
const dim3 &  dimSizes 
)

Transpose a real 3D matrix in the X-Y direction. It is done out-of-place

Parameters
[out]outputMatrix- Output matrix
[in]inputMatrix- Input matrix
[in]dimSizes- Dimension sizes of the original matrix

Definition at line 2716 of file SolverCUDAKernels.cu.

Here is the caller graph for this function: