ESyS-Particle
4.0.1
|
00001 00002 // // 00003 // Copyright (c) 2003-2011 by The University of Queensland // 00004 // Earth Systems Science Computational Centre (ESSCC) // 00005 // http://www.uq.edu.au/esscc // 00006 // // 00007 // Primary Business: Brisbane, Queensland, Australia // 00008 // Licensed under the Open Software License version 3.0 // 00009 // http://www.opensource.org/licenses/osl-3.0.php // 00010 // // 00012 00013 00014 #ifndef ESYS_LSMCUBICBLOCKITERATOR_HPP 00015 #define ESYS_LSMCUBICBLOCKITERATOR_HPP 00016 00017 namespace esys 00018 { 00019 namespace lsm 00020 { 00021 CubicBlockIterator::CubicBlockIterator() 00022 : ClosePackIterator() 00023 { 00024 } 00025 00026 CubicBlockIterator::CubicBlockIterator( 00027 int numI, 00028 int numJ, 00029 int numK, 00030 double sphereRadius, 00031 ClosePackOrientation orientation 00032 ) 00033 : ClosePackIterator(numI, numJ, numK, sphereRadius, orientation) 00034 { 00035 setDimRepeat(Vec3L(6,3,3)); 00036 00037 OffsetMatrix offsetMatrix; 00038 offsetMatrix(0,0,0) = 0.0; 00039 offsetMatrix(0,0,1) = 0.0; 00040 offsetMatrix(0,0,2) = getRadius(); 00041 offsetMatrix(0,0,3) = 0.0; 00042 offsetMatrix(0,0,4) = 0.0; 00043 offsetMatrix(0,0,5) = getRadius(); 00044 00045 offsetMatrix(0,1,0) = getRadius(); 00046 offsetMatrix(0,1,1) = getRadius(); 00047 offsetMatrix(0,1,2) = 0.0; 00048 offsetMatrix(0,1,3) = getRadius(); 00049 offsetMatrix(0,1,4) = getRadius(); 00050 offsetMatrix(0,1,5) = 0.0; 00051 00052 offsetMatrix(0,2,0) = 0.0; 00053 offsetMatrix(0,2,1) = 0.0; 00054 offsetMatrix(0,2,2) = getRadius(); 00055 offsetMatrix(0,2,3) = 0.0; 00056 offsetMatrix(0,2,4) = 0.0; 00057 offsetMatrix(0,2,5) = getRadius(); 00058 00059 offsetMatrix(0,3,0) = getRadius(); 00060 offsetMatrix(0,3,1) = getRadius(); 00061 offsetMatrix(0,3,2) = 0.0; 00062 offsetMatrix(0,3,3) = getRadius(); 00063 offsetMatrix(0,3,4) = getRadius(); 00064 offsetMatrix(0,3,5) = 0.0; 00065 00066 offsetMatrix(0,4,0) = 0.0; 00067 offsetMatrix(0,4,1) = 0.0; 00068 offsetMatrix(0,4,2) = getRadius(); 00069 offsetMatrix(0,4,3) = 0.0; 00070 offsetMatrix(0,4,4) = 0.0; 00071 offsetMatrix(0,4,5) = getRadius(); 00072 00073 offsetMatrix(0,5,0) = getRadius(); 00074 offsetMatrix(0,5,1) = getRadius(); 00075 offsetMatrix(0,5,2) = 0.0; 00076 offsetMatrix(0,5,3) = getRadius(); 00077 offsetMatrix(0,5,4) = getRadius(); 00078 offsetMatrix(0,5,5) = 0.0; 00079 00080 offsetMatrix(1,0,0) = 0.0; 00081 offsetMatrix(1,0,1) = 0.0; 00082 offsetMatrix(1,0,2) = 0.0; 00083 00084 offsetMatrix(1,1,0) = 2.0*SQRT_1_OVER_3*getRadius(); 00085 offsetMatrix(1,1,1) = 2.0*SQRT_1_OVER_3*getRadius(); 00086 offsetMatrix(1,1,2) = 2.0*SQRT_1_OVER_3*getRadius(); 00087 00088 offsetMatrix(1,2,0) = SQRT_1_OVER_3*getRadius(); 00089 offsetMatrix(1,2,1) = SQRT_1_OVER_3*getRadius(); 00090 offsetMatrix(1,2,2) = SQRT_1_OVER_3*getRadius(); 00091 00092 offsetMatrix(2,0,0) = 0.0; 00093 offsetMatrix(2,0,1) = 0.0; 00094 offsetMatrix(2,0,2) = 0.0; 00095 00096 offsetMatrix(2,1,0) = 0.0; 00097 offsetMatrix(2,1,1) = 0.0; 00098 offsetMatrix(2,1,2) = 0.0; 00099 00100 offsetMatrix(2,2,0) = 0.0; 00101 offsetMatrix(2,2,1) = 0.0; 00102 offsetMatrix(2,2,2) = 0.0; 00103 00104 setOffsetMatrix(offsetMatrix); 00105 } 00106 } 00107 } 00108 00109 #endif