| kspaceFirstOrder3D-OMP 1.0 The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D

- Main Page
- Classes
- Files

- File List
- File Members

Parameters/Parameters.h
Go to the documentation of this file.

    00001
    00031 #ifndef PARAMETERS_H
    00032 #define  PARAMETERS_H
    00033
    00034 #include <string>
    00035
    00036 #include <Parameters/CommandLineParameters.h>
    00037
    00038 #include <Utils/DimensionSizes.h>
    00039 #include <HDF5/HDF5_File.h>
    00040
    00047 class TParameters {
    00048 public:
    00049
    00051     static TParameters* GetInstance();
    00052
    00054     virtual ~TParameters() {
    00055         ParametersInstanceFlag = false;
    00056          if (ParametersSingleInstance) delete ParametersSingleInstance;
    00057          ParametersSingleInstance = NULL;
    00058
    00059     };
    00060
    00062     void ParseCommandLine(int argc, char** argv);
    00064     void ReadScalarsFromHDF5InputFile(THDF5_File & HDF5_InputFile);
    00066     void SaveScalarsToHDF5File(THDF5_File & HDF5_OutputFile);
    00067
    00069     TDimensionSizes GetFullDimensionSizes   () const {return FullDimensionSizes; };
    00071     TDimensionSizes GetReducedDimensionSizes() const {return ReducedDimensionSizes; };
    00072
    00074     long  Get_Nt()               const {return Nt;};
    00075
    00077     float Get_dt()               const {return dt;};
    00079     float Get_dx()               const {return dx;};
    00081     float Get_dy()               const {return dy;};
    00083     float Get_dz()               const {return dz;};
    00084
    00086     float Get_c_ref()            const {return c_ref;};
    00088     float Get_alpha_power()      const {return alpha_power; };
    00089
    00091     long  Get_pml_x_size()       const {return pml_x_size;};
    00093     long  Get_pml_y_size()       const {return pml_y_size;};
    00095     long  Get_pml_z_size()       const {return pml_z_size;};
    00096
    00098     float Get_pml_x_alpha_size() const {return pml_x_alpha;};
    00100     float Get_pml_y_alpha_size() const {return pml_y_alpha;};
    00102     float Get_pml_z_alpha_size() const {return pml_z_alpha;};
    00103
    00104
    00106     long  Get_ux_source_flag()   const {return ux_source_flag;};
    00108     long  Get_uy_source_flag()   const {return uy_source_flag;};
    00110     long  Get_uz_source_flag()   const {return uz_source_flag;};
    00112     long  Get_u_source_many()    const {return u_source_many;};
    00114     long  Get_u_source_mode()    const {return u_source_mode;};
    00115
    00117     long  Get_p_source_flag()    const {return p_source_flag; };
    00119     long  Get_p0_source_flag()   const {return p0_source_flag;};
    00121     long  Get_p_source_many()    const {return p_source_many;};
    00123     long  Get_p_source_mode()    const {return p_source_mode;};
    00124
    00126     long  Get_nonuniform_grid_flag()         const { return nonuniform_grid_flag;};
    00128     long  Get_absorbing_flag()               const { return absorbing_flag; };
    00130     long  Get_nonlinear_flag()               const { return nonlinear_flag; };
    00132     long  Get_transducer_source_flag()       const {return transducer_source_flag;};
    00133
    00135     long  Get_sensor_mask_index_size()       const { return sensor_mask_ind_size;}
    00137     long  Get_u_source_index_size()          const { return u_source_index_size;}
    00139     long  Get_p_source_index_size()          const { return p_source_index_size;}
    00141     long  Get_transducer_source_input_size() const { return transducer_source_input_size;}
    00142
    00144     bool   Get_alpha_coeff_scallar_flag()   const { return alpha_coeff_scalar_flag;};
    00146     float& Get_alpha_coeff_scallar()              { return alpha_coeff_scalar; } // cannot be const beacuse of other optimizations
    00147
    00149     bool   Get_c0_scalar_flag()             const {return c0_scalar_flag; };
    00151     float& Get_c0_scalar()                        {return c0_scalar; };
    00152
    00154     float & Get_absorb_eta_scalar()               {return absorb_eta_scalar; };
    00156     float & Get_absorb_tau_scalar()               {return absorb_tau_scalar; };
    00157
    00159     bool   Get_BonA_scalar_flag()         const  { return BonA_scalar_flag; };
    00161     float& Get_BonA_scalar()                     { return BonA_scalar; };
    00162
    00164     bool    Get_rho0_scalar_flag()        const  {return rho0_scalar_flag; };
    00166     float&  Get_rho0_scalar()                    {return rho0_scalar; };
    00168     float&  Get_rho0_sgx_scalar()                {return rho0_sgx_scalar; };
    00170     float&  Get_rho0_sgy_scalar()                {return rho0_sgy_scalar; };
    00172     float&  Get_rho0_sgz_scalar()                {return rho0_sgz_scalar; };
    00173
    00175     string GetInputFileName()           const {return CommandLinesParameters.GetInputFileName();};
    00177     string GetOutputFileName()          const {return CommandLinesParameters.GetOutputFileName();};
    00178
    00180     int GetCompressionLevel()           const {return CommandLinesParameters.GetCompressionLevel();};
    00182     int GetNumberOfThreads()            const {return CommandLinesParameters.GetNumberOfThreads();};
    00184     int GetVerboseInterval()            const {return CommandLinesParameters.GetVerboseInterval();};
    00185
    00187     int GetStartTimeIndex()          const {return CommandLinesParameters.GetStartTimeIndex();};
    00188
    00190     bool IsVersion()                    const {return CommandLinesParameters.IsVersion();};
    00192     bool IsStore_p_raw()                const {return CommandLinesParameters.IsStore_p_raw();};
    00194     bool IsStore_p_rms()                const {return CommandLinesParameters.IsStore_p_rms();};
    00196     bool IsStore_p_max()                const {return CommandLinesParameters.IsStore_p_max();};
    00198     bool IsStore_p_final()              const {return CommandLinesParameters.IsStore_p_final();};
    00199
    00201     bool IsStore_u_raw()                const {return CommandLinesParameters.IsStore_u_raw();};
    00203     bool IsStore_u_rms()                const {return CommandLinesParameters.IsStore_u_rms();};
    00205     bool IsStore_u_max()                const {return CommandLinesParameters.IsStore_u_max();};
    00207     bool IsStore_u_final()              const {return CommandLinesParameters.IsStore_u_final();};
    00208
    00210     bool IsStore_I_avg()                const {return CommandLinesParameters.IsStore_I_avg();};
    00212     bool IsStore_I_max()                const {return CommandLinesParameters.IsStore_I_max();};
    00213
    00214
    00215
    00217     THDF5_File        HDF5_InputFile;
    00219     THDF5_File        HDF5_OutputFile;
    00221     THDF5_FileHeader  HDF5_FileHeader;
    00222
    00223
    00224 protected:
    00225
    00227     TParameters();
    00229     TParameters(const TParameters& src);
    00230
    00232     TParameters& operator = (const TParameters& src );
    00233
    00235     TCommandLineParameters CommandLinesParameters;
    00236
    00237
    00239     long  Nt;
    00240
    00242     float dt;
    00244     float dx;
    00246     float dy;
    00248     float dz;
    00249
    00251     float c_ref;
    00253     float alpha_power;
    00254
    00256     TDimensionSizes FullDimensionSizes;
    00258     TDimensionSizes ReducedDimensionSizes;
    00259
    00261     long sensor_mask_ind_size;
    00263     long u_source_index_size;
    00265     long p_source_index_size;
    00267     long transducer_source_input_size;
    00268
    00269
    00271     long ux_source_flag;
    00273     long uy_source_flag;
    00275     long uz_source_flag;
    00276
    00278     long p_source_flag;
    00280     long p0_source_flag;
    00282     long transducer_source_flag;
    00283
    00285     long u_source_many;
    00287     long u_source_mode;
    00288
    00290     long p_source_mode;
    00292     long p_source_many;
    00293
    00295     long nonuniform_grid_flag;
    00297     long absorbing_flag;
    00299     long nonlinear_flag;
    00300
    00302     long pml_x_size;
    00304     long pml_y_size;
    00306     long pml_z_size;
    00307
    00309     float pml_x_alpha;
    00311     float pml_y_alpha;
    00313     float pml_z_alpha;
    00314
    00316     bool  alpha_coeff_scalar_flag;
    00318     float alpha_coeff_scalar;
    00319
    00321     bool  c0_scalar_flag;
    00323     float c0_scalar;
    00324
    00326     float absorb_eta_scalar;
    00328     float absorb_tau_scalar;
    00329
    00331     bool  BonA_scalar_flag;
    00333     float BonA_scalar;
    00334
    00336     bool  rho0_scalar_flag;
    00338     float rho0_scalar;
    00340     float rho0_sgx_scalar;
    00342     float rho0_sgy_scalar;
    00344     float rho0_sgz_scalar;
    00345
    00346
    00348     static bool         ParametersInstanceFlag;
    00350     static TParameters *ParametersSingleInstance;
    00351
    00352
    00353
    00354
    00355 private:
    00356
    00358     void PrintUsageAndExit();
    00359
    00360 };
    00361
    00362 #endif   /* PARAMETERS_H */
    00363
    00364

All Classes Files Functions Variables Typedefs Enumerations