$extrastylesheet
00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 00020 00021 // C++ includes 00022 00023 // Local includes 00024 // #include "libmesh/point.h" 00025 00026 00027 00028 00029 // ------------------------------------------------------------ 00030 // Point class member funcions 00031 // unsigned int Point::key() const 00032 // { 00033 // unsigned int tempx,tempy,tempz; 00034 00035 // int i,j=2,cnt=0; 00036 // unsigned int index[3]; 00037 // const Real deg = 1.e12; 00038 00039 // tempx = static_cast<unsigned int>(((*this)(0)*deg)); 00040 // tempy = static_cast<unsigned int>(((*this)(1)*deg)); 00041 // tempz = static_cast<unsigned int>(((*this)(2)*deg)); 00042 00043 // index[0]=0; 00044 // index[1]=0; 00045 // index[2]=0; 00046 00047 // for(i=sizeof(unsigned int)*8-1;i>=0;i--) 00048 // { 00049 // index[j] += (tempx >> i) & 01; 00050 // index[j] = index[j] << 01; 00051 00052 // if (( cnt % (sizeof(unsigned int)*8) == 0) && (cnt !=0 ) ) 00053 // { 00054 // cnt = 0; 00055 // j--; 00056 // } 00057 // else 00058 // cnt++; 00059 00060 // index[j] += (tempy >> i) & 01; 00061 // index[j] = index[j] << 01; 00062 00063 // if (( cnt % (sizeof(unsigned int)*8) == 0) && (cnt !=0 ) ) 00064 // { 00065 // cnt = 0; 00066 // j--; 00067 // } 00068 // else 00069 // cnt++; 00070 00071 // index[j] += (tempz >> i) & 01; 00072 // index[j] = index[j] << 01; 00073 00074 // if (( cnt % (sizeof(unsigned int)*8) == 0) && (cnt !=0 ) ) 00075 // { 00076 // cnt = 0; 00077 // j--; 00078 // } 00079 // else 00080 // cnt++; 00081 // } 00082 00083 // return index[2]; 00084 // }