97 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4,
98 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7,
99 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10,
100 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12,
102 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15,
103 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18,
104 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21,
105 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24,
106 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27,
107 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30,
108 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 33, 33, 33, 33, 33, 33, 33, 33, 33,
109 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36, 36,
110 37, 37, 37, 37, 37, 37, 37, 37, 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, 39,
111 40, 40, 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41, 42, 42, 42, 42, 42, 42, 42, 42, 42,
112 43, 43, 43, 43, 43, 43, 43, 43, 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45, 45,
113 46, 46, 46, 46, 46, 46, 46, 46, 46, 47, 47, 47, 47, 47, 47, 47, 47, 47, 48, 48, 48, 48, 48, 48, 48, 48, 48,
114 49, 49, 49, 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51,
115 52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 53, 53, 53, 53, 53, 53, 53, 53, 54, 54, 54, 54, 54, 54, 54, 54, 54,
116 55, 55, 55, 55, 55, 55, 55, 55, 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 57, 57, 57, 57,
117 58, 58, 58, 58, 58, 58, 58, 58, 58,
119 59, 59, 59, 59, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 60, 60, 60,
120 61, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62,
121 63, 63, 63, 63, 63, 63, 64, 64, 64, 64, 64, 64,
122 65, 65, 65, 65, 65, 65,
123 66, 66, 66, 66, 67, 67, 67, 67, 68, 68, 68, 68
656 const int cellID = aCellId;
660 std::vector< EclNbr::Identifier >::size_type
nearSize(0);
661 std::vector< EclNbr::Identifier > vNbr;
666 int tm1 = thetaId - 1;
667 int tm2 = thetaId - 2;
668 int tp1 = thetaId + 1;
669 int tp2 = thetaId + 2;
680 int fm1 = (phiId + 143) % 144;
681 int fp1 = (phiId + 1) % 144;
682 int fm2 = (phiId + 142) % 144;
683 int fp2 = (phiId + 2) % 144;
722 const EclIdentifier mPerRingForward[]
723 = { 48, 48, 64, 64, 64, 96, 96, 96, 96, 96, 96, 144, 144, 144, 144 };
724 if (thetaId > 1) nm2 = mPerRingForward[ thetaId - 2 ];
725 if (thetaId > 0) nm1 = mPerRingForward[ thetaId - 1 ];
726 n00 = mPerRingForward[ thetaId ];
727 np1 = mPerRingForward[ thetaId + 1 ];
728 np2 = mPerRingForward[ thetaId + 2 ];
731 const EclIdentifier mPerRingBackward[]
732 = { 64, 64, 64, 96, 96, 96, 96, 96, 144, 144, 144, 144 };
733 if (thetaId < 67) np2 = mPerRingBackward[ 66 - thetaId ];
734 if (thetaId < 68) np1 = mPerRingBackward[ 67 - thetaId ];
735 n00 = mPerRingBackward[ 68 - thetaId ];
736 nm1 = mPerRingBackward[ 69 - thetaId ];
737 nm2 = mPerRingBackward[ 70 - thetaId ];
744 int fp100 = (f0000 * np1 + np1 / 2) / n00;
745 int fp200 = (f0000 * np2 + np2 / 2) / n00;
746 int fm100 = (f0000 * nm1 + nm1 / 2) / n00;
747 int fm200 = (f0000 * nm2 + nm2 / 2) / n00;
749 int f00m1 = (f0000 + n00 - 1) % n00;
750 int f00m2 = (f0000 + n00 - 2) % n00;
751 int f00p1 = (f0000 + 1) % n00;
752 int f00p2 = (f0000 + 2) % n00;
754 int fp1m1 = (fp100 + np1 - 1) % np1;
755 int fp1m2 = (fp100 + np1 - 2) % np1;
756 int fp1p1 = (fp100 + 1) % np1;
757 int fp1p2 = (fp100 + 2) % np1;
759 int fm1m1 = (fm100 + nm1 - 1) % nm1;
760 int fm1m2 = (fm100 + nm1 - 2) % nm1;
761 int fm1p1 = (fm100 + 1) % nm1;
762 int fm1p2 = (fm100 + 2) % nm1;
764 int fp2m1 = (fp200 + np2 - 1) % np2;
765 int fp2m2 = (fp200 + np2 - 2) % np2;
766 int fp2p1 = (fp200 + 1) % np2;
767 int fp2p2 = (fp200 + 2) % np2;
769 int fm2m1 = (fm200 + nm2 - 1) % nm2;
770 int fm2m2 = (fm200 + nm2 - 2) % nm2;
771 int fm2p1 = (fm200 + 1) % nm2;
772 int fm2p2 = (fm200 + 2) % nm2;
773 int delta = n00 / 16;
775 int nth = phiId % delta;
790 if ((nth == 0) || (nth == 1)) {
794 }
else if ((nth == 2) || (nth == 3)) {
801 if ((nth == 0) || (nth == 3)) {
802 fm2p2 = fm2m2 = 1000;
803 }
else if (nth == 1) {
805 }
else if (nth == 2) {
810 if ((nth == 2) || (nth == 5)) {
822 if ((nth == 0) || (nth == 2) || (nth == 3) || (nth == 5)) {
827 if ((nth == 2) || (nth == 5) || (nth == 8)) {
839 if ((nth == 0) || (nth == 2) || (nth == 3)
840 || (nth == 5) || (nth == 6) || (nth == 8))
844 if ((nth == 2) || (nth == 5)) {
856 if ((nth == 0) || (nth == 2) || (nth == 3) || (nth == 5))
860 if ((nth == 2) || (nth == 5) || (nth == 8)) {
872 if ((nth == 0) || (nth == 2) || (nth == 3) || (nth == 5)
873 || (nth == 6) || (nth == 8))