IOSS  2.0
shell_interface.h
Go to the documentation of this file.
1 /*
2  * Copyright(C) 1999-2020 National Technology & Engineering Solutions
3  * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
4  * NTESS, the U.S. Government retains certain rights in this software.
5  *
6  * See packages/seacas/LICENSE for details
7  */
8 #ifndef shell_SystemInterface_h
9 #define shell_SystemInterface_h
10 
11 #include "Ioss_GetLongOpt.h"
12 
13 #include <iosfwd>
14 #include <string>
15 #include <vector>
16 
17 /** \brief A special namespace for the io_shell demonstration program interFace.
18  */
19 namespace IOShell {
20  class Interface
21  {
22  public:
23  Interface();
25 
26  bool parse_options(int argc, char **argv);
27 
28  //! Dumps representation of data in this class to cerr
29 
30  void enroll_options();
31 
33 
34  std::vector<std::string> inputFile;
35  std::string outputFile;
36  std::string inFiletype{"unknown"};
37  std::string outFiletype{"unknown"};
38  std::string groupName;
39  std::string decomp_method;
40  std::string compose_output{"default"};
41  double maximum_time{std::numeric_limits<double>::max()};
42  double minimum_time{-std::numeric_limits<double>::max()};
43  double append_time{std::numeric_limits<double>::max()};
44  double timestep_delay{0.0};
45  int append_step{std::numeric_limits<int>::max()};
51 
52  //! If non-zero, then put `split_times` timesteps in each file. Then close file and start new
53  //! file.
54  // If `split_cyclic == 0`, then filenames will be
55  // filename.e-s000X; if `split_cyclic > 0`, then filenames will be
56  // filename.e.{A|B|C...}
57  int split_times{0};
58  //! If non-zero, then the `split_times` timesteps will be put into
59  // `split_cyclic` files and then recycle filenames. For example:
60  // `split_times=1` and `split_cyclic=3`, t=1 ->file.A, t=2
61  // ->file.B, t=3 -> file.C, t=4 -> file.A If `split_times=2` and
62  // `split_cyclic=2`, then t=1,2 -> file.A, t=3,4 -> file.B, t=5,6
63  // -> file.A, t=7,8 -> file.B
64  int split_cyclic{0};
65  bool shuffle{false};
66  bool zlib{true};
67  bool szip{false};
68  bool debug{false};
69  bool statistics{false};
70  bool memory_statistics{false};
71  bool do_transform_fields{false};
72  bool ints_64_bit{false};
73  bool ints_32_bit{false};
74  bool reals_32_bit{false};
75  bool netcdf4{false};
76  bool netcdf5{false};
77  bool quiet{false};
78  bool in_memory_read{false};
79  bool in_memory_write{false};
81  bool delete_timesteps{false};
82  bool minimize_open_files{false};
84  bool retain_empty_blocks{false};
85  // Put transient data for each timestep in separate file (EXPERIMENTAL)
86  bool file_per_state{false};
87  // Testing CGNS - defines zones in reverse order from input file.
88  bool reverse{false};
91  };
92 } // namespace IOShell
93 #endif
IOShell::Interface::enroll_options
void enroll_options()
Dumps representation of data in this class to cerr.
Definition: shell_interface.C:44
IOShell::Interface::split_times
int split_times
Definition: shell_interface.h:57
IOShell::Interface::split_cyclic
int split_cyclic
If non-zero, then the split_times timesteps will be put into.
Definition: shell_interface.h:64
IOShell::Interface::netcdf4
bool netcdf4
Definition: shell_interface.h:75
IOShell::Interface::decomp_method
std::string decomp_method
Definition: shell_interface.h:39
IOShell::Interface::memory_statistics
bool memory_statistics
Definition: shell_interface.h:70
IOShell::Interface::delete_timesteps
bool delete_timesteps
Definition: shell_interface.h:81
IOShell::Interface::quiet
bool quiet
Definition: shell_interface.h:77
IOShell::Interface
Definition: shell_interface.h:21
IOShell::Interface::outputFile
std::string outputFile
Definition: shell_interface.h:35
IOShell::Interface::zlib
bool zlib
Definition: shell_interface.h:66
IOShell::Interface::do_transform_fields
bool do_transform_fields
Definition: shell_interface.h:71
IOShell::Interface::Interface
Interface()
Definition: shell_interface.C:40
IOShell::Interface::ints_32_bit
bool ints_32_bit
Definition: shell_interface.h:73
IOShell::Interface::minimize_open_files
bool minimize_open_files
Definition: shell_interface.h:82
IOShell::Interface::retain_empty_blocks
bool retain_empty_blocks
Definition: shell_interface.h:84
IOShell::Interface::reverse
bool reverse
Definition: shell_interface.h:88
IOShell::Interface::data_storage_type
int data_storage_type
Definition: shell_interface.h:47
IOShell::Interface::append_time
double append_time
Definition: shell_interface.h:43
IOShell::Interface::compression_level
int compression_level
Definition: shell_interface.h:48
IOShell::Interface::serialize_io_size
int serialize_io_size
Definition: shell_interface.h:49
IOShell::Interface::append_step
int append_step
Definition: shell_interface.h:45
IOShell::Interface::surface_split_type
int surface_split_type
Definition: shell_interface.h:46
IOShell::Interface::statistics
bool statistics
Definition: shell_interface.h:69
IOShell::Interface::netcdf5
bool netcdf5
Definition: shell_interface.h:76
IOShell::Interface::maximum_time
double maximum_time
Definition: shell_interface.h:41
IOShell::Interface::outFiletype
std::string outFiletype
Definition: shell_interface.h:37
IOShell::Interface::flush_interval
int flush_interval
Definition: shell_interface.h:50
IOShell::Interface::ints_64_bit
bool ints_64_bit
Definition: shell_interface.h:72
IOShell::Interface::options_
Ioss::GetLongOption options_
Definition: shell_interface.h:32
IOShell::Interface::minimum_time
double minimum_time
Definition: shell_interface.h:42
IOShell::Interface::timestep_delay
double timestep_delay
Definition: shell_interface.h:44
IOShell::Interface::parse_options
bool parse_options(int argc, char **argv)
Definition: shell_interface.C:303
IOShell::Interface::groupName
std::string groupName
Definition: shell_interface.h:38
IOShell::Interface::add_processor_id_field
bool add_processor_id_field
Definition: shell_interface.h:89
Ioss_GetLongOpt.h
IOShell::Interface::shuffle
bool shuffle
Definition: shell_interface.h:65
IOShell::Interface::compose_output
std::string compose_output
Definition: shell_interface.h:40
IOShell::Interface::~Interface
~Interface()
IOShell::Interface::reals_32_bit
bool reals_32_bit
Definition: shell_interface.h:74
IOShell::Interface::in_memory_read
bool in_memory_read
Definition: shell_interface.h:78
IOShell::Interface::inputFile
std::vector< std::string > inputFile
Definition: shell_interface.h:34
IOShell
A special namespace for the io_shell demonstration program interFace.
Definition: shell_interface.h:19
IOShell::Interface::inFiletype
std::string inFiletype
Definition: shell_interface.h:36
IOShell::Interface::lower_case_variable_names
bool lower_case_variable_names
Definition: shell_interface.h:80
Ioss::GetLongOption
A database of program command line and environment variable options and methods for manipulating them...
Definition: Ioss_GetLongOpt.h:22
IOShell::Interface::fieldSuffixSeparator
char fieldSuffixSeparator
Definition: shell_interface.h:90
IOShell::Interface::file_per_state
bool file_per_state
Definition: shell_interface.h:86
IOShell::Interface::debug
bool debug
Definition: shell_interface.h:68
IOShell::Interface::in_memory_write
bool in_memory_write
Definition: shell_interface.h:79
IOShell::Interface::szip
bool szip
Definition: shell_interface.h:67
IOShell::Interface::disable_field_recognition
bool disable_field_recognition
Definition: shell_interface.h:83