IOSS 2.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
shell_interface.h
Go to the documentation of this file.
1/*
2 * Copyright(C) 1999-2025 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#pragma once
9
10#include <iosfwd>
11#include <limits>
12#include <string>
13#include <vector>
14
15#include "Ioss_GetLongOpt.h"
16
17/** \brief A special namespace for the io_shell demonstration program interFace.
18 */
19namespace IOShell {
21 {
22 public:
23 explicit Interface(std::string app_version);
24
25 bool parse_options(int argc, char **argv, int my_processor);
26
27 //! Dumps representation of data in this class to cerr
28
29 void enroll_options();
30
32
33 std::vector<std::string> inputFile;
34 std::string version{};
35 std::string outputFile;
36 std::string inFiletype{"unknown"};
37 std::string outFiletype{"unknown"};
38 std::string changeSetName;
39 std::string selectedChangeSets;
40 std::string decomp_method;
41 std::string decomp_extra{"processor_id"};
42 std::string compose_output{"default"};
43 std::string customField{};
44 double maximum_time{std::numeric_limits<double>::max()};
45 double minimum_time{-std::numeric_limits<double>::max()};
46 double append_time{std::numeric_limits<double>::max()};
47 double time_scale{1.0};
48 double time_offset{0.0};
49 double timestep_delay{0.0};
50 double rel_tolerance{0.0};
51 double abs_tolerance{0.0};
52 double tol_floor{0.0};
53 int append_step{std::numeric_limits<int>::max()};
60
61 //! If non-empty, then it is a list of times that should be transferred to the output file.
62 std::vector<double> selected_times{};
63
64 //! If non-empty, then it is a list of steps that should be transferred to the output file.
65 // A negative value counts from end. -1 is last, -2 is second last...
66 std::vector<int> selected_steps{};
67
68 //! If non-empty, then it is a list of element blocks, nodesets,
69 //! sidesets that should be omitted from the output file
70 std::vector<std::string> omitted_blocks{};
71 std::vector<std::string> omitted_sets{};
72
73 //! If non-empty, a list of element block ids and/or names that
74 //! should be omitted in a parallel decomposition. The blocks will
75 //! still appear in the decomposed files, but will not affect the
76 //! balance. Only active element blocks will be load-balanced.
77 std::vector<int> decomp_omitted_block_ids{};
79
80 //! If non-zero, then put `split_times` timesteps in each file. Then close file and start new
81 //! file.
82 // If `split_cyclic == 0`, then filenames will be
83 // filename.e-s000X; if `split_cyclic > 0`, then filenames will be
84 // filename.e.{A|B|C...}
86 //! If non-zero, then the `split_times` timesteps will be put into
87 // `split_cyclic` files and then recycle filenames. For example:
88 // `split_times=1` and `split_cyclic=3`, t=1 ->file.A, t=2
89 // ->file.B, t=3 -> file.C, t=4 -> file.A If `split_times=2` and
90 // `split_cyclic=2`, then t=1,2 -> file.A, t=3,4 -> file.B, t=5,6
91 // -> file.A, t=7,8 -> file.B
93 bool shuffle{false};
94 bool zlib{false};
95 bool szip{false};
96 bool zstd{false};
97 bool bz2{false};
98 bool quant{false};
99 bool debug{false};
100 bool detect_nans{false};
101 bool statistics{false};
102 bool memory_statistics{false};
104 bool ints_64_bit{false};
105 bool ints_32_bit{false};
106 bool reals_32_bit{false};
107 bool netcdf3{false};
108 bool netcdf4{false};
109 bool netcdf5{false};
110 bool quiet{false};
111 bool in_memory_read{false};
112 bool in_memory_write{false};
115 bool delete_timesteps{false};
119 // Put transient data for each timestep in separate file (EXPERIMENTAL)
120 bool file_per_state{false};
121 // Testing CGNS - defines zones in reverse order from input file.
122 bool reverse{false};
124 bool boundary_sideset{false};
125 bool compare{false};
126 bool ignore_qa_info{false};
127 bool ignore_node_map{false};
128 bool ignore_elem_map{false};
129 bool ignore_edge_map{false};
130 bool ignore_face_map{false};
131 bool delete_qa{false};
132 bool delete_info{false};
133 bool line_decomp{false};
135 };
136} // namespace IOShell
bool quiet
Definition shell_interface.h:110
int split_times
Definition shell_interface.h:85
std::string compose_output
Definition shell_interface.h:42
char fieldSuffixSeparator
Definition shell_interface.h:134
bool ignore_edge_map
Definition shell_interface.h:129
bool delete_timesteps
Definition shell_interface.h:115
double time_offset
Definition shell_interface.h:48
std::string outFiletype
Definition shell_interface.h:37
std::vector< int > selected_steps
If non-empty, then it is a list of steps that should be transferred to the output file.
Definition shell_interface.h:66
bool lowercase_variable_names
Definition shell_interface.h:113
bool memory_statistics
Definition shell_interface.h:102
double rel_tolerance
Definition shell_interface.h:50
bool lowercase_database_names
Definition shell_interface.h:114
bool bz2
Definition shell_interface.h:97
bool ignore_qa_info
Definition shell_interface.h:126
std::string changeSetName
Definition shell_interface.h:38
bool minimize_open_files
Definition shell_interface.h:116
bool reverse
Definition shell_interface.h:122
bool ints_64_bit
Definition shell_interface.h:104
bool netcdf4
Definition shell_interface.h:108
bool zlib
Definition shell_interface.h:94
bool ignore_elem_map
Definition shell_interface.h:128
bool boundary_sideset
Definition shell_interface.h:124
int flush_interval
Definition shell_interface.h:59
bool statistics
Definition shell_interface.h:101
double minimum_time
Definition shell_interface.h:45
double time_scale
Definition shell_interface.h:47
int surface_split_type
Definition shell_interface.h:54
int split_cyclic
If non-zero, then the split_times timesteps will be put into.
Definition shell_interface.h:92
bool delete_info
Definition shell_interface.h:132
bool in_memory_read
Definition shell_interface.h:111
std::string version
Definition shell_interface.h:34
std::string inFiletype
Definition shell_interface.h:36
std::vector< std::string > omitted_blocks
Definition shell_interface.h:70
bool szip
Definition shell_interface.h:95
std::string decomp_method
Definition shell_interface.h:40
std::vector< int > decomp_omitted_block_ids
Definition shell_interface.h:77
double maximum_time
Definition shell_interface.h:44
bool ints_32_bit
Definition shell_interface.h:105
int compression_level
Definition shell_interface.h:56
Ioss::GetLongOption options_
Definition shell_interface.h:31
bool parse_options(int argc, char **argv, int my_processor)
Definition shell_interface.C:440
std::vector< std::string > inputFile
Definition shell_interface.h:33
bool do_transform_fields
Definition shell_interface.h:103
bool delete_qa
Definition shell_interface.h:131
double abs_tolerance
Definition shell_interface.h:51
bool retain_empty_blocks
Definition shell_interface.h:118
bool ignore_face_map
Definition shell_interface.h:130
std::string customField
Definition shell_interface.h:43
Interface(std::string app_version)
Definition shell_interface.C:22
double tol_floor
Definition shell_interface.h:52
bool netcdf5
Definition shell_interface.h:109
bool zstd
Definition shell_interface.h:96
bool line_decomp
Definition shell_interface.h:133
int quantize_nsd
Definition shell_interface.h:57
std::string selectedChangeSets
Definition shell_interface.h:39
double timestep_delay
Definition shell_interface.h:49
double append_time
Definition shell_interface.h:46
void enroll_options()
Dumps representation of data in this class to cerr.
Definition shell_interface.C:27
std::vector< std::string > omitted_sets
Definition shell_interface.h:71
bool debug
Definition shell_interface.h:99
std::vector< double > selected_times
If non-empty, then it is a list of times that should be transferred to the output file.
Definition shell_interface.h:62
int data_storage_type
Definition shell_interface.h:55
std::string decomp_extra
Definition shell_interface.h:41
bool ignore_node_map
Definition shell_interface.h:127
bool in_memory_write
Definition shell_interface.h:112
bool reals_32_bit
Definition shell_interface.h:106
bool quant
Definition shell_interface.h:98
std::string decomp_omitted_block_names
Definition shell_interface.h:78
bool detect_nans
Definition shell_interface.h:100
bool add_processor_id_field
Definition shell_interface.h:123
bool shuffle
Definition shell_interface.h:93
bool netcdf3
Definition shell_interface.h:107
bool disable_field_recognition
Definition shell_interface.h:117
bool compare
Definition shell_interface.h:125
int serialize_io_size
Definition shell_interface.h:58
std::string outputFile
Definition shell_interface.h:35
bool file_per_state
Definition shell_interface.h:120
int append_step
Definition shell_interface.h:53
A database of program command line and environment variable options and methods for manipulating them...
Definition Ioss_GetLongOpt.h:25
A special namespace for the io_shell demonstration program interFace.
Definition shell_interface.h:19