Пример #1
0
int Ioss::ElementTopology::number_boundaries() const
{
  if (parametric_dimension() == 3 && spatial_dimension() == 3)
    return number_faces();

  if (parametric_dimension() == 2 && spatial_dimension() == 2)
    return number_edges();

  if (parametric_dimension() == 1 && !is_element())
    return number_corner_nodes();
  
  if (is_element()) {
    if (parametric_dimension() == 2) {
      assert(spatial_dimension() == 3);
      // A shell has faces and edges in its boundary...
      return number_faces() + number_edges();
    } else if (parametric_dimension() == 1) {
      return number_edges();
    }
  } else {
    if (parametric_dimension() == 2) {
      assert(spatial_dimension() == 3);
      return number_edges();
    }
  }    
  return 0;
}
Пример #2
0
Ioss::ElementTopology* Ioss::Hex27::edge_type(int edge_number) const
{
  // edge_number == 0 returns topology for all edges if
  // all edges are the same topology; otherwise, returns NULL
  // edge_number is 1-based.

  assert(edge_number >= 0 && edge_number <= number_edges());
  return Ioss::ElementTopology::factory("edge3");
}
Пример #3
0
Ioss::ElementTopology *Ioss::Sphere::edge_type(int edge_number) const
{
  // edge_number == 0 returns topology for all edges if
  // all edges are the same topology; otherwise, returns nullptr
  // edge_number is 1-based.

  assert(edge_number >= 0 && edge_number <= number_edges());
  return nullptr;
}
Пример #4
0
Ioss::IntVector Ioss::ElementTopology::element_edge_connectivity() const
{
  int nedge = number_edges();
  Ioss::IntVector econ(nedge);
  for (int i=0; i < nedge; i++)
    econ[i] = i;

  return econ;
}
Пример #5
0
Ioss::IntVector Ioss::Tri3::edge_connectivity(int edge_number) const
{
  assert(edge_number > 0 && edge_number <= number_edges());
  Ioss::IntVector connectivity(Constants::nedgenode);

  for (int i=0; i < Constants::nedgenode; i++)
    connectivity[i] = Constants::edge_node_order[edge_number-1][i];

  return connectivity;
}
Пример #6
0
Ioss::ElementTopology* Ioss::Tri4a::edge_type(int edge_number) const
{
  assert(edge_number >= 0 && edge_number <= number_edges());
  if (edge_number == 0)
    return NULL;
  if (edge_number == 1)
    return Ioss::ElementTopology::factory("edge3");
  else
    return Ioss::ElementTopology::factory("edge2");
}
Пример #7
0
Ioss::ElementTopology *Ioss::Wedge15::edge_type(int edge_number) const
{
  assert(edge_number >= 0 && edge_number <= number_edges());
  return Ioss::ElementTopology::factory("edge3");
}
Пример #8
0
int Ioss::Tet7::number_nodes_edge(int edge ) const
{
  // edge is 1-based.  0 passed in for all edges.
  assert(edge >= 0 && edge <= number_edges());
  return  Constants::nodes_per_edge[edge];
}