libMesh::MeshTools::Generation::Private Namespace Reference

Classes

class  GaussLobattoRedistributionFunction
 

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

◆ idx() [1/2]

unsigned int libMesh::MeshTools::Generation::Private::idx ( const ElemType  type,
const unsigned int  nx,
const unsigned int  i,
const unsigned int  j 
)
inline

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 70 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::PetscVector< T >::create_subvector(), libMesh::DofObject::debug_buffer(), libMesh::MeshCommunication::find_global_indices(), libMesh::InverseDistanceInterpolation< KDDim >::PointListAdaptor< KDDim >::kdtree_get_pt(), libMesh::DofMap::local_variable_indices(), libMesh::PetscVector< T >::localize(), libMesh::SparsityPattern::Build::operator()(), 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::MEDITIO::write_ascii(), libMesh::ExodusII_IO::write_nodal_data(), 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().

74 {
75  switch(type)
76  {
77  case INVALID_ELEM:
78  case QUAD4:
79  case TRI3:
80  {
81  return i + j*(nx+1);
82  }
83 
84  case QUAD8:
85  case QUAD9:
86  case TRI6:
87  {
88  return i + j*(2*nx+1);
89  }
90 
91  default:
92  libmesh_error_msg("ERROR: Unrecognized 2D element type.");
93  }
94 
95  return libMesh::invalid_uint;
96 }
const unsigned int invalid_uint
Definition: libmesh.h:245

◆ idx() [2/2]

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 
)
inline

Definition at line 102 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.

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