libMesh
Loading...
Searching...
No Matches
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.
 
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 81 of file mesh_generation.C.

85{
86 switch(type)
87 {
88 case INVALID_ELEM:
89 case QUAD4:
90 case QUADSHELL4:
91 case TRI3:
92 case TRISHELL3:
93 {
94 return i + j*(nx+1);
95 }
96
97 case QUAD8:
98 case QUADSHELL8:
99 case QUAD9:
100 case QUADSHELL9:
101 case TRI6:
102 case TRI7:
103 {
104 return i + j*(2*nx+1);
105 }
106
107 default:
108 libmesh_error_msg("ERROR: Unrecognized 2D element type == " << Utility::enum_to_string(type));
109 }
110
112}
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:303

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.

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

124{
125 switch(type)
126 {
127 case INVALID_ELEM:
128 case HEX8:
129 case PRISM6:
130 case C0POLYHEDRON:
131 {
132 return i + (nx+1)*(j + k*(ny+1));
133 }
134
135 case HEX20:
136 case HEX27:
137 case TET4: // TET4's are created from an initial HEX27 discretization
138 case TET10: // TET10's are created from an initial HEX27 discretization
139 case TET14: // TET14's are created from an initial HEX27 discretization
140 case PYRAMID5: // PYRAMID5's are created from an initial HEX27 discretization
141 case PYRAMID13:
142 case PYRAMID14:
143 case PYRAMID18:
144 case PRISM15:
145 case PRISM18:
146 case PRISM20:
147 case PRISM21:
148 {
149 return i + (2*nx+1)*(j + k*(2*ny+1));
150 }
151
152 default:
153 libmesh_error_msg("ERROR: Unrecognized element type == " << Utility::enum_to_string(type));
154 }
155
157}

References libMesh::C0POLYHEDRON, 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.