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)
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;
}
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;
}
Generated automatically by Doxygen for libMesh from the source code.