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


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

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


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

示例1: Check_Global

bool Check_Global(ExoII_Read<INT>& file1, ExoII_Read<INT>& file2)
{
  bool is_same = true;
  if (file1.Dimension() != file2.Dimension()) {
    std::cout << "exodiff: ERROR .. Dimension doesn't agree." << std::endl;
    is_same = false;
  }
  if (file1.Num_Nodes() != file2.Num_Nodes()) {
    if(interface.map_flag != PARTIAL){
      std::cout << "exodiff: ERROR .. Number of nodes doesn't agree." << std::endl;
      is_same = false;
    }
  }
  if (file1.Num_Elmts() != file2.Num_Elmts()) {
    if(interface.map_flag != PARTIAL){
      std::cout << "exodiff: ERROR .. Number of elements doesn't agree." << std::endl;
      is_same = false;
    }
  }
  if (file1.Num_Elmt_Blocks() != file2.Num_Elmt_Blocks()) {
    if(interface.map_flag != PARTIAL){
      std::cout << "exodiff: ERROR .. Number of element blocks doesn't agree." << std::endl;
      is_same = false;
    }
  }
  if (file1.Num_Times() != file2.Num_Times() && !interface.quiet_flag) {
    std::cout << "exodiff: WARNING .. First file has " << file1.Num_Times()
	      << " result times while the second file has " << file2.Num_Times()
	      << ".\n";
  }
  return is_same;
}
开发者ID:jgoldfar,项目名称:trilinos,代码行数:32,代码来源:check.C

示例2: ERROR

template <typename INT> bool Check_Global(ExoII_Read<INT> &file1, ExoII_Read<INT> &file2)
{
  bool is_same = true;
  if (file1.Dimension() != file2.Dimension()) {
    ERROR(".. Dimension doesn't agree.\n");
    is_same = false;
  }
  if (file1.Num_Nodes() != file2.Num_Nodes()) {
    if (interface.map_flag != PARTIAL) {
      ERROR(".. Number of nodes doesn't agree.\n");
      is_same = false;
    }
  }
  if (file1.Num_Elmts() != file2.Num_Elmts()) {
    if (interface.map_flag != PARTIAL) {
      ERROR(".. Number of elements doesn't agree.\n");
      is_same = false;
    }
  }
  if (file1.Num_Elmt_Blocks() != file2.Num_Elmt_Blocks()) {
    if (interface.map_flag != PARTIAL) {
      ERROR(".. Number of element blocks doesn't agree.\n");
      is_same = false;
    }
  }
  if (file1.Num_Times() != file2.Num_Times() && !interface.quiet_flag) {
    ERROR(".. First file has " << file1.Num_Times()
	  << " result times while the second file has " << file2.Num_Times() << ".\n");
  }
  return is_same;
}
开发者ID:uppatispr,项目名称:trilinos-official,代码行数:31,代码来源:check.C

示例3: Check_Global

bool Check_Global(ExoII_Read& file1, ExoII_Read& file2)
{
  bool is_same = true;
  if (file1.Dimension() != file2.Dimension()) {
    std::cout << "exodiff: ERROR .. Dimension doesn't agree." << std::endl;
    is_same = false;
  }
  if (file1.Num_Nodes() != file2.Num_Nodes()) {
    if(specs.map_flag != PARTIAL){
      std::cout << "exodiff: ERROR .. Number of nodes don't agree." << std::endl;
      is_same = false;
    }
  }
  if (file1.Num_Elmts() != file2.Num_Elmts()) {
    if(specs.map_flag != PARTIAL){
      std::cout << "exodiff: ERROR .. Number of elements don't agree." << std::endl;
      is_same = false;
    }
  }
  if (!specs.map_flag && file1.Num_Elmt_Blocks() != file2.Num_Elmt_Blocks()) {
    if(specs.map_flag != PARTIAL){
      std::cout << "exodiff: ERROR .. Number of blocks don't agree." << std::endl;
      is_same = false;
    }
  }
  if (!specs.map_flag && file1.Num_Times() != file2.Num_Times() && !specs.quiet_flag) {
    std::cout << "exodiff: WARNING First file has " << file1.Num_Times()
	      << " result times while the second file has " << file2.Num_Times()
	      << ".\n"
	      << "         Will consider only "
	      << (file1.Num_Times() < file2.Num_Times() ? file1.Num_Times()
		  : file2.Num_Times())
	      << " timesteps." << std::endl;
  }
  return is_same;
}
开发者ID:IoannisSt,项目名称:moose,代码行数:36,代码来源:check.C


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