kspaceFirstOrder3D-OMP  1.2
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
CommandLineParameters Class Reference

The class to parse and store command line parameters. More...

#include <CommandLineParameters.h>

Collaboration diagram for CommandLineParameters:

Public Member Functions

 CommandLineParameters (const CommandLineParameters &)=delete
 Copy constructor not allowed.
 
virtual ~CommandLineParameters ()
 Destructor.
 
CommandLineParametersoperator= (const CommandLineParameters &)=delete
 operator= not allowed.
 
const std::string & getInputFileName () const
 Get input file name. More...
 
const std::string & getOutputFileName () const
 Get output file name. More...
 
const std::string & getCheckpointFileName () const
 Get Checkpoint file name. More...
 
size_t getNumberOfThreads () const
 Get number of threads. More...
 
size_t getProgressPrintInterval () const
 Get progress print interval. More...
 
size_t getCompressionLevel () const
 Get compression level. More...
 
bool isBenchmarkEnabled () const
 Is –benchmark set? More...
 
size_t getBenchmarkTimeStepsCount () const
 Get benchmark time step count. More...
 
bool isCheckpointEnabled () const
 Is checkpoint enabled? More...
 
size_t getCheckpointInterval () const
 Get checkpoint interval. More...
 
bool isPrintVersionOnly () const
 Is –version set? More...
 
bool getStorePressureRawFlag () const
 Is –p_raw set? 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_raw set? 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...
 
size_t getSamplingStartTimeIndex () const
 Get start time index when sensor data collection begins. More...
 
void printUsage ()
 Print usage of the code. More...
 
void printComandlineParamers ()
 Print setup commandline parameters. More...
 
void parseCommandLine (int argc, char **argv)
 Parse commandline parameters. More...
 

Protected Member Functions

 CommandLineParameters ()
 Default constructor - only friend class can create an instance. More...
 

Private Attributes

std::string mInputFileName
 Input file name.
 
std::string mOutputFileName
 Output file name.
 
std::string mCheckpointFileName
 Checkpoint file name.
 
size_t mNumberOfThreads
 Number of CPU threads value.
 
size_t mProgressPrintInterval
 Progress interval value.
 
size_t mCompressionLevel
 Compression level value for output and checkpoint files.
 
bool mBenchmarkFlag
 BenchmarkFlag value.
 
size_t mBenchmarkTimeStepCount
 Number of time steps used to benchmark the code.
 
size_t mCheckpointInterval
 Checkpoint interval in seconds.
 
bool mPrintVersionFlag
 Print version of the code and exit.
 
bool mStorePressureRawFlag
 Store raw time-series of pressure over the sensor mask?
 
bool mStorePressureRmsFlag
 Store RMS of pressure over the the sensor mask?
 
bool mStorePressureMaxFlag
 Store maximum of pressure over the sensor mask?
 
bool mStorePressureMinFlag
 Store minimum of pressure over the sensor mask?
 
bool mStorePressureMaxAllFlag
 Store maximum of pressure over the whole domain?
 
bool mStorePressureMinAllFlag
 Store minimum of pressure over the whole domain?
 
bool mStorePressureFinalAllFlag
 Store pressure in the final time step over the whole domain?
 
bool mStoreVelocityRawFlag
 Store raw time-series of velocity over the sensor mask?
 
bool mStoreVelocityNonStaggeredRawFlag
 Store un staggered raw time-series of velocity over the sensor mask?
 
bool mStoreVelocityRmsFlag
 Store RMS of velocity over the the sensor mask?
 
bool mStoreVelocityMaxFlag
 Store maximum of velocity over the sensor mask?
 
bool mStoreVelocityMinFlag
 Store minimum of velocity over the sensor mask?
 
bool mStoreVelocityMaxAllFlag
 Store maximum of velocity over the whole domain?
 
bool mStoreVelocityMinAllFlag
 Store minimum of velocity over the whole domain?
 
bool mStoreVelocityFinalAllFlag
 Store velocity in the final time step over the whole domain?
 
bool mCopySensorMaskFlag
 Copy sensor mask to the output file.
 
size_t mSamplingStartTimeStep
 StartTimeStep value.
 

Static Private Attributes

static constexpr size_t kDefaultCompressionLevel = 0
 Default compression level.
 
static constexpr size_t kDefaultProgressPrintInterval = 5
 Default progress print interval.
 

Friends

class Parameters
 Only Parameters can create this class.
 

Detailed Description

The class to parse and store command line parameters.

Definition at line 197 of file CommandLineParameters.h.

Constructor & Destructor Documentation

◆ CommandLineParameters()

CommandLineParameters::CommandLineParameters ( )
protected

Constructor.

Definition at line 702 of file CommandLineParameters.cpp.

Member Function Documentation

◆ getBenchmarkTimeStepsCount()

size_t CommandLineParameters::getBenchmarkTimeStepsCount ( ) const
inline
Returns
Number of time steps used to benchmark the code.

Definition at line 256 of file CommandLineParameters.h.

◆ getCheckpointFileName()

const std::string& CommandLineParameters::getCheckpointFileName ( ) const
inline
Returns
Checkpoint file name.

Definition at line 226 of file CommandLineParameters.h.

