42 using boost::program_options::command_line_parser;
43 using boost::program_options::value;
51 "Produce help message")(
"inputFile", value<std::vector<string>>()->multitoken(),
"Input file names.")(
52 "outputDir", value<string>(),
"Output directory name.")(
53 "chunkSize", value<float>()->default_value(10.0f),
"Side length of chunks.")(
54 "maxChunkOverlap", value<float>()->default_value(0.1f),
55 "maximum allowed overlap between chunks relative to the chunk size.")(
56 "chunkedMesh", value<string>(),
"Chunked mesh hdf5-file name.")(
57 "load", value<bool>()->default_value(
false),
"Set this value to true, if you want to load an hdf5-file")(
58 "x_min", value<float>()->default_value(0.0f),
"bounding box minimum value in x-dimension")(
59 "y_min", value<float>()->default_value(0.0f),
"bounding box minimum value in y-dimension")(
60 "z_min", value<float>()->default_value(0.0f),
"bounding box minimum value in z-dimension")(
61 "x_max", value<float>()->default_value(10.0f),
"bounding box maximum value in x-dimension")(
62 "y_max", value<float>()->default_value(10.0f),
"bounding box maximum value in y-dimension")(
63 "z_max", value<float>()->default_value(10.0f),
"bounding box maximum value in z-dimension")(
64 "cacheSize", value<int>()->default_value(200),
"while loading the maximum number of chunks in RAM")(
65 "meshName", value<std::string>()->default_value(
""),
"group name of the mesh if the HDF5 contains multiple meshes");
83 cout <<
"Error: You must specify an input file." << endl;
91 cout <<
"Error: You must specify an hdf5-file (\"chunkedMesh\") when loading." << endl;
103 return m_variables[
"inputFile"].as<std::vector<string>>();
float getChunkSize() const
Returns the side length of a chunk.
std::vector< std::string > getInputFile() const
Returns the input file.
bool printUsage() const
Prints a usage message to stdout.
float getXMax() const
Returns the x-max of the bounding box.
const kaboom::Options * options
string getChunkedMesh() const
Returns the chunked mesh file.
float getMaxChunkOverlap() const
Returns the maximum allowed chunk overlap.
variables_map m_variables
The internally used variable map.
int getCacheSize() const
Returns the cacheSize (maximum number of chunks in HashMap while loading)
float getZMin() const
Returns the z-min of the bounding box.
float getYMax() const
Returns the y-max of the bounding box.
options_description m_descr
The internally used option description.
float getXMin() const
Returns the x-min of the bounding box.
bool getLoad() const
Returns the load-flag. set to true for loading an existing hdf5-file and to false for chunking and sa...
Options(int argc, char **argv)
Ctor. Parses the command parameters given to the main function of the program.
positional_options_description m_posDescr
The internally used positional option description.
float getYMin() const
Returns the y-min of the bounding box.
string getOutputDir() const
Returns the output directory.
float getZMax() const
Returns the z-max of the bounding box.
std::string getMeshGroup() const
Returns the mesh group in the HDF5.