Generated on Mon Jun 23 16:24:56 2008 for BIU-1.7.0 by doxygen 1.5.1

src/biu/LatticeDescriptorFCC.cc

Go to the documentation of this file.
00001 #include <biu/LatticeDescriptorFCC.hh>
00002 #include <cstdlib>
00003 
00004 namespace biu
00005 {
00006     
00007     LatticeDescriptorFCC::LatticeDescriptorFCC() 
00008         : LatticeDescriptor("fcc")
00009     {
00010         
00011         // gitterbasis
00012         latBase.push_back(IntPoint(1,0,0)); // x
00013         latBase.push_back(IntPoint(0,1,0)); // y
00014         latBase.push_back(IntPoint(0,0,1)); // z
00015         
00016         initNeighborhood();
00017         initAutomorphisms();
00018     }
00019     
00020     
00021     LatticeDescriptorFCC::~LatticeDescriptorFCC() {
00022     }
00023 
00024     unsigned int 
00025     LatticeDescriptorFCC::getNeighborDataSize() const {
00026         return 12;
00027     }
00028     
00029     const LatticeDescriptor::NeighborData *
00030     LatticeDescriptorFCC::getNeighborData() const {
00031             // init
00032         static const NeighborData fccNeighborData[] = {
00033             {"FL",{1,1,0},
00034              {{1,0,0},{0,1,0},{0,0,1}},   {{1,0,0},{0,1,0},{0,0,1}}},
00035             {"LU",{0,1,1},
00036              {{0,0,-1},{0,1,0},{1,0,0}},  {{0,0,1},{0,1,0},{-1,0,0}}},
00037             {"FU",{1,0,1},
00038              {{1,0,0},{0,0,-1},{0,1,0}},  {{1,0,0},{0,0,1},{0,-1,0}}},
00039             {"BL",{-1,1,0},
00040              {{0,-1,0},{1,0,0},{0,0,1}},  {{0,1,0},{-1,0,0},{0,0,1}}},
00041             {"RU",{0,-1,1},
00042              {{0,0,-1},{-1,0,0},{0,1,0}}, {{0,-1,0},{0,0,1},{-1,0,0}}},
00043             {"BU",{-1,0,1},
00044              {{0,-1,0},{0,0,-1},{1,0,0}}, {{0,0,1},{-1,0,0},{0,-1,0}}},
00045             {"FR",{1,-1,0},
00046              {{0,1,0},{-1,0,0},{0,0,1}},  {{0,-1,0},{1,0,0},{0,0,1}}},
00047             {"LD",{0,1,-1},
00048              {{0,0,1},{0,1,0},{-1,0,0}},  {{0,0,-1},{0,1,0},{1,0,0}}},
00049             {"FD",{1,0,-1},
00050              {{1,0,0},{0,0,1},{0,-1,0}},  {{1,0,0},{0,0,-1},{0,1,0}}},
00051             {"BR",{-1,-1,0},
00052              {{-1,0,0},{0,-1,0},{0,0,1}}, {{-1,0,0},{0,-1,0},{0,0,1}}},
00053             {"RD",{0,-1,-1},
00054              {{0,0,1},{-1,0,0},{0,-1,0}}, {{0,-1,0},{0,0,-1},{1,0,0}}},
00055             {"BD",{-1,0,-1},
00056              {{0,-1,0},{0,0,1},{-1,0,0}}, {{0,0,-1},{-1,0,0},{0,1,0}}}
00057             };
00058         
00059         return fccNeighborData;
00060     }
00061 
00062     
00063     unsigned int LatticeDescriptorFCC::getAutomorphismDataSize() const {
00064         return 48;
00065     }
00066 
00067     const LatticeDescriptorFCC::AutomorphismData *
00068     LatticeDescriptorFCC::getAutomorphismData() const {
00069         static const AutomorphismData data[] = 
00070             {{{1,0,0},{0,1,0},{0,0,1}}, {{0,0,1},{0,1,0},{1,0,0}},
00071              {{0,0,1},{0,1,0},{-1,0,0}}, {{0,0,1},{0,-1,0},{1,0,0}},
00072              {{0,0,1},{0,-1,0},{-1,0,0}}, {{0,0,1},{1,0,0},{0,1,0}},
00073              {{0,0,1},{1,0,0},{0,-1,0}}, {{0,0,1},{-1,0,0},{0,1,0}},
00074              {{0,0,1},{-1,0,0},{0,-1,0}}, {{0,0,-1},{0,1,0},{1,0,0}},
00075              {{0,0,-1},{0,1,0},{-1,0,0}}, {{0,0,-1},{0,-1,0},{1,0,0}},
00076              {{0,0,-1},{0,-1,0},{-1,0,0}}, {{0,0,-1},{1,0,0},{0,1,0}},
00077              {{0,0,-1},{1,0,0},{0,-1,0}}, {{0,0,-1},{-1,0,0},{0,1,0}},
00078              {{0,0,-1},{-1,0,0},{0,-1,0}}, {{0,1,0},{0,0,1},{1,0,0}},
00079              {{0,1,0},{0,0,1},{-1,0,0}}, {{0,1,0},{0,0,-1},{1,0,0}},
00080              {{0,1,0},{0,0,-1},{-1,0,0}}, {{0,1,0},{1,0,0},{0,0,1}},
00081              {{0,1,0},{1,0,0},{0,0,-1}}, {{0,1,0},{-1,0,0},{0,0,1}},
00082              {{0,1,0},{-1,0,0},{0,0,-1}}, {{0,-1,0},{0,0,1},{1,0,0}},
00083              {{0,-1,0},{0,0,1},{-1,0,0}}, {{0,-1,0},{0,0,-1},{1,0,0}},
00084              {{0,-1,0},{0,0,-1},{-1,0,0}}, {{0,-1,0},{1,0,0},{0,0,1}},
00085              {{0,-1,0},{1,0,0},{0,0,-1}}, {{0,-1,0},{-1,0,0},{0,0,1}},
00086              {{0,-1,0},{-1,0,0},{0,0,-1}}, {{1,0,0},{0,0,1},{0,1,0}},
00087              {{1,0,0},{0,0,1},{0,-1,0}}, {{1,0,0},{0,0,-1},{0,1,0}},
00088              {{1,0,0},{0,0,-1},{0,-1,0}}, {{1,0,0},{0,1,0},{0,0,-1}},
00089              {{1,0,0},{0,-1,0},{0,0,1}}, {{1,0,0},{0,-1,0},{0,0,-1}},
00090              {{-1,0,0},{0,0,1},{0,1,0}}, {{-1,0,0},{0,0,1},{0,-1,0}},
00091              {{-1,0,0},{0,0,-1},{0,1,0}}, {{-1,0,0},{0,0,-1},{0,-1,0}},
00092              {{-1,0,0},{0,1,0},{0,0,1}}, {{-1,0,0},{0,1,0},{0,0,-1}},
00093              {{-1,0,0},{0,-1,0},{0,0,1}}, {{-1,0,0},{0,-1,0},{0,0,-1}}};
00094         return data;
00095     }
00096     
00097     bool 
00098     LatticeDescriptorFCC::areNeighbored( const IntPoint &first, 
00099                                 const IntPoint &second ) const
00100     {
00101         int dx = abs(second.getX()-first.getX()), dy=0, dz=0;
00102         return (!(  dx > 1 
00103                     || (dy = abs(second.getY()-first.getY())) > 1 
00104                     || (dz = abs(second.getZ()-first.getZ())) > 1 
00105                     || dx+dy+dz!=2));
00106     }
00107     
00108 } // namespace biu
00109