Debian Codegraph @

packages/seacas/applications/zellij/ZE_SystemInterface.h

raw
1 // Copyright(C) 2021, 2022, 2023, 2024 National Technology & Engineering Solutions
2 // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 // NTESS, the U.S. Government retains certain rights in this software.
4 //
5 // See packages/seacas/LICENSE for details
6 #pragma once
7
8 #include "Ioss_GetLongOpt.h" // for GetLongOption
9 #include <array>
10 #include <string> // for string
11
12 //! \file
13
14 using vector3d = std::array<double, 3>;
15
16 enum class Minimize { NONE = 0, UNIT = 1, OUTPUT = 2, ALL = 3 };
17
18 class SystemInterface
19 {
20 public:
21 explicit SystemInterface(int my_rank = 0);
22
23 bool parse_options(int argc, char **argv);
24
25 int debug() const { return debugLevel_; }
26
27 std::string lattice() const { return lattice_; }
28 std::string decomp_method() const { return decompMethod_; }
29 std::string sideset_surfaces() const { return sidesetSurfaces_; }
30 std::string sideset_names() const { return sidesetNames_; }
31 bool ignore_internal_sidesets() const { return ignoreInternalSidesets_; }
32
33 bool ints32bit() const { return ints32bit_; }
34 bool use_netcdf4() const { return useNetcdf4_; }
35 bool use_netcdf5() const { return useNetcdf5_; }
36
37 int compression_level() const { return compressionLevel_; }
38 bool zlib() const { return zlib_; }
39 bool szip() const { return szip_; }
40
41 int ranks() const { return ranks_; }
42 int start_rank() const { return startRank_; }
43 int rank_count() const { return rankCount_; }
44 bool subcycle() const { return subcycle_; }
45
46 bool equivalence_nodes() const { return equivalenceNodes_; }
47 Minimize minimize_open_files() const { return minimizeOpenFiles_; }
48
49 double scale_factor() const { return scaleFactor_; }
50 vector3d offset() const { return offset_; }
51
52 int skip() const { return skip_; }
53 int repeat() const { return repeat_; }
54
55 static void show_version();
56
57 // Make this private eventually...
58 std::string outputName_;
59
60 private:
61 void enroll_options();
62
63 Ioss::GetLongOption options_; //!< Options parsing
64
65 std::string lattice_{};
66 std::string decompMethod_{"HSFC"};
67 std::string sidesetSurfaces_{};
68 std::string sidesetNames_{};
69 vector3d offset_{0.0, 0.0, 0.0};
70 double scaleFactor_{1.0};
71 int myRank_{0};
72 int debugLevel_{0};
73 int compressionLevel_{0};
74 int ranks_{1};
75 int startRank_{0};
76 int rankCount_{0};
77 int skip_{0};
78 int repeat_{1};
79 bool ints32bit_{false};
80 bool useNetcdf4_{true};
81 bool useNetcdf5_{false};
82 bool zlib_{true};
83 bool szip_{false};
84 bool equivalenceNodes_{true};
85 bool subcycle_{false};
86 bool ignoreInternalSidesets_{false};
87 enum Minimize minimizeOpenFiles_ { Minimize::NONE };
88 };