本文整理汇总了C++中ExoII_Read::Elmt_Var_Names方法的典型用法代码示例。如果您正苦于以下问题:C++ ExoII_Read::Elmt_Var_Names方法的具体用法?C++ ExoII_Read::Elmt_Var_Names怎么用?C++ ExoII_Read::Elmt_Var_Names使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExoII_Read
的用法示例。
在下文中一共展示了ExoII_Read::Elmt_Var_Names方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Build_Variable_Names
void Build_Variable_Names(ExoII_Read& file1, ExoII_Read& file2, bool *diff_found)
{
// Build (and compare) global variable names.
build_variable_names("global", specs.glob_var_names, specs.glob_var,
specs.glob_var_default, specs.glob_var_do_all_flag,
file1.Global_Var_Names(), file2.Global_Var_Names(),
diff_found);
// Build (and compare) nodal variable names.
build_variable_names("nodal", specs.node_var_names, specs.node_var,
specs.node_var_default, specs.node_var_do_all_flag,
file1.Nodal_Var_Names(), file2.Nodal_Var_Names(),
diff_found);
// Build (and compare) element variable names.
build_variable_names("element", specs.elmt_var_names, specs.elmt_var,
specs.elmt_var_default, specs.elmt_var_do_all_flag,
file1.Elmt_Var_Names(), file2.Elmt_Var_Names(),
diff_found);
// Build (and compare) element variable names.
if (!specs.ignore_attributes) {
build_variable_names("element attribute", specs.elmt_att_names, specs.elmt_att,
specs.elmt_att_default, specs.elmt_att_do_all_flag,
file1.Elmt_Att_Names(), file2.Elmt_Att_Names(),
diff_found);
}
// Build (and compare) nodeset variable names.
build_variable_names("nodeset", specs.ns_var_names, specs.ns_var,
specs.ns_var_default, specs.ns_var_do_all_flag,
file1.NS_Var_Names(), file2.NS_Var_Names(),
diff_found);
// Build (and compare) sideset variable names.
build_variable_names("sideset", specs.ss_var_names, specs.ss_var,
specs.ss_var_default, specs.ss_var_do_all_flag,
file1.SS_Var_Names(), file2.SS_Var_Names(),
diff_found);
}
示例2: Create_File
//.........这里部分代码省略.........
sprintf(buf, "Time step values: tol: %8g %s, floor: %8g",
specs.time_tol.value, specs.time_tol.typestr(), specs.time_tol.floor);
std::cout << buf << std::endl;
}
else
std::cout << "Time step time values will not be differenced.\n";
output_diff_names("Global", specs.glob_var_names);
output_diff_names("Nodal", specs.node_var_names);
output_diff_names("Element", specs.elmt_var_names);
output_diff_names("Element Attribute", specs.elmt_att_names);
output_diff_names("Nodeset", specs.ns_var_names);
output_diff_names("Sideset", specs.ss_var_names);
}
else { // The files are to be compared .. echo additional info.
if (Tolerance::use_old_floor) {
std::cout << "WARNING: Using old definition of floor tolerance. |a-b|<floor.\n\n";
}
if (specs.coord_tol.type != IGNORE) {
SMART_ASSERT(specs.coord_tol.type == RELATIVE ||
specs.coord_tol.type == ABSOLUTE ||
specs.coord_tol.type == COMBINED ||
specs.coord_tol.type == EIGEN_REL ||
specs.coord_tol.type == EIGEN_ABS ||
specs.coord_tol.type == EIGEN_COM);
sprintf(buf, "Coordinates will be compared .. tol: %8g (%s), floor: %8g",
specs.coord_tol.value, specs.coord_tol.typestr(), specs.coord_tol.floor);
std::cout << buf << std::endl;
} else {
std::cout << "Locations of nodes will not be compared." << std::endl;
}
if (specs.time_tol.type != IGNORE) {
SMART_ASSERT(specs.time_tol.type == RELATIVE ||
specs.time_tol.type == ABSOLUTE ||
specs.time_tol.type == COMBINED ||
specs.time_tol.type == EIGEN_REL ||
specs.time_tol.type == EIGEN_ABS ||
specs.time_tol.type == EIGEN_COM);
sprintf(buf, "Time step values will be compared .. tol: %8g (%s), floor: %8g",
specs.time_tol.value, specs.time_tol.typestr(), specs.time_tol.floor);
std::cout << buf << std::endl;
} else {
std::cout << "Time step time values will not be compared." << std::endl;
}
output_compare_names("Global", specs.glob_var_names, specs.glob_var,
file1.Num_Global_Vars(), file2.Num_Global_Vars());
output_compare_names("Nodal", specs.node_var_names, specs.node_var,
file1.Num_Nodal_Vars(), file2.Num_Nodal_Vars());
output_compare_names("Element", specs.elmt_var_names, specs.elmt_var,
file1.Num_Elmt_Vars(), file2.Num_Elmt_Vars());
output_compare_names("Element Attribute", specs.elmt_att_names, specs.elmt_att,
file1.Num_Elmt_Atts(), file2.Num_Elmt_Atts());
output_compare_names("Nodeset", specs.ns_var_names, specs.ns_var,
file1.Num_NS_Vars(), file2.Num_NS_Vars());
output_compare_names("Sideset", specs.ss_var_names, specs.ss_var,
file1.Num_SS_Vars(), file2.Num_SS_Vars());
}
}
std::vector<int> truth_tab;
build_truth_table(EX_ELEM_BLOCK, "Element Block", specs.elmt_var_names, file1.Num_Elmt_Blocks(),
file1, file2, file1.Elmt_Var_Names(), file2.Elmt_Var_Names(),
truth_tab, specs.quiet_flag, diff_found);
std::vector<int> ns_truth_tab;
build_truth_table(EX_NODE_SET, "Nodeset", specs.ns_var_names, file1.Num_Node_Sets(),
file1, file2, file1.NS_Var_Names(), file2.NS_Var_Names(),
ns_truth_tab, specs.quiet_flag, diff_found);
std::vector<int> ss_truth_tab;
build_truth_table(EX_SIDE_SET, "Sideset", specs.ss_var_names, file1.Num_Side_Sets(),
file1, file2, file1.SS_Var_Names(), file2.SS_Var_Names(),
ss_truth_tab, specs.quiet_flag, diff_found);
// Put out the concatenated variable parameters here and then
// put out the names....
if (out_file_id >= 0) {
ex_put_all_var_param(out_file_id,
specs.glob_var_names->size(),
specs.node_var_names->size(),
specs.elmt_var_names->size(), &truth_tab[0],
specs.ns_var_names->size(), &ns_truth_tab[0],
specs.ss_var_names->size(), &ss_truth_tab[0]);
output_exodus_names(out_file_id, EX_GLOBAL, specs.glob_var_names);
output_exodus_names(out_file_id, EX_NODAL, specs.node_var_names);
output_exodus_names(out_file_id, EX_ELEM_BLOCK, specs.elmt_var_names);
output_exodus_names(out_file_id, EX_NODE_SET, specs.ns_var_names);
output_exodus_names(out_file_id, EX_SIDE_SET, specs.ss_var_names);
}
return out_file_id;
}