|
| static void | check_dynamic_cast (const void *ptr) |
| |
| template<typename T > |
| static void | uniquify (std::vector< T > &vec, bool skip_first=false) |
| |
| template<typename T > |
| static void | generate_index (std::vector< T > &index) |
| |
| template<typename T > |
| static T | find_index_location (T node, const std::vector< T > &index) |
| |
| template<typename T > |
| static void | clear (std::vector< T > &vec) |
| |
| static int | power_2 (int count) |
| |
| template<typename T > |
| static bool | check_block_order (const std::vector< T *> &blocks) |
| |
| static int | log_power_2 (uint64_t value) |
| |
| static char ** | get_name_array (size_t count, int size) |
| |
| static void | delete_name_array (char **names, int count) |
| |
| static void | time_and_date (char *time_string, char *date_string, size_t length) |
| | Get formatted time and date strings. More...
|
| |
| static std::string | decode_filename (const std::string &filename, int processor, int num_processors) |
| |
| static size_t | get_number (const std::string &suffix) |
| |
| static int64_t | extract_id (const std::string &name_id) |
| |
| static std::string | encode_entity_name (const std::string &entity_type, int64_t id) |
| |
| static void | fixup_name (char *name) |
| | Convert a string to lower case, and convert spaces to '_'. More...
|
| |
| static void | fixup_name (std::string &name) |
| | Convert a string to lower case, and convert spaces to '_'. More...
|
| |
| static bool | check_set_bool_property (const Ioss::PropertyManager &properties, const std::string &prop_name, bool &prop_value) |
| | Check whether property 'prop_name' exists and if so, set 'prop_value'. More...
|
| |
| static bool | block_is_omitted (Ioss::GroupingEntity *block) |
| | Determine whether an entity has the property "omitted.". More...
|
| |
| static std::string | fixup_type (const std::string &base, int nodes_per_element, int spatial) |
| | Process the base element type 'base' which has 'nodes_per_element' nodes and a spatial dimension of 'spatial' into a form that the IO system can (hopefully) recognize. More...
|
| |
| static std::string | uppercase (std::string name) |
| | Convert a string to upper case. More...
|
| |
| static std::string | lowercase (std::string name) |
| | Convert a string to lower case. More...
|
| |
| static void | check_non_null (void *ptr, const char *type, const std::string &name, const std::string &func) |
| |
| static int | case_strcmp (const std::string &s1, const std::string &s2) |
| | Case-insensitive string comparison. More...
|
| |
| static std::string | platform_information () |
| | Get a string containing 'uname' output. More...
|
| |
| static size_t | get_memory_info () |
| | Return amount of memory being used on this processor. More...
|
| |
| static size_t | get_hwm_memory_info () |
| |
| static void | abort () |
| |
| static std::string | local_filename (const std::string &relative_filename, const std::string &type, const std::string &working_directory) |
| | Get a filename relative to the specified working directory (if any) of the current execution. More...
|
| |
| static void | get_fields (int64_t entity_count, char **names, size_t num_names, Ioss::Field::RoleType fld_role, bool enable_field_recognition, char suffix_separator, int *local_truth, std::vector< Ioss::Field > &fields) |
| |
| static int | field_warning (const Ioss::GroupingEntity *ge, const Ioss::Field &field, const std::string &inout) |
| |
| static void | calculate_sideblock_membership (IntVector &face_is_member, const SideBlock *ef_blk, size_t int_byte_size, const void *element, const void *sides, int64_t number_sides, const Region *region) |
| |
| static int64_t | get_side_offset (const Ioss::SideBlock *sb) |
| | Get the appropriate index offset for the sides of elements in a SideBlock. More...
|
| |
| static unsigned int | hash (const std::string &name) |
| |
| static double | timer () |
| |
| static void | input_file (const std::string &file_name, std::vector< std::string > *lines, size_t max_line_length=0) |
| | Convert an input file to a vector of strings containing one string for each line of the file. More...
|
| |
| template<class T > |
| static std::string | to_string (const T &t) |
| |
| static std::string | variable_name_kluge (const std::string &name, size_t component_count, size_t copies, size_t max_var_len) |
| | Tries to shorten long variable names to an acceptable length, and converts to lowercase and spaces to '_'. More...
|
| |
| static void | generate_history_mesh (Ioss::Region *region) |
| | Create a nominal mesh for use in history databases. More...
|
| |
| static void | copy_database (Ioss::Region ®ion, Ioss::Region &output_region, Ioss::MeshCopyOptions &options) |
| |
| std::string Ioss::Utils::variable_name_kluge |
( |
const std::string & |
name, |
|
|
size_t |
component_count, |
|
|
size_t |
copies, |
|
|
size_t |
max_var_len |
|
) |
| |
|
static |
Tries to shorten long variable names to an acceptable length, and converts to lowercase and spaces to '_'.
Many databases have a maximum length for variable names which can cause a problem with variable name length.
This routine tries to shorten long variable names to an acceptable length ('max_var_len' characters max). If the name is already less than this length, it is returned unchanged except for the appending of the hash...
Since there is a (good) chance that two shortened names will match, a 2-letter 'hash' code is appended to the end of the variable name. This can be treated as a 2-digit base 26 number
So, we shorten the name to a maximum of 'max_var_len-3' characters and append a dot ('.') and 2 character hash.
But, we also have to deal with the suffices that Ioex_DatabaseIO appends on non-scalar values. For the 'standard' types, the maximum suffix is 4 characters (underscore + 1, 2, or 3 characters). So...shorten name to maximum of 'max_var_len-3-{3|4|n}' characters depending on the number of components.
This function also converts name to lowercase and converts spaces to '_'.