![]() |
kspaceFirstOrder3D-OMP
1.2
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
|
Class storing all parameters of the simulation. More...
#include <Parameters.h>

Public Types | |
| enum | SensorMaskType { SensorMaskType::kIndex = 0, SensorMaskType::kCorners = 1 } |
| Sensor mask type (linear or cuboid corners). More... | |
Public Member Functions | |
| Parameters (const Parameters &)=delete | |
| Copy constructor not allowed. | |
| virtual | ~Parameters () |
| Destructor. More... | |
| Parameters & | operator= (const Parameters &)=delete |
| operator= not allowed. | |
| void | init (int argc, char **argv) |
| Parse command line and read scalar values form the input file. More... | |
| void | printSimulatoinSetup () |
| Print the simulation setup (all parameters). More... | |
| bool | isPrintVersionOnly () const |
| Shall the code print version and exit? More... | |
| void | readScalarsFromInputFile () |
| Read scalar values from the input HDF5 file. More... | |
| void | saveScalarsToOutputFile () |
| Save scalar values into the output HDF5 file. More... | |
| std::string | getGitHash () const |
| Get git hash of the code. More... | |
| size_t | getNumberOfThreads () const |
| Get number of CPU threads to use. More... | |
| size_t | getCompressionLevel () const |
| Get compression level. More... | |
| size_t | getProgressPrintInterval () const |
| Get progress print interval. More... | |
| bool | isCheckpointEnabled () const |
| Is checkpoint enabled? More... | |
| size_t | getCheckpointInterval () const |
| Get checkpoint interval. More... | |
| Hdf5File & | getInputFile () |
| Get input file handle. More... | |
| Hdf5File & | getOutputFile () |
| Get output file handle. More... | |
| Hdf5File & | getCheckpointFile () |
| Get checkpoint file handle. More... | |
| Hdf5FileHeader & | getFileHeader () |
| Get file header handle. More... | |
| std::string | getInputFileName () const |
| Get input file name. More... | |
| std::string | getOutputFileName () const |
| Get output file name. More... | |
| std::string | getCheckpointFileName () const |
| Get checkpoint file name. More... | |
| DimensionSizes | getFullDimensionSizes () const |
| Get full dimension sizes of the simulation (real classes). More... | |
| DimensionSizes | getReducedDimensionSizes () const |
| Get reduced dimension sizes of the simulation (complex classes). More... | |
| size_t | getNt () const |
| Get total number of time steps. More... | |
| size_t | getTimeIndex () const |
| Get actual simulation time step. More... | |
| void | setTimeIndex (const size_t timeIndex) |
| Set simulation time step - should be used only when recovering from checkpoint. More... | |
| void | incrementTimeIndex () |
| Increment simulation time step. | |
| float | getDt () const |
| Get time step size. More... | |
| float | getDx () const |
| Get spatial displacement in x. More... | |
| float | getDy () const |
| Get spatial displacement in y. More... | |
| float | getDz () const |
| Get spatial displacement in z. More... | |
| float | getCRef () const |
| Get reference sound speed. More... | |
| bool | getC0ScalarFlag () const |
| Is sound speed in the medium homogeneous (scalar value)? More... | |
| float | getC0Scalar () const |
| Get scalar value of sound speed. More... | |
| float | getC2Scalar () const |
| Get scalar value of sound speed squared. More... | |
| bool | getRho0ScalarFlag () const |
| Is density in the medium homogeneous (scalar value)? More... | |
| float | getRho0Scalar () const |
| Get value of homogeneous medium density. More... | |
| float | getRho0SgxScalar () const |
| Get value of homogeneous medium density on staggered grid in x direction. More... | |
| float | getDtRho0SgxScalar () const |
| Get value of dt / rho0Sgx. More... | |
| float | getRho0SgyScalar () const |
| Get value of homogeneous medium density on staggered grid in y direction. More... | |
| float | getDtRho0SgyScalar () const |
| Get value of dt / rho0Sgy. More... | |
| float | getRho0SgzScalar () const |
| Get value of homogeneous medium density on staggered grid in z direction. More... | |
| float | getDtRho0SgzScalar () const |
| Get value of dt / rho0Sgz. More... | |
| size_t | getNonUniformGridFlag () const |
| Enable non uniform grid? - not implemented yet. More... | |
| size_t | getAbsorbingFlag () const |
| Is the simulation absrobing or lossless? More... | |
| size_t | getNonLinearFlag () const |
| Is the wave propagation nonlinear? More... | |
| bool | getAlphaCoeffScalarFlag () const |
| Is alpha absorption coefficient homogeneous (scalar value)? More... | |
| float | getAlphaCoeffScalar () const |
| Get value of alpha absorption coefficient. More... | |
| float | getAlphaPower () const |
| Get alpha power value for the absorption law. More... | |
| float | getAbsorbEtaScalar () const |
| Get absorb eta coefficient for homogeneous medium (scalar value)? More... | |
| void | setAbsorbEtaScalar (const float absrobEta) |
| Set absorb eta coefficient for homogeneous medium (scalar value). More... | |
| float | getAbsorbTauScalar () const |
| Get absorb tau coefficient for homogeneous medium. More... | |
| void | setAbsorbTauScalar (const float absorbTau) |
| Set absorb tau coefficient for homogeneous medium (scalar value). More... | |
| bool | getBOnAScalarFlag () const |
| Is nonlinear coefficient homogeneous in the medium (scalar value)? More... | |
| float | getBOnAScalar () const |
| Get nonlinear coefficient for homogenous medium. More... | |
| size_t | getPmlXSize () const |
| Get depth of the perfectly matched layer in x. More... | |
| size_t | getPmlYSize () const |
| Get depth of the perfectly matched layer in y. More... | |
| size_t | getPmlZSize () const |
| Get depth of the perfectly matched layer in z. More... | |
| float | getPmlXAlpha () const |
| Get Perfectly matched layer attenuation in x, not implemented. More... | |
| float | getPmlYAlpha () const |
| Get Perfectly matched layer attenuation in y, not implemented. More... | |
| float | getPmlZAlpha () const |
| Get Perfectly matched layer attenuation in z , not implemented. More... | |
| size_t | getPressureSourceFlag () const |
| Get pressure source flag. More... | |
| size_t | getInitialPressureSourceFlag () const |
| Get initial pressure source flag (p0). More... | |
| size_t | getTransducerSourceFlag () const |
| Get transducer source flag. More... | |
| size_t | getVelocityXSourceFlag () const |
| Get velocity in x source flag. More... | |
| size_t | getVelocityYSourceFlag () const |
| Get velocity in y source flag. More... | |
| size_t | getVelocityZSourceFlag () const |
| Get velocity in z source flag. More... | |
| size_t | getPressureSourceIndexSize () const |
| Get spatial size of the pressure source. More... | |
| size_t | getTransducerSourceInputSize () const |
| Get spatial size of the transducer source. More... | |
| size_t | getVelocitySourceIndexSize () const |
| Get spatial size of the velocity source. More... | |
| size_t | getPressureSourceMode () const |
| Get pressure source mode. More... | |
| size_t | getPressureSourceMany () const |
| Get number of time series in the pressure source. More... | |
| size_t | getVelocitySourceMode () const |
| Get velocity source mode. More... | |
| size_t | getVelocitySourceMany () const |
| Get number of time series in the velocity sources. More... | |
| SensorMaskType | getSensorMaskType () const |
| Get sensor mask type (linear or corners). More... | |
| size_t | getSensorMaskIndexSize () const |
| Get spatial size of the index sensor mask. More... | |
| size_t | getSensorMaskCornersSize () const |
| Get number of cuboids the sensor is composed of. More... | |
| size_t | getSamplingStartTimeIndex () const |
| Get start time index when sensor data collection begins. More... | |
| bool | getStorePressureRawFlag () const |
| Is -p or –p_raw specified at the command line? More... | |
| bool | getStorePressureRmsFlag () const |
| Is –p_rms set? More... | |
| bool | getStorePressureMaxFlag () const |
| Is –p_max set? More... | |
| bool | getStorePressureMinFlag () const |
| Is –p_min set? More... | |
| bool | getStorePressureMaxAllFlag () const |
| Is –p_max_all set? More... | |
| bool | getStorePressureMinAllFlag () const |
| Is –p_min_all set? More... | |
| bool | getStorePressureFinalAllFlag () const |
| Is –p_final set? More... | |
| bool | getStoreVelocityRawFlag () const |
| Is -u or –u_raw specified at the command line? More... | |
| bool | getStoreVelocityNonStaggeredRawFlag () const |
| Is –u_non_staggered_raw set? More... | |
| bool | getStoreVelocityRmsFlag () const |
| Is –u_rms set? More... | |
| bool | getStoreVelocityMaxFlag () const |
| Is –u_max set? More... | |
| bool | getStoreVelocityMinFlag () const |
| Is –u_min set? More... | |
| bool | getStoreVelocityMaxAllFlag () const |
| Is –u_max_all set? More... | |
| bool | getStoreVelocityMinAllFlag () const |
| Is –u_min set? More... | |
| bool | getStoreVelocityFinalAllFlag () const |
| Is –u_final set? More... | |
| bool | getCopySensorMaskFlag () const |
| Is –copy_mask set set? More... | |
Static Public Member Functions | |
| static Parameters & | getInstance () |
| Get instance of the singleton class. More... | |
Protected Member Functions | |
| Parameters () | |
| Constructor not allowed for public. More... | |
Private Attributes | |
| CommandLineParameters | mCommandLineParameters |
| Class with command line parameters. | |
| Hdf5File | mInputFile |
| Handle to the input HDF5 file. | |
| Hdf5File | mOutputFile |
| Handle to the output HDF5 file. | |
| Hdf5File | mCheckpointFile |
| Handle to the checkpoint HDF5 file. | |
| Hdf5FileHeader | mFileHeader |
| Handle to file header. | |
| DimensionSizes | mFullDimensionSizes |
| Full 3D dimension sizes. | |
| DimensionSizes | mReducedDimensionSizes |
| Reduced 3D dimension sizes. | |
| size_t | mNt |
| Total number of time steps. | |
| size_t | mTimeIndex |
| Actual time index (time step of the simulation). | |
| float | mDt |
| Time step size. | |
| float | mDx |
| Spatial displacement in x. | |
| float | mDy |
| Spatial displacement in y. | |
| float | mDz |
| Spatial displacement in z. | |
| float | mCRef |
| Reference sound speed. | |
| bool | mC0ScalarFlag |
| Is sound speed in the medium homogeneous? | |
| float | mC0Scalar |
| Scalar value of sound speed. | |
| bool | mRho0ScalarFlag |
| Is density in the medium homogeneous? | |
| float | mRho0Scalar |
| Homogeneous medium density. | |
| float | mRho0SgxScalar |
| Homogeneous medium density on staggered grid in x direction. | |
| float | mRho0SgyScalar |
| Homogeneous medium density on staggered grid in y direction. | |
| float | mRho0SgzScalar |
| Homogeneous medium density on staggered grid in z direction. | |
| size_t | mNonUniformGridFlag |
| Enable non uniform grid? | |
| size_t | mAbsorbingFlag |
| Is the simulation absrobing or lossless? | |
| size_t | mNonLinearFlag |
| Is the wave propagation nonlinear? | |
| bool | mAlphaCoeffScalarFlag |
| Is alpha absorption coefficient homogeneous? | |
| float | mAlphaCoeffScalar |
| Alpha absorption coefficient. | |
| float | mAlphaPower |
| Alpha power value for the absorption law. | |
| float | mAbsorbEtaScalar |
| Absorb eta coefficient for homogeneous medium. | |
| float | mAbsorbTauScalar |
| Absorb tau coefficient for homogeneous medium. | |
| bool | mBOnAScalarFlag |
| Is nonlinear coefficient homogeneous in the medium? | |
| float | mBOnAScalar |
| Nonlinear coefficient for homogenous medium. | |
| size_t | mPmlXSize |
| Depth of the perfectly matched layer in x. | |
| size_t | mPmlYSize |
| Depth of the perfectly matched layer in y. | |
| size_t | mPmlZSize |
| Depth of the perfectly matched layer in z. | |
| float | mPmlXAlpha |
| Perfectly matched layer attenuation in x. | |
| float | mPmlYAlpha |
| Perfectly matched layer attenuation in y. | |
| float | mPmlZAlpha |
| Perfectly matched layer attenuation in z. | |
| size_t | mPressureSourceFlag |
| Pressure source flag. | |
| size_t | mInitialPressureSourceFlag |
| Initial pressure source flag (p0). | |
| size_t | mTransducerSourceFlag |
| Transducer source flag. | |
| size_t | mVelocityXSourceFlag |
| Velocity in x source flag. | |
| size_t | mVelocityYSourceFlag |
| Velocity in y source flag. | |
| size_t | mVelocityZSourceFlag |
| Velocity in z source flag. | |
| size_t | mPressureSourceIndexSize |
| Spatial size of the pressure source. | |
| size_t | mTransducerSourceInputSize |
| Spatial size of the transducer source. | |
| size_t | mVelocitySourceIndexSize |
| Spatial size of the velocity source. | |
| size_t | mPressureSourceMode |
| Pressure source mode. | |
| size_t | mPressureSourceMany |
| Number of time series in the pressure source. | |
| size_t | mVelocitySourceMode |
| Velocity source mode. | |
| size_t | mVelocitySourceMany |
| Number of time series in the velocity sources. | |
| SensorMaskType | mSensorMaskType |
| Sensor mask type (index / corners). | |
| size_t | mSensorMaskIndexSize |
| How many elements there are in the linear mask. | |
| size_t | mSensorMaskCornersSize |
| Sensor_mask_corners_size - how many cuboids are in the mask. | |
Static Private Attributes | |
| static bool | sParametersInstanceFlag = false |
| Singleton flag. | |
| static Parameters * | sPrametersInstance = nullptr |
| Singleton instance. | |
Class storing all parameters of the simulation.
Definition at line 50 of file Parameters.h.
|
strong |
Sensor mask type (linear or cuboid corners).
| Enumerator | |
|---|---|
| kIndex | Linear sensor mask. |
| kCorners | Cuboid corners sensor mask. |
Definition at line 59 of file Parameters.h.
|
virtual |
Destructor.
Definition at line 70 of file Parameters.cpp.
|
protected |
Constructor.
Definition at line 489 of file Parameters.cpp.
|
inline |
Definition at line 340 of file Parameters.h.
|
inline |
Definition at line 314 of file Parameters.h.
|
inline |
Definition at line 350 of file Parameters.h.
|
inline |
Definition at line 330 of file Parameters.h.
|
inline |
Definition at line 325 of file Parameters.h.
|
inline |
Definition at line 335 of file Parameters.h.
|
inline |
Definition at line 366 of file Parameters.h.
|
inline |
Definition at line 361 of file Parameters.h.
|
inline |
Definition at line 254 of file Parameters.h.
|
inline |
Definition at line 249 of file Parameters.h.
|
inline |
Definition at line 259 of file Parameters.h.
|
inline |
Definition at line 163 of file Parameters.h.
|
inline |
Definition at line 184 of file Parameters.h.
|
inline |
Definition at line 145 of file Parameters.h.
|
inline |
Definition at line 127 of file Parameters.h.
|
inline |
Definition at line 586 of file Parameters.h.
|
inline |
Definition at line 244 of file Parameters.h.
|
inline |
Definition at line 222 of file Parameters.h.
|
inline |
Definition at line 281 of file Parameters.h.
|
inline |
Definition at line 291 of file Parameters.h.
|
inline |
Definition at line 301 of file Parameters.h.
|
inline |
Definition at line 227 of file Parameters.h.
|
inline |
Definition at line 232 of file Parameters.h.
|
inline |
Definition at line 237 of file Parameters.h.
|
inline |
Definition at line 168 of file Parameters.h.
|
inline |
Definition at line 191 of file Parameters.h.
| string Parameters::getGitHash | ( | ) | const |
Get GitHash of the code
Definition at line 471 of file Parameters.cpp.
|
inline |
Definition at line 413 of file Parameters.h.
|
inline |
Definition at line 153 of file Parameters.h.
|
inline |
Definition at line 174 of file Parameters.h.
|
static |
Get instance of singleton class.
Definition at line 84 of file Parameters.cpp.
|
inline |
Definition at line 319 of file Parameters.h.
|
inline |
Definition at line 309 of file Parameters.h.
|
inline |
Definition at line 203 of file Parameters.h.
|
inline |
Definition at line 121 of file Parameters.h.
|
inline |
Definition at line 158 of file Parameters.h.
|
inline |
Definition at line 179 of file Parameters.h.
|
inline |
Definition at line 389 of file Parameters.h.
|
inline |
Definition at line 373 of file Parameters.h.
|
inline |
Definition at line 394 of file Parameters.h.
|
inline |
Definition at line 378 of file Parameters.h.
|
inline |
Definition at line 399 of file Parameters.h.
|
inline |
Definition at line 383 of file Parameters.h.
|
inline |
Definition at line 408 of file Parameters.h.
|
inline |
Definition at line 444 of file Parameters.h.
|
inline |
Definition at line 466 of file Parameters.h.
|
inline |
Definition at line 461 of file Parameters.h.
|
inline |
Definition at line 133 of file Parameters.h.
|
inline |
Definition at line 197 of file Parameters.h.
|
inline |
Definition at line 271 of file Parameters.h.
|
inline |
Definition at line 266 of file Parameters.h.
|
inline |
Definition at line 276 of file Parameters.h.
|
inline |
Definition at line 286 of file Parameters.h.
|
inline |
Definition at line 296 of file Parameters.h.
|
inline |
Definition at line 499 of file Parameters.h.
|
inline |
Definition at line 494 of file Parameters.h.
|
inline |
Definition at line 489 of file Parameters.h.
|
inline |
Definition at line 484 of file Parameters.h.
|
inline |
Definition at line 535 of file Parameters.h.
|
inline |
Definition at line 525 of file Parameters.h.
|
inline |
Definition at line 515 of file Parameters.h.
|
inline |
Definition at line 530 of file Parameters.h.
|
inline |
Definition at line 520 of file Parameters.h.
|
inline |
Definition at line 505 of file Parameters.h.
|
inline |
Definition at line 510 of file Parameters.h.
|
inline |
Definition at line 580 of file Parameters.h.
|
inline |
Definition at line 570 of file Parameters.h.
|
inline |
Definition at line 560 of file Parameters.h.
|
inline |
Definition at line 575 of file Parameters.h.
|
inline |
Definition at line 565 of file Parameters.h.
|
inline |
Definition at line 547 of file Parameters.h.
|
inline |
Definition at line 542 of file Parameters.h.
|
inline |
Definition at line 555 of file Parameters.h.
|
inline |
Definition at line 208 of file Parameters.h.
|
inline |
Definition at line 419 of file Parameters.h.
|
inline |
Definition at line 449 of file Parameters.h.
|
inline |
Definition at line 454 of file Parameters.h.
|
inline |
Definition at line 477 of file Parameters.h.
|
inline |
Definition at line 472 of file Parameters.h.
|
inline |
Definition at line 425 of file Parameters.h.
|
inline |
Definition at line 431 of file Parameters.h.
|
inline |
Definition at line 437 of file Parameters.h.
| void Parameters::init | ( | int | argc, |
| char ** | argv | ||
| ) |
| [in] | argc | - Number of commandline parameters. |
| [in] | argv | - Commandline parameters. |
| std::invalid_argument | - If sampling is supposed to start out of the simulation time span. |
Parse command line and read scalar values from the input file to initialise the class and the simulation.
Definition at line 102 of file Parameters.cpp.
|
inline |
Definition at line 140 of file Parameters.h.
|
inline |
Definition at line 95 of file Parameters.h.
| void Parameters::printSimulatoinSetup | ( | ) |
Print parameters of the simulation based in the actual level of verbosity.
Definition at line 137 of file Parameters.cpp.
| void Parameters::readScalarsFromInputFile | ( | ) |
| ios:failure | - If the file cannot be open or is of a wrong type or version. |
| std::invalid_argument | - If some values are not correct or not supported. |
Read scalar values from the input HDF5 file.
Definition at line 169 of file Parameters.cpp.
| void Parameters::saveScalarsToOutputFile | ( | ) |
| ios:failure | - If the output file is closed. |
Save scalars into the output HDF5 file.
Definition at line 391 of file Parameters.cpp.
|
inline |
| [in] | absrobEta | - New value for absorb eta |
Definition at line 345 of file Parameters.h.
|
inline |
| [in] | absorbTau | - New value for absorb tau. |
Definition at line 355 of file Parameters.h.
|
inline |
| [in] | timeIndex | - Actual time step. |
Definition at line 213 of file Parameters.h.