IOSS  2.0
shell_interface.h
Go to the documentation of this file.
1 /*
2  * Copyright(C) 1999-2017 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  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are
8  * met:
9  *
10  * * Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  *
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  *
18  * * Neither the name of NTESS nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  */
34 #ifndef shell_SystemInterface_h
35 #define shell_SystemInterface_h
36 
37 #include "Ioss_GetLongOpt.h"
38 
39 #include <iosfwd>
40 #include <string>
41 #include <vector>
42 
43 /** \brief A special namespace for the io_shell demonstration program interface.
44  */
45 namespace IOShell {
46  class Interface
47  {
48  public:
49  Interface();
50  ~Interface();
51 
52  bool parse_options(int argc, char **argv);
53 
54  //! Dumps representation of data in this class to cerr
55 
56  void enroll_options();
57 
59 
60  std::vector<std::string> inputFile;
61  std::string outputFile;
62  std::string inFiletype{"unknown"};
63  std::string outFiletype{"unknown"};
64  std::string groupName;
65  std::string decomp_method;
66  std::string compose_output{"none"};
67  double maximum_time{std::numeric_limits<double>::max()};
68  double minimum_time{-std::numeric_limits<double>::max()};
69  double append_time{std::numeric_limits<double>::max()};
70  double timestep_delay{0.0};
71  int append_step{std::numeric_limits<int>::max()};
76  //! If non-zero, then put `split_times` timesteps in each file. Then close file and start new
77  //! file.
78  // If `split_cyclic == 0`, then filenames will be
79  // filename.e-s000X; if `split_cyclic > 0`, then filenames will be
80  // filename.e.{A|B|C...}
81  int split_times{0};
82  //! If non-zero, then the `split_times` timesteps will be put into
83  // `split_cyclic` files and then recycle filenames. For example:
84  // `split_times=1` and `split_cyclic=3`, t=1 ->file.A, t=2
85  // ->file.B, t=3 -> file.C, t=4 -> file.A If `split_times=2` and
86  // `split_cyclic=2`, then t=1,2 -> file.A, t=3,4 -> file.B, t=5,6
87  // -> file.A, t=7,8 -> file.B
88  int split_cyclic{0};
89  bool shuffle{false};
90  bool debug{false};
91  bool statistics{false};
92  bool memory_statistics{false};
93  bool do_transform_fields{false};
94  bool ints_64_bit{false};
95  bool ints_32_bit{false};
96  bool reals_32_bit{false};
97  bool netcdf4{false};
98  bool netcdf5{false};
99  bool quiet{false};
100  bool in_memory_read{false};
101  bool in_memory_write{false};
103  bool delete_timesteps{false};
104  bool minimize_open_files{false};
107  };
108 } // namespace IOShell
109 #endif
bool netcdf4
Definition: shell_interface.h:97
bool in_memory_write
Definition: shell_interface.h:101
bool disable_field_recognition
Definition: shell_interface.h:105
bool minimize_open_files
Definition: shell_interface.h:104
bool statistics
Definition: shell_interface.h:91
int split_times
Definition: shell_interface.h:81
bool quiet
Definition: shell_interface.h:99
A special namespace for the io_shell demonstration program interface.
Definition: shell_interface.h:45
bool memory_statistics
Definition: shell_interface.h:92
std::string outputFile
Definition: shell_interface.h:61
int surface_split_type
Definition: shell_interface.h:72
bool do_transform_fields
Definition: shell_interface.h:93
bool delete_timesteps
Definition: shell_interface.h:103
std::string decomp_method
Definition: shell_interface.h:65
int serialize_io_size
Definition: shell_interface.h:75
int compression_level
Definition: shell_interface.h:74
int split_cyclic
If non-zero, then the split_times timesteps will be put into.
Definition: shell_interface.h:88
Interface()
Definition: shell_interface.C:67
Ioss::GetLongOption options_
Definition: shell_interface.h:58
int data_storage_type
Definition: shell_interface.h:73
std::string groupName
Definition: shell_interface.h:64
int append_step
Definition: shell_interface.h:71
Definition: shell_interface.h:46
bool ints_32_bit
Definition: shell_interface.h:95
bool netcdf5
Definition: shell_interface.h:98
double timestep_delay
Definition: shell_interface.h:70
A database of program command line and environment variable options and methods for manipulating them...
Definition: Ioss_GetLongOpt.h:47
bool debug
Definition: shell_interface.h:90
bool ints_64_bit
Definition: shell_interface.h:94
std::string compose_output
Definition: shell_interface.h:66
std::vector< std::string > inputFile
Definition: shell_interface.h:60
double maximum_time
Definition: shell_interface.h:67
bool parse_options(int argc, char **argv)
Definition: shell_interface.C:272
void enroll_options()
Dumps representation of data in this class to cerr.
Definition: shell_interface.C:71
char fieldSuffixSeparator
Definition: shell_interface.h:106
double minimum_time
Definition: shell_interface.h:68
bool reals_32_bit
Definition: shell_interface.h:96
std::string outFiletype
Definition: shell_interface.h:63
bool in_memory_read
Definition: shell_interface.h:100
bool shuffle
Definition: shell_interface.h:89
bool lower_case_variable_names
Definition: shell_interface.h:102
std::string inFiletype
Definition: shell_interface.h:62
double append_time
Definition: shell_interface.h:69