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

◆ 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 78 of file mesh_generation.C.

References libMesh::Utility::enum_to_string(), libMesh::INVALID_ELEM, libMesh::invalid_uint, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::QUADSHELL4, libMesh::QUADSHELL8, libMesh::QUADSHELL9, libMesh::TRI3, libMesh::TRI6, libMesh::TRI7, and libMesh::TRISHELL3.

Referenced by libMesh::MeshCommunication::assign_global_indices(), libMesh::MeshTools::Generation::build_cube(), libMesh::PetscMatrix< T >::create_submatrix_nosort(), libMesh::PetscVector< libMesh::Number >::create_subvector(), libMesh::DofObject::debug_buffer(), libMesh::MeshCommunication::find_global_indices(), libMesh::RBConstructionBase< CondensedEigenSystem >::get_params_from_training_set(), libMesh::RBEIMConstruction::get_random_point(), libMesh::PointLocatorNanoflann::kdtree_get_pt(), libMesh::InverseDistanceInterpolation< KDDim >::PointListAdaptor< KDDim >::kdtree_get_pt(), libMesh::VectorOfNodesAdaptor::kdtree_get_pt(), libMesh::DofMap::local_variable_indices(), libMesh::PetscVector< libMesh::Number >::localize(), main(), 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::BoundaryVolumeSolutionTransfer::transfer_volume_boundary(), libMesh::MEDITIO::write_ascii(), libMesh::GMVIO::write_ascii_old_impl(), libMesh::EnsightIO::write_geometry_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().

82 {
83  switch(type)
84  {
85  case INVALID_ELEM:
86  case QUAD4:
87  case QUADSHELL4:
88  case TRI3:
89  case TRISHELL3:
90  {
91  return i + j*(nx+1);
92  }
93 
94  case QUAD8:
95  case QUADSHELL8:
96  case QUAD9:
97  case QUADSHELL9:
98  case TRI6:
99  case TRI7:
100  {
101  return i + j*(2*nx+1);
102  }
103 
104  default:
105  libmesh_error_msg("ERROR: Unrecognized 2D element type == " << Utility::enum_to_string(type));
106  }
107 
108  return libMesh::invalid_uint;
109 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
Definition: libmesh.h:310
std::string enum_to_string(const T e)

◆ 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 115 of file mesh_generation.C.

References libMesh::Utility::enum_to_string(), libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::INVALID_ELEM, libMesh::invalid_uint, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM20, libMesh::PRISM21, libMesh::PRISM6, libMesh::PYRAMID13, libMesh::PYRAMID14, libMesh::PYRAMID18, libMesh::PYRAMID5, libMesh::TET10, libMesh::TET14, and libMesh::TET4.

121 {
122  switch(type)
123  {
124  case INVALID_ELEM:
125  case HEX8:
126  case PRISM6:
127  {
128  return i + (nx+1)*(j + k*(ny+1));
129  }
130 
131  case HEX20:
132  case HEX27:
133  case TET4: // TET4's are created from an initial HEX27 discretization
134  case TET10: // TET10's are created from an initial HEX27 discretization
135  case TET14: // TET14's are created from an initial HEX27 discretization
136  case PYRAMID5: // PYRAMID5's are created from an initial HEX27 discretization
137  case PYRAMID13:
138  case PYRAMID14:
139  case PYRAMID18:
140  case PRISM15:
141  case PRISM18:
142  case PRISM20:
143  case PRISM21:
144  {
145  return i + (2*nx+1)*(j + k*(2*ny+1));
146  }
147 
148  default:
149  libmesh_error_msg("ERROR: Unrecognized element type == " << Utility::enum_to_string(type));
150  }
151 
152  return libMesh::invalid_uint;
153 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
Definition: libmesh.h:310
std::string enum_to_string(const T e)