◆ getCheckpointInterval()

size_t CommandLineParameters::getCheckpointInterval ( ) const
inline
Returns
Checkpoint interval in seconds.

Definition at line 268 of file CommandLineParameters.h.

◆ getCompressionLevel()

size_t CommandLineParameters::getCompressionLevel ( ) const
inline
Returns
Compression level value for output and checkpoint files.

Definition at line 244 of file CommandLineParameters.h.

◆ getCopySensorMaskFlag()

bool CommandLineParameters::getCopySensorMaskFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 359 of file CommandLineParameters.h.

◆ getInputFileName()

const std::string& CommandLineParameters::getInputFileName ( ) const
inline
Returns
Input file name.

Definition at line 216 of file CommandLineParameters.h.

◆ getNumberOfThreads()

size_t CommandLineParameters::getNumberOfThreads ( ) const
inline
Returns
Number of CPU threads value.

Definition at line 232 of file CommandLineParameters.h.

◆ getOutputFileName()

const std::string& CommandLineParameters::getOutputFileName ( ) const
inline
Returns
Output file name.

Definition at line 221 of file CommandLineParameters.h.

◆ getProgressPrintInterval()

size_t CommandLineParameters::getProgressPrintInterval ( ) const
inline
Returns
How often to print progress.

Definition at line 238 of file CommandLineParameters.h.

◆ getSamplingStartTimeIndex()

size_t CommandLineParameters::getSamplingStartTimeIndex ( ) const
inline
Returns
When to start sampling data.

Definition at line 365 of file CommandLineParameters.h.

◆ getStorePressureFinalAllFlag()

bool CommandLineParameters::getStorePressureFinalAllFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 312 of file CommandLineParameters.h.

◆ getStorePressureMaxAllFlag()

bool CommandLineParameters::getStorePressureMaxAllFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 302 of file CommandLineParameters.h.

◆ getStorePressureMaxFlag()

bool CommandLineParameters::getStorePressureMaxFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 292 of file CommandLineParameters.h.

◆ getStorePressureMinAllFlag()

bool CommandLineParameters::getStorePressureMinAllFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 307 of file CommandLineParameters.h.

◆ getStorePressureMinFlag()

bool CommandLineParameters::getStorePressureMinFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 297 of file CommandLineParameters.h.

◆ getStorePressureRawFlag()

bool CommandLineParameters::getStorePressureRawFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 282 of file CommandLineParameters.h.

◆ getStorePressureRmsFlag()

bool CommandLineParameters::getStorePressureRmsFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 287 of file CommandLineParameters.h.

◆ getStoreVelocityFinalAllFlag()

bool CommandLineParameters::getStoreVelocityFinalAllFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 354 of file CommandLineParameters.h.

◆ getStoreVelocityMaxAllFlag()

bool CommandLineParameters::getStoreVelocityMaxAllFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 344 of file CommandLineParameters.h.

◆ getStoreVelocityMaxFlag()

bool CommandLineParameters::getStoreVelocityMaxFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 334 of file CommandLineParameters.h.

◆ getStoreVelocityMinAllFlag()

bool CommandLineParameters::getStoreVelocityMinAllFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 349 of file CommandLineParameters.h.

◆ getStoreVelocityMinFlag()

bool CommandLineParameters::getStoreVelocityMinFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 339 of file CommandLineParameters.h.

◆ getStoreVelocityNonStaggeredRawFlag()

bool CommandLineParameters::getStoreVelocityNonStaggeredRawFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 324 of file CommandLineParameters.h.

◆ getStoreVelocityRawFlag()

bool CommandLineParameters::getStoreVelocityRawFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 319 of file CommandLineParameters.h.

◆ getStoreVelocityRmsFlag()

bool CommandLineParameters::getStoreVelocityRmsFlag ( ) const
inline
Returns
true if the flag is set.

Definition at line 329 of file CommandLineParameters.h.

◆ isBenchmarkEnabled()

bool CommandLineParameters::isBenchmarkEnabled ( ) const
inline
Returns
true if the flag is set.

Definition at line 250 of file CommandLineParameters.h.

◆ isCheckpointEnabled()

bool CommandLineParameters::isCheckpointEnabled ( ) const
inline
Returns
true if checkpointing is enabled.

Definition at line 262 of file CommandLineParameters.h.

◆ isPrintVersionOnly()

bool CommandLineParameters::isPrintVersionOnly ( ) const
inline
Returns
true if the flag is set.

Definition at line 274 of file CommandLineParameters.h.

◆ parseCommandLine()

void CommandLineParameters::parseCommandLine ( int  argc,
char **  argv 
)
Parameters
[in,out]argc- number of commandline parameters.
[in,out]argv- commandline parameters.
Exceptions
callexit when error in commandline.

Parse command line.

Definition at line 210 of file CommandLineParameters.cpp.

◆ printComandlineParamers()

void CommandLineParameters::printComandlineParamers ( )

Print out commandline parameters.

Definition at line 82 of file CommandLineParameters.cpp.

◆ printUsage()

void CommandLineParameters::printUsage ( )

Print usage and exit.

Definition at line 67 of file CommandLineParameters.cpp.


The documentation for this class was generated from the following files: