ESyS-Particle  2.3.2
HexagBlockIterator.hpp
Go to the documentation of this file.
1 
2 // //
3 // Copyright (c) 2003-2014 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 
14 #ifndef ESYS_LSMHEXAGBLOCKITERATOR_HPP
15 #define ESYS_LSMHEXAGBLOCKITERATOR_HPP
16 
17 namespace esys
18 {
19  namespace lsm
20  {
23  {
24  }
25 
27  int numI,
28  int numJ,
29  int numK,
30  double sphereRadius,
31  ClosePackOrientation orientation
32  )
33  : ClosePackIterator(numI, numJ, numK, sphereRadius, orientation)
34  {
35  setDimRepeat(Vec3L(2,2,2));
36 
37  OffsetMatrix offsetMatrix;
38  offsetMatrix(0,0,0) = 0.0;
39  offsetMatrix(0,0,1) = getRadius();
40  offsetMatrix(0,0,2) = 0.0;
41 
42  offsetMatrix(0,1,0) = getRadius();
43  offsetMatrix(0,1,1) = 0.0;
44  offsetMatrix(0,1,2) = 0.0;
45 
46  offsetMatrix(0,2,0) = 0.0;
47  offsetMatrix(0,2,1) = 0.0;
48  offsetMatrix(0,2,2) = 0.0;
49 
50  offsetMatrix(1,0,0) = 0.0;
51  offsetMatrix(1,0,1) = 0.0;
52  offsetMatrix(1,0,2) = 0.0;
53 
54  offsetMatrix(1,1,0) = SQRT_1_OVER_3*getRadius();
55  offsetMatrix(1,1,1) = SQRT_1_OVER_3*getRadius();
56  offsetMatrix(1,1,2) = SQRT_1_OVER_3*getRadius();
57 
58  offsetMatrix(1,2,0) = 0.0;
59  offsetMatrix(1,2,1) = 0.0;
60  offsetMatrix(1,2,2) = 0.0;
61 
62  offsetMatrix(2,0,0) = 0.0;
63  offsetMatrix(2,0,1) = 0.0;
64  offsetMatrix(2,0,2) = 0.0;
65 
66  offsetMatrix(2,1,0) = 0.0;
67  offsetMatrix(2,1,1) = 0.0;
68  offsetMatrix(2,1,2) = 0.0;
69 
70  offsetMatrix(2,2,0) = 0.0;
71  offsetMatrix(2,2,1) = 0.0;
72  offsetMatrix(2,2,2) = 0.0;
73 
74  setOffsetMatrix(offsetMatrix);
75  }
76  }
77 }
78 
79 #endif