33 #ifndef TKSPACE_FIRST_ORDER_3D_SOLVER_H
34 #define TKSPACE_FIRST_ORDER_3D_SOLVER_H
size_t GetDeviceMemoryUsageInMB()
Get memory usage in MB on the GPU side.
TRealMatrix & Get_absorb_nabla1()
Get the absorb_nabla1 matrix from the container.
TRealMatrix & Get_dt_rho0_sgy()
Get the dt.*rho0_sgy matrix from the container.
void ComputePressurePartsLinear(TRealMatrix &rhoxyz_sum, TRealMatrix &rho0_du_sum)
Calculate two temporary sums in the new pressure formula, linear absorbing case.
void AddPressureSource()
Add in pressure source.
double GetTotalTime() const
Get total simulation time.
TRealMatrix & Get_ux_sgx()
Get the ux_sgx matrix from the container.
TRealMatrix & Get_ux_source_input()
Get the ux_source_input matrix from the container.
TRealMatrix & Get_absorb_tau()
Get the absorb_tau matrix from the container.
TComplexMatrix & Get_x_shift_neg_r()
Get the x_shift_neg_r matrix from the container.
void ComputeDensityLinear()
Compute new values of acoustic density for linear case.
void SumPressureLinearLossless()
Sum sub-terms for new p, linear lossless case.
void PrintStatistics()
Print progress statistics.
bool isTimestepRightAfterRestore
This variable is true when calculating first time step after restore from checkpoint (to allow asynch...
TRealMatrix & Get_duydy()
Get the duydy matrix from the container.
TRealMatrix & Get_pml_x()
Get the pml_x matrix from the container.
bool IsCheckpointInterruption() const
Was the loop interrupted to checkpoint?
TRealMatrix & Get_uz_shifted()
Get the uz_shifted matrix from the container.
bool IsTimeToCheckpoint()
Is time to checkpoint (save actual state on disk).
void InitializeFFTPlans()
Initialize FFT plans.
TRealMatrix & Get_dzudzn_sgz()
Get the dzudzn_sgz matrix from the container.
void ComputeGradientVelocity()
Compute new values of acoustic velocity gradients.
void AddVelocitySource()
Add in velocity source.
TComplexMatrix & Get_ddz_k_shift_neg()
Get the ddz_k_shift_neg matrix from the container.
TCUFFTComplexMatrix & Get_cufft_z_temp()
Get the FFT_Z_temp from the container.
TOutputStreamContainer outputStreamContainer
Output stream container.
TRealMatrix & Get_kappa()
Get the kappa matrix from the container.
virtual void FreeMemory()
Memory deallocation.
TTimeMeasure dataLoadTime
Data load time of the simulation.
TRealMatrix & Get_pml_z()
Get the pml_z matrix from the container.
TComplexMatrix & Get_ddz_k_shift_pos()
Get the ddz_k_shift_pos matrix from the container.
TRealMatrix & Get_dxudxn_sgx()
Get the dxudxn_sgx matrix from the container.
TRealMatrix & Get_pml_z_sgz()
Get the pml_z_sgz matrix from the container.
The header file containing the class for real matrices.
TKSpaceFirstOrder3DSolver & operator=(const TKSpaceFirstOrder3DSolver &src)
operator = not allowed for public.
void GenerateKappa()
Generate kappa matrix for non-absorbing media.
TRealMatrix & Get_c2()
Get the c^2 matrix from the container.
TCUFFTComplexMatrix & Get_cufft_y_temp()
Get the FFT_Y_temp from the container.
TRealMatrix & Get_ux_shifted()
Get the ux_shifted matrix from the container.
double GetPreProcessingTime() const
Get pre-processing time.
TTimeMeasure iterationTime
Iteration time of the simulation.
TRealMatrix & Get_dyudyn_sgy()
Get the dyudyn_sgy matrix from the container.
TKSpaceFirstOrder3DSolver()
Constructor.
TCUFFTComplexMatrix & Get_cufft_x_temp()
Get the CUFFT_X_temp from the container.
TRealMatrix & Get_p_source_input()
Get the p_source_input matrix from the container.
TTimeMeasure totalTime
Total time of the simulation.
TRealMatrix & Get_temp_3_real_3D()
Get the Temp_3_RS3D matrix from the container.
T & GetMatrix(const TMatrixIdx matrixIdx)
Get the matrix with a specific type from the container.
void Compute_c2()
Calculate square of velocity.
void PrintFullNameCodeAndLicense() const
Print the code name and license.
TRealMatrix & Get_transducer_source_input()
Get the transducer_source_input matrix from the container.
The header file containing the parameters of the simulation.
void SumPressureNonlinearLossless()
Sum sub-terms for new p, linear lossless case.
TComplexMatrix & Get_z_shift_neg_r()
Get the y_shift_neg_r from the container.
const std::string GetCodeName() const
Get code name - release code version.
void CheckCheckpointFile()
Check the checkpoint file has the correct format and version.
TRealMatrix & Get_p0_source_input()
Get the p0_source_input from the container.
TRealMatrix & Get_p()
Get the p matrix from the container.
TComplexMatrix & Get_ddy_k_shift_pos()
Get the ddy_k_shift_pos matrix from the container.
TRealMatrix & Get_BonA()
Get the BonA matrix from the container.
TRealMatrix & Get_dxudxn()
Get the dxudxn matrix from the container.
The header file for class with time measurement.
TRealMatrix & Get_uz_sgz()
Get the uz_sgz matrix from the container.
TMatrixContainer matrixContainer
Matrix container with all the matrix classes.
TRealMatrix & Get_dzudzn()
Get the dzudzn matrix from the container.
double GetSimulationTime() const
Get simulation time (time loop).
void Calculate_p0_source()
Calculate p0_ ource.
TRealMatrix & Get_absorb_nabla2()
Get the absorb_nabla2 matrix from the container.
void GenerateKappaAndNablas()
Generate kappa matrix, absorb_nabla1, absorb_nabla2 for absorbing media.
void StoreSensorData()
Store sensor data.
TRealMatrix & Get_rho0()
Get the rho0 matrix from the container.
void WriteOutputDataInfo()
Write statistics and header into the output file.
TRealMatrix & Get_uz_source_input()
Get the uz_source_input matrix from the container.
void SumPressureTermsLinear(TRealMatrix &absorb_tau_temp, TRealMatrix &absorb_eta_temp, TRealMatrix &rhoxyz_sum)
Sum sub-terms to calculate new pressure, linear case.
TIndexMatrix & Get_sensor_mask_index()
Get the sensor_mask_index matrix from the container.
Class storing all parameters of the simulation.
TIndexMatrix & Get_delay_mask()
Get the delay_mask matrix from the container.
TRealMatrix & Get_temp_2_real_3D()
Get the Temp_2_RS3D matrix from the container.
The header file containing the class for 64b integer matrices.
void PostProcessing()
Post processing, and closing the output streams.
TRealMatrix & Get_dt_rho0_sgz()
Get the dt.*rho0_sgz matrix from the container.
TIndexMatrix & Get_p_source_index()
Get the p_source_index matrix from the container.
void ComputeMainLoop()
Compute the main time loop of the kspaceFirstOrder3D.
TRealMatrix & Get_dyudyn()
Get the dyudyn matrix from the container.
TRealMatrix & Get_pml_y_sgy()
Get the pml_y_sgy matrix from the container.
TRealMatrix & Get_pml_y()
Get the pml_y matrix from the container.
TIndexMatrix & Get_u_source_index()
Get the u_source_index matrix from the container.
void ComputePressureLinear()
Compute acoustic pressure for linear case.
double GetCumulatedTotalTime() const
Get total simulation time cumulated over all legs.
TIndexMatrix & Get_sensor_mask_corners()
Get the sensor_mask_corners matrix from the container.
TRealMatrix & Get_duxdx()
Get the duxdx matrix from the container.
TCUFFTComplexMatrix & Get_cufft_shift_temp()
Get the FFT_shift_temp the container.
Class implementing the matrix container.
void SumPressureTermsNonlinear(TRealMatrix &absorb_tau_temp, TRealMatrix &absorb_eta_temp, TRealMatrix &BonA_temp)
Sum sub-terms to calculate new pressure, non-linear case.
virtual void LoadInputData()
Load simulation data from the input file.
The header file with the class for complex matrices.
The class for real matrices.
virtual ~TKSpaceFirstOrder3DSolver()
Destructor.
TRealMatrix & Get_dt_rho0_sgx()
Get the dt.*rho0_sgx matrix from the container.
void ComputePressurePartsNonLinear(TRealMatrix &rho_part, TRealMatrix &BonA_part, TRealMatrix &du_part)
Calculate three temporary sums in the new pressure formula, non-linear absorbing case.
double GetCumulatedPostProcessingTime() const
Get post-processing time cumulated over all legs.
The class for 64b unsigned integers (indices). It is used for sensor_mask_index or sensor_corners_mas...
TTimeMeasure postProcessingTime
Post-processing time of the simulation.
void CheckOutputFile()
Check the output file has the correct format and version.
void GenerateTauAndEta()
Generate absorb_tau, absorb_eta for heterogenous media.
TRealMatrix & Get_uy_sgy()
Get the uy_sgy matrix from the container.
void LoadElapsedTimeFromOutputFile(THDF5_File &o1utputFile)
Reads the header of the output file and sets the cumulative elapsed time from the first log...
TParameters & parameters
Global parameters of the simulation.
Class measuring elapsed time.
void ComputePressureNonlinear()
Compute acoustic pressure for nonlinear case.
Name space for all CUDA kernels used in the 3D solver.
TTimeMeasure preProcessingTime
Pre-processing time of the simulation.
The header file containing the matrix container and the related matrix record class.
double GetCumulatedSimulationTime() const
Get simulation time (time loop) cumulated over all legs.
size_t actPercent
Percentage of the simulation done.
TRealMatrix & Get_duzdz()
Get the duzdz matrix from the container.
virtual void Compute()
Compute the k-space simulation.
TRealMatrix & Get_rhoz()
Get the rhoz matrix from the container.
TComplexMatrix & Get_ddx_k_shift_neg()
Get the ddx_k_shift_neg matrix from the container.
double GetCumulatedDataLoadTime() const
Get data load time cumulated over all legs.
double GetPostProcessingTime() const
Get post-processing time.
The header file defining the output stream container.
TTimeMeasure simulationTime
Simulation time of the simulation.
TComplexMatrix & Get_ddy_k_shift_neg()
Get the ddy_k_shift_neg matrix from the container.
virtual void AllocateMemory()
Memory allocation.
void SaveCheckpointData()
Save checkpoint data.
void CalculateShiftedVelocity()
Calculate ux_shifted, uy_shifted and uz_shifted.
double GetCumulatedPreProcessingTime() const
Get pre-processing time cumulated over all legs.
TComplexMatrix & Get_ddx_k_shift_pos()
Get the ddx_k_shift_pos matrix from the container.
TRealMatrix & Get_pml_x_sgx()
Get the pml_x_sgx matrix from the container.
double GetDataLoadTime() const
Get data load time.
TRealMatrix & Get_rhox()
Get the rhox matrix from the container.
The class for complex matrices.
void ComputeDensityNonliner()
Compute new values of acoustic density for non-linear case.
Class responsible for running the k-space first order 3D method.
TComplexMatrix & Get_y_shift_neg_r()
Get the y_shift_neg_r from the container.
TRealMatrix & Get_temp_1_real_3D()
Get the Temp_1_RS3D matrix from the container.
Class implementing 3D Real-To-Complex and Complex-To-Real transforms using CUDA FFT interface...
TRealMatrix & Get_rhoy()
Get the rhoy matrix from the container.
A container for output streams.
void GenerateInitialDenisty()
Calculate dt ./ rho0 for non-uniform grids.
TRealMatrix & Get_absorb_eta()
Get the absorb_eta matrix from the container.
Class wrapping the HDF5 routines.
void ComputeVelocity()
Compute new values of acoustic velocity.
TRealMatrix & Get_uy_shifted()
Get the uy_shifted matrix from the container.
size_t GetHostMemoryUsageInMB()
Get memory usage in MB on the CPU side.
TRealMatrix & Get_uy_source_input()
Get the uy_source_input matrix from the container.
void PreProcessingPhase()
Compute pre-processing phase.