当前位置: 首页>>代码示例>>C++>>正文


C++ ExoII_Read::Num_Node_Sets方法代码示例

本文整理汇总了C++中ExoII_Read::Num_Node_Sets方法的典型用法代码示例。如果您正苦于以下问题:C++ ExoII_Read::Num_Node_Sets方法的具体用法?C++ ExoII_Read::Num_Node_Sets怎么用?C++ ExoII_Read::Num_Node_Sets使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ExoII_Read的用法示例。


在下文中一共展示了ExoII_Read::Num_Node_Sets方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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;
}
开发者ID:IoannisSt,项目名称:moose,代码行数:101,代码来源:create_file.C


注:本文中的ExoII_Read::Num_Node_Sets方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。