| 1 |
/* |
| 2 |
* Copyright(C) 1999-2024 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 |
*/ |
| 19 |
namespace IOShell { |
| 20 |
class Interface |
| 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 |
|
| 31 |
Ioss::GetLongOption options_; |
| 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()}; |
| 54 |
int surface_split_type{-1}; |
| 55 |
int data_storage_type{0}; |
| 56 |
int compression_level{0}; |
| 57 |
int quantize_nsd{0}; |
| 58 |
int serialize_io_size{0}; |
| 59 |
int flush_interval{0}; |
| 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 element blocks, nodesets, |
| 65 |
//! sidesets that should be omitted from the output file |
| 66 |
std::vector<std::string> omitted_blocks{}; |
| 67 |
std::vector<std::string> omitted_sets{}; |
| 68 |
|
| 69 |
//! If non-zero, then put `split_times` timesteps in each file. Then close file and start new |
| 70 |
//! file. |
| 71 |
// If `split_cyclic == 0`, then filenames will be |
| 72 |
// filename.e-s000X; if `split_cyclic > 0`, then filenames will be |
| 73 |
// filename.e.{A|B|C...} |
| 74 |
int split_times{0}; |
| 75 |
//! If non-zero, then the `split_times` timesteps will be put into |
| 76 |
// `split_cyclic` files and then recycle filenames. For example: |
| 77 |
// `split_times=1` and `split_cyclic=3`, t=1 ->file.A, t=2 |
| 78 |
// ->file.B, t=3 -> file.C, t=4 -> file.A If `split_times=2` and |
| 79 |
// `split_cyclic=2`, then t=1,2 -> file.A, t=3,4 -> file.B, t=5,6 |
| 80 |
// -> file.A, t=7,8 -> file.B |
| 81 |
int split_cyclic{0}; |
| 82 |
bool shuffle{false}; |
| 83 |
bool zlib{false}; |
| 84 |
bool szip{false}; |
| 85 |
bool zstd{false}; |
| 86 |
bool bz2{false}; |
| 87 |
bool quant{false}; |
| 88 |
bool debug{false}; |
| 89 |
bool detect_nans{false}; |
| 90 |
bool statistics{false}; |
| 91 |
bool memory_statistics{false}; |
| 92 |
bool do_transform_fields{false}; |
| 93 |
bool ints_64_bit{false}; |
| 94 |
bool ints_32_bit{false}; |
| 95 |
bool reals_32_bit{false}; |
| 96 |
bool netcdf3{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}; |
| 102 |
bool lower_case_variable_names{true}; |
| 103 |
bool delete_timesteps{false}; |
| 104 |
bool minimize_open_files{false}; |
| 105 |
bool disable_field_recognition{false}; |
| 106 |
bool retain_empty_blocks{false}; |
| 107 |
// Put transient data for each timestep in separate file (EXPERIMENTAL) |
| 108 |
bool file_per_state{false}; |
| 109 |
// Testing CGNS - defines zones in reverse order from input file. |
| 110 |
bool reverse{false}; |
| 111 |
bool add_processor_id_field{false}; |
| 112 |
bool boundary_sideset{false}; |
| 113 |
bool compare{false}; |
| 114 |
bool ignore_qa_info{false}; |
| 115 |
bool ignore_node_map{false}; |
| 116 |
bool ignore_elem_map{false}; |
| 117 |
bool ignore_edge_map{false}; |
| 118 |
bool ignore_face_map{false}; |
| 119 |
bool delete_qa{false}; |
| 120 |
bool delete_info{false}; |
| 121 |
bool line_decomp{false}; |
| 122 |
char fieldSuffixSeparator{'_'}; |
| 123 |
}; |
| 124 |
} // namespace IOShell |