ESyS-Particle  2.3.4
HexagBlockIterator.hpp
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2017 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.apache.org/licenses/LICENSE-2.0 //
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
esys::lsm::HexagBlockIterator::HexagBlockIterator
HexagBlockIterator()
Definition: HexagBlockIterator.hpp:21
esys::lsm::ClosePackIterator
Definition: ClosePackIterator.h:55
esys::lsm::ClosePackIterator::SQRT_1_OVER_3
static const double SQRT_1_OVER_3
Definition: ClosePackIterator.h:57
esys
Definition: CheckPointable.cpp:17
esys::lsm::ClosePackIterator::setOffsetMatrix
void setOffsetMatrix(const OffsetMatrix &offsetMatrix)
Definition: ClosePackIterator.hpp:138
esys::lsm::ClosePackIterator::getRadius
double getRadius() const
Definition: ClosePackIterator.hpp:143
esys::lsm::ClosePackIterator::setDimRepeat
void setDimRepeat(const Vec3L &dimRepeat)
Definition: ClosePackIterator.hpp:133
esys::lsm::Vec3L
Definition: Vec3L.h:29
esys::lsm::ClosePackOrientation
ClosePackOrientation
Definition: ClosePackOrientation.h:26
esys::lsm::TmplMatrix< 3, 6, 6 >