Poster of Linux kernelThe best gift for a Linux geek
MeshTools::Private

MeshTools::Private

Section: C Library Functions (3) Updated: Thu Apr 7 2011
Local index Up
 

NAME

MeshTools::Private -  

SYNOPSIS


 

Functions


void globally_renumber_nodes_and_elements (MeshBase &)

void fix_broken_node_and_element_numbering (SerialMesh &)

void fix_broken_node_and_element_numbering (ParallelMesh &)
 

Function Documentation

 

void MeshTools::Private::fix_broken_node_and_element_numbering (SerialMesh &)There is no reason for a user to ever call this function.

This function restores a previously broken element/node numbering such that mesh.node(n)->id() == n.

Definition at line 1008 of file mesh_tools.C.

References SerialMesh::_elements, and SerialMesh::_nodes.

Referenced by EquationSystems::_read_impl(), and EquationSystems::write().

{
   // Nodes first
  for (unsigned int n=0; n<mesh._nodes.size(); n++)
    if (mesh._nodes[n] != NULL)
      mesh._nodes[n]->set_id() = n;

  // Elements next
  for (unsigned int e=0; e<mesh._elements.size(); e++)
    if (mesh._elements[e] != NULL)
      mesh._elements[e]->set_id() = e; 
}
 

void MeshTools::Private::fix_broken_node_and_element_numbering (ParallelMesh &)There is no reason for a user to ever call this function.

This function restores a previously broken element/node numbering such that mesh.node(n)->id() == n.

Definition at line 1023 of file mesh_tools.C.

References ParallelMesh::_elements, ParallelMesh::_nodes, mapvector< Val >::begin(), and mapvector< Val >::end().

{
  // We need access to iterators for the underlying containers,
  // not the mapvector<> reimplementations.
  mapvector<Node*>::maptype &nodes = mesh._nodes;
  mapvector<Elem*>::maptype &elem  = mesh._elements;
  
  // Nodes first
  {
    mapvector<Node*>::maptype::iterator
      it  = nodes.begin(),
      end = nodes.end();

    for (; it != end; ++it)
      if (it->second != NULL)
        it->second->set_id() = it->first;
  }

  // Elements next
  {
    mapvector<Elem*>::maptype::iterator
      it  = elem.begin(),
      end = elem.end();

    for (; it != end; ++it)
      if (it->second != NULL)
        it->second->set_id() = it->first;
  }
}
 

void MeshTools::Private::globally_renumber_nodes_and_elements (MeshBase &mesh)There is no reason for a user to ever call this function.

This function determines partition-agnostic global indices for all nodes and elements in the mesh. Note that after this function is called the mesh will likely be in an inconsistent state, i.e. mesh.nodes(i)->id() != i in the nodes container. Direct node/element access via the mesh.node(n) or mesh.elem(e) functions will likely fail. The original numbering can (and should) be restored with a subsequent call to fix_node_and_element_numbering().

Definition at line 1001 of file mesh_tools.C.

References MeshCommunication::assign_global_indices().

Referenced by EquationSystems::_read_impl(), and EquationSystems::write().

{
  MeshCommunication().assign_global_indices(mesh);
}
 

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

NAME
SYNOPSIS
Functions
Function Documentation
void MeshTools::Private::fix_broken_node_and_element_numbering (SerialMesh &)There is no reason for a user to ever call this function.
void MeshTools::Private::fix_broken_node_and_element_numbering (ParallelMesh &)There is no reason for a user to ever call this function.
void MeshTools::Private::globally_renumber_nodes_and_elements (MeshBase &mesh)There is no reason for a user to ever call this function.
Author

This document was created by man2html, using the manual pages.
Time: 21:50:11 GMT, April 16, 2011