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

MeshTools::Generation::Private

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

NAME

MeshTools::Generation::Private -  

SYNOPSIS


 

Functions


unsigned int idx (const ElemType type, const unsigned int nx, const unsigned int i, const unsigned int j)

unsigned int idx (const ElemType type, const unsigned int nx, const unsigned int ny, const unsigned int i, const unsigned int j, const unsigned int k)
 

Function Documentation

 

unsigned int MeshTools::Generation::Private::idx (const ElemTypetype, const unsigned intnx, const unsigned inti, const unsigned intj) [inline]A useful inline function which replaces the #defines used previously. Not private since this is a namespace, but would be if this were a class. The first one returns the proper node number for 2D elements while the second one returns the node number for 3D elements.

Definition at line 109 of file mesh_generation.h.

References libMeshEnums::INVALID_ELEM, libMesh::invalid_uint, libMeshEnums::QUAD4, libMeshEnums::QUAD8, libMeshEnums::QUAD9, libMeshEnums::TRI3, and libMeshEnums::TRI6.

Referenced by MeshCommunication::assign_global_indices(), MeshTools::Generation::build_cube(), PetscVector< T >::create_subvector(), MeshCommunication::find_global_indices(), PetscVector< T >::localize(), GetPot::operator[](), Nemesis_IO::read(), LegacyXdrIO::read_mesh(), XdrIO::read_serialized_bcs(), System::read_serialized_blocked_dof_objects(), XdrIO::read_serialized_nodes(), MEDITIO::write_ascii(), LegacyXdrIO::write_mesh(), XdrIO::write_serialized_bcs(), System::write_serialized_blocked_dof_objects(), and XdrIO::write_serialized_nodes().

      {
        switch(type)
          {
          case INVALID_ELEM:
          case QUAD4:
          case TRI3:
            {
              return i + j*(nx+1);
              break;
            }

          case QUAD8:
          case QUAD9:
          case TRI6:
            {
              return i + j*(2*nx+1);
              break;
            }
          
          default:
            {
              std::cerr << 'ERROR: Unrecognized 2D element type.' << std::endl;
              libmesh_error();
            }
          }

        return libMesh::invalid_uint;
      }
 

unsigned int MeshTools::Generation::Private::idx (const ElemTypetype, const unsigned intnx, const unsigned intny, const unsigned inti, const unsigned intj, const unsigned intk) [inline]

Definition at line 146 of file mesh_generation.h.

References libMeshEnums::HEX20, libMeshEnums::HEX27, libMeshEnums::HEX8, libMeshEnums::INVALID_ELEM, libMesh::invalid_uint, libMeshEnums::PRISM15, libMeshEnums::PRISM18, libMeshEnums::PRISM6, libMeshEnums::PYRAMID5, libMeshEnums::TET10, and libMeshEnums::TET4.

      {
        switch(type)
          {
          case INVALID_ELEM:
          case HEX8:
          case PRISM6:
            {
              return i + (nx+1)*(j + k*(ny+1));
              break;
            }

          case HEX20:
          case HEX27:
          case TET4:  // TET4's are created from an initial HEX27 discretization
          case TET10: // TET10's are created from an initial HEX27 discretization
          case PYRAMID5: // PYRAMID5's are created from an initial HEX27 discretization
          case PRISM15:
          case PRISM18:
            {
              return i + (2*nx+1)*(j + k*(2*ny+1));
              break;
            }
          
          default:
            {
              std::cerr << 'ERROR: Unrecognized element type.' << std::endl;
              libmesh_error();
            }
          }
      
        return libMesh::invalid_uint;
      }
 

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

NAME
SYNOPSIS
Functions
Function Documentation
unsigned int MeshTools::Generation::Private::idx (const ElemTypetype, const unsigned intnx, const unsigned inti, const unsigned intj) [inline]A useful inline function which replaces the #defines used previously. Not private since this is a namespace, but would be if this were a class. The first one returns the proper node number for 2D elements while the second one returns the node number for 3D elements.
unsigned int MeshTools::Generation::Private::idx (const ElemTypetype, const unsigned intnx, const unsigned intny, const unsigned inti, const unsigned intj, const unsigned intk) [inline]
Author

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