예제 #1
0
Ioss::ElementTopology* Ioss::ElementTopology::boundary_type(int face_number) const
{
  if (parametric_dimension() == 3 && spatial_dimension() == 3)
    return face_type(face_number);

  if (parametric_dimension() == 2 && spatial_dimension() == 2)
    return edge_type(face_number);

  if (is_element()) {
    if (parametric_dimension() == 2) {
      // A shell has faces and edges in its boundary...
      if (face_number == 0) return nullptr;
      
      assert(spatial_dimension() == 3);
      if (face_number > number_faces()) {
	return edge_type(face_number - number_faces());
      } else {
	return face_type(face_number);
      }
    } else if (parametric_dimension() == 1) {
      return edge_type(face_number);
    }
  } else {
    if (parametric_dimension() == 2) {
      assert(spatial_dimension() == 3);
      return edge_type(face_number);
    }
  }    
  return nullptr;
}
예제 #2
0
Ioss::IntVector Ioss::ElementTopology::boundary_connectivity(int edge_number) const
{
  if (parametric_dimension() == 3 && spatial_dimension() == 3)
    return face_connectivity(edge_number);

  if (parametric_dimension() == 2 && spatial_dimension() == 2)
    return edge_connectivity(edge_number);

  if (is_element()) {
    if (parametric_dimension() == 2) {
      assert(spatial_dimension() == 3);
      // A shell has faces and edges in its boundary...
      if (edge_number > number_faces()) {
	return edge_connectivity(edge_number - number_faces());
      } else {
	return face_connectivity(edge_number);
      }
    } else if (parametric_dimension() == 1) {
      return edge_connectivity(edge_number);
    }
  } else {
    if (parametric_dimension() == 2) {
      assert(spatial_dimension() == 3);
      return edge_connectivity(edge_number);
    }
  }    
  return Ioss::IntVector();
}
예제 #3
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;
}
예제 #4
0
Ioss::ElementTopology* Ioss::Unknown::face_type(int face_number) const
{
  // face_number == 0 returns topology for all faces if
  // all faces are the same topology; otherwise, returns NULL
  // face_number is 1-based.

  assert(face_number >= 0 && face_number <= number_faces());
  return Ioss::ElementTopology::factory("unknown");
}
예제 #5
0
Ioss::ElementTopology *Ioss::Sphere::face_type(int face_number) const
{
  // face_number == 0 returns topology for all faces if
  // all faces are the same topology; otherwise, returns nullptr
  // face_number is 1-based.

  assert(face_number >= 0 && face_number <= number_faces());
  return (Ioss::ElementTopology *)nullptr;
}
예제 #6
0
Ioss::IntVector Ioss::Wedge15::face_connectivity(int face_number) const
{
  assert(face_number > 0 && face_number <= number_faces());
  Ioss::IntVector connectivity(number_nodes_face(face_number));

  for (int i=0; i < number_nodes_face(face_number); i++)
    connectivity[i] = Constants::face_node_order[face_number-1][i];

  return connectivity;
}
예제 #7
0
Ioss::ElementTopology *Ioss::Tet15::face_type(int face_number) const
{
  // face_number == 0 returns topology for all faces if
  // all faces are the same topology; otherwise, returns nullptr
  // face_number is 1-based.

  assert(face_number >= 0 && face_number <= number_faces());
  //  return Ioss::ElementTopology::factory("triface6");
  return Ioss::ElementTopology::factory("tri7");
}
예제 #8
0
Ioss::IntVector Ioss::Hex27::face_connectivity(int face_number) const
{
  assert(face_number > 0 && face_number <= number_faces());
  Ioss::IntVector connectivity(Constants::nodes_per_face[face_number]);

  for (int i=0; i < Constants::nodes_per_face[face_number]; i++)
    connectivity[i] = Constants::face_node_order[face_number-1][i];

  return connectivity;
}
예제 #9
0
Ioss::ElementTopology* Ioss::Wedge15::face_type(int face_number) const
{
  assert(face_number >= 0 && face_number <= number_faces());
  if (face_number == 0)
    return (Ioss::ElementTopology*)NULL;
  else if (face_number <= 3)
//    return Ioss::ElementTopology::factory("quadface8");
    return Ioss::ElementTopology::factory("quad8");
  else
//    return Ioss::ElementTopology::factory("triface6");
    return Ioss::ElementTopology::factory("tri6");
}
예제 #10
0
Ioss::ElementTopology* Ioss::Pyramid5::face_type(int face_number) const
{
  assert(face_number >= 0 && face_number <= number_faces());
  if (face_number == 0)
    return (Ioss::ElementTopology*)NULL;
  else if (face_number <= 4)
//    return Ioss::ElementTopology::factory("triface3");
    return Ioss::ElementTopology::factory("tri3");
  else
//    return Ioss::ElementTopology::factory("quadface4");
    return Ioss::ElementTopology::factory("quad4");
}
예제 #11
0
Ioss::ElementTopology* Ioss::Pyramid14::face_type(int face_number) const
{
  assert(face_number >= 0 && face_number <= number_faces());
  if (face_number == 0)
    return (Ioss::ElementTopology*)nullptr;
  else if (face_number <= 4)
//    return Ioss::ElementTopology::factory("triface6");
    return Ioss::ElementTopology::factory("tri6");
  else
//    return Ioss::ElementTopology::factory("quadface9");
    return Ioss::ElementTopology::factory("quad9");
}
예제 #12
0
Ioss::IntVector Ioss::ElementTopology::face_edge_connectivity(int face_number) const
{
  assert(face_number > 0 && face_number <= number_faces());

  int nface_edge = number_edges_face(face_number);
  Ioss::IntVector fcon(nface_edge);

  // This works for 2D elements, 3D elements override
  for (int i=0; i < nface_edge; i++)
    fcon[i] = i;

  return fcon;
}
예제 #13
0
Ioss::ElementTopology *Ioss::Wedge15::face_type(int face_number) const
{
  assert(face_number >= 0 && face_number <= number_faces());
  if (face_number == 0) {
    return (Ioss::ElementTopology *)nullptr;
  }
  if (face_number <= 3) {
    //    return Ioss::ElementTopology::factory("quadface8");
    return Ioss::ElementTopology::factory("quad8");
  }

  //    return Ioss::ElementTopology::factory("triface6");
  return Ioss::ElementTopology::factory("tri6");
}
예제 #14
0
Ioss::ElementTopology *Ioss::Pyramid5::face_type(int face_number) const
{
    assert(face_number >= 0 && face_number <= number_faces());
    if (face_number == 0) {
        return (Ioss::ElementTopology *)nullptr;
    }
    if (face_number <= 4) {
        //    return Ioss::ElementTopology::factory("triface3");
        return Ioss::ElementTopology::factory("tri3");
    }

    //    return Ioss::ElementTopology::factory("quadface4");
    return Ioss::ElementTopology::factory("quad4");
}
예제 #15
0
Ioss::ElementTopology* Ioss::Tet7::face_type(int face_number) const
{
  // face_number == 0 returns topology for all faces if
  // all faces are the same topology; otherwise, returns NULL
  // face_number is 1-based.

  assert(face_number >= 0 && face_number <= number_faces());
  if (face_number == 0)
    return NULL;
  else if (face_number == 4)
    return Ioss::ElementTopology::factory("tri6");
  else 
    return Ioss::ElementTopology::factory("tri4a");
}
예제 #16
0
int Ioss::Hex27::number_edges_face(int face) const
{
  // face is 1-based.  0 passed in for all faces.
  assert(face >= 0 && face <= number_faces());
  return Constants::edges_per_face[face];
}
예제 #17
0
Ioss::ElementTopology *Ioss::TriShell6::face_type(int face_number) const
{
  assert(face_number >= 0 && face_number <= number_faces());
  //  return Ioss::ElementTopology::factory("triface6");
  return Ioss::ElementTopology::factory("tri6");
}
예제 #18
0
int Ioss::TriShell6::number_nodes_face(int face) const
{
  // face is 1-based.  0 passed in for all faces.
  assert(face >= 0 && face <= number_faces());
  return Constants::nodes_per_face[face];
}
예제 #19
0
int Ioss::Bar3::number_nodes_face(int face) const
{
  // face is 1-based.  0 passed in for all faces.
  assert(face >= 0 && face <= number_faces());
  return Constants::nfacenode;
}
예제 #20
0
int Ioss::Edge2::number_edges_face(int face) const
{
  // face is 1-based.  0 passed in for all faces.
  assert(face >= 0 && face <= number_faces());
  return Constants::nfaceedge;
}
예제 #21
0
Ioss::IntVector Ioss::Sphere::face_connectivity(int face_number) const
{
  assert(face_number > 0 && face_number <= number_faces());
  Ioss::IntVector connectivity;
  return connectivity;
}
예제 #22
0
Ioss::ElementTopology* Ioss::Shell8::face_type(int face_number) const
{
  assert(face_number >= 0 && face_number <= number_faces());
//  return Ioss::ElementTopology::factory("quadface8");
  return Ioss::ElementTopology::factory("quad8");
}