libMesh
Classes | Functions
libMesh::MeshTools::Generation::Private Namespace Reference

Classes

class  GaussLobattoRedistributionFunction
 This object is passed to MeshTools::Modification::redistribute() to redistribute the points on a uniform grid into the Gauss-Lobatto points on the actual grid. More...
 

Functions

unsigned int idx (const ElemType type, const unsigned int nx, const unsigned int i, const unsigned int j)
 A useful inline function which replaces the macros used previously. More...
 
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 libMesh::MeshTools::Generation::Private::idx ( const ElemType  type,
const unsigned int  nx,
const unsigned int  i,
const unsigned int  j 
)

A useful inline function which replaces the macros 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 69 of file mesh_generation.C.

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

Referenced by libMesh::MeshCommunication::assign_global_indices(), libMesh::MeshTools::Generation::build_cube(), libMesh::MeshTools::Modification::change_boundary_id(), libMesh::DofMap::end_old_dof(), libMesh::MeshCommunication::find_global_indices(), GETPOT_NAMESPACE::GetPot::operator[](), libMesh::Nemesis_IO::read(), libMesh::XdrIO::read_serialized_bcs_helper(), libMesh::System::read_serialized_blocked_dof_objects(), libMesh::XdrIO::read_serialized_nodes(), libMesh::XdrIO::read_serialized_nodesets(), libMesh::BoundaryVolumeSolutionTransfer::transfer_volume_boundary(), libMesh::MEDITIO::write_ascii(), libMesh::GmshIO::write_mesh(), libMesh::XdrIO::write_serialized_bcs_helper(), libMesh::System::write_serialized_blocked_dof_objects(), libMesh::XdrIO::write_serialized_nodes(), libMesh::XdrIO::write_serialized_nodesets(), and libMesh::UCDIO::write_soln().

73 {
74  switch(type)
75  {
76  case INVALID_ELEM:
77  case QUAD4:
78  case TRI3:
79  {
80  return i + j*(nx+1);
81  }
82 
83  case QUAD8:
84  case QUAD9:
85  case TRI6:
86  {
87  return i + j*(2*nx+1);
88  }
89 
90  default:
91  libmesh_error_msg("ERROR: Unrecognized 2D element type.");
92  }
93 
94  return libMesh::invalid_uint;
95 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:184
unsigned int libMesh::MeshTools::Generation::Private::idx ( const ElemType  type,
const unsigned int  nx,
const unsigned int  ny,
const unsigned int  i,
const unsigned int  j,
const unsigned int  k 
)

Definition at line 101 of file mesh_generation.C.

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

107 {
108  switch(type)
109  {
110  case INVALID_ELEM:
111  case HEX8:
112  case PRISM6:
113  {
114  return i + (nx+1)*(j + k*(ny+1));
115  }
116 
117  case HEX20:
118  case HEX27:
119  case TET4: // TET4's are created from an initial HEX27 discretization
120  case TET10: // TET10's are created from an initial HEX27 discretization
121  case PYRAMID5: // PYRAMID5's are created from an initial HEX27 discretization
122  case PYRAMID13:
123  case PYRAMID14:
124  case PRISM15:
125  case PRISM18:
126  {
127  return i + (2*nx+1)*(j + k*(2*ny+1));
128  }
129 
130  default:
131  libmesh_error_msg("ERROR: Unrecognized element type.");
132  }
133 
134  return libMesh::invalid_uint;
135 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:184