コード例 #1
0
void
SimpleSwitch::check_queueing_metadata() {
  bool enq_timestamp_e = field_exists("queueing_metadata", "enq_timestamp");
  bool enq_qdepth_e = field_exists("queueing_metadata", "enq_qdepth");
  bool deq_timedelta_e = field_exists("queueing_metadata", "deq_timedelta");
  bool deq_qdepth_e = field_exists("queueing_metadata", "deq_qdepth");
  if (enq_timestamp_e || enq_qdepth_e || deq_timedelta_e || deq_qdepth_e) {
    if (enq_timestamp_e && enq_qdepth_e && deq_timedelta_e && deq_qdepth_e)
      with_queueing_metadata = true;
    else
      bm::Logger::get()->warn(
          "Your JSON input defines some but not all queueing metadata fields");
  }
}
コード例 #2
0
ファイル: Ioss_SideBlock.C プロジェクト: crtrott/Trilinos
int  Ioss::SideBlock::get_consistent_side_number() const
{
  if (consistentSideNumber == -1) {
    // It wasn't calculated during the metadata reading of the surfaces.
    // Determine it now...
    if (field_exists("element_side")) {
      int side = 0;
      if (get_database()->int_byte_size_api() == 8) {
	std::vector<int64_t> element_side;
	get_field_data("element_side", element_side);
	side = internal_consistent_side_number(element_side);
      } else {
	std::vector<int> element_side;
	get_field_data("element_side", element_side);
	side = internal_consistent_side_number(element_side);
      }

      int side_max = get_database()->util().global_minmax(side, Ioss::ParallelUtils::DO_MAX);
      if (side_max != 999)
	consistentSideNumber = side_max;
      else
	consistentSideNumber = 0;
    } else {
      consistentSideNumber = 0;
    }
  }
  return consistentSideNumber;
}
コード例 #3
0
ファイル: Ioss_SideBlock.C プロジェクト: crtrott/Trilinos
Ioss::Property
Ioss::SideBlock::get_implicit_property(const std::string& my_name) const
{
  if (my_name == "distribution_factor_count") {
    if (field_exists("distribution_factors")) {
      int64_t nnodes = topology()->number_nodes();
      int64_t nside  = get_property("entity_count").get_int();
      return Ioss::Property(my_name, nnodes*nside);
    } else {
      return Ioss::Property(my_name, 0);
    }
  }
  else if (my_name == "parent_topology_type")
    return Ioss::Property(my_name, parent_element_topology()->name());
  else
    return Ioss::EntityBlock::get_implicit_property(my_name);
}