In SUBIN7, DEJAC7, and DELEG7 changed double TOL to double TOL[] = new double[1]...
authorilb@NIH.GOV <ilb@NIH.GOV@ba61647d-9d00-f842-95cd-605cb4296b96>
Thu, 15 Feb 2018 22:22:56 +0000 (22:22 +0000)
committerilb@NIH.GOV <ilb@NIH.GOV@ba61647d-9d00-f842-95cd-605cb4296b96>
Thu, 15 Feb 2018 22:22:56 +0000 (22:22 +0000)
git-svn-id: https://citdcbmipav.cit.nih.gov/repos-pub/mipav/trunk@15380 ba61647d-9d00-f842-95cd-605cb4296b96

mipav/src/gov/nih/mipav/model/algorithms/SymmsIntegralMapping.java

index 23d60ba..71767b2 100644 (file)
@@ -5886,7 +5886,7 @@ public class SymmsIntegralMapping extends AlgorithmBase {
                final int NMAX = 100;\r
                double TAU[] = new double[1];\r
                double MAXRM[] = new double[1];\r
-               double TOL;\r
+               double TOL[] = new double[1];\r
                double RIGHT[] = new double[1];\r
                boolean T1FXD;\r
 \r
@@ -5902,7 +5902,7 @@ public class SymmsIntegralMapping extends AlgorithmBase {
 \r
                QINTS[0] = 1;\r
                XENPT[0] = -1.0;\r
-               TOL = TOLIN;\r
+               TOL[0] = TOLIN;\r
                DEJAC7(ZZ, NZZ, BETA, TAU, MAXDG, NQUAD, AJAC, BJAC, H0JAC, REMND, CSCAL, TOL, MAXRM, IER);\r
                if (IER[0] > 0) {\r
                        return;\r
@@ -5957,7 +5957,7 @@ public class SymmsIntegralMapping extends AlgorithmBase {
        } // private void SUBIN7\r
 \r
        private void DEJAC7(double ZZ[][], int NZZ, double BETA, double TAU[], int MAXDG, int NQUAD, double ACOEF[],\r
-                       double BCOEF[], double H0VAL, double REMND[][], double CSCAL[], double TOL, double MAXRM[], int IER[]) {\r
+                       double BCOEF[], double H0VAL, double REMND[][], double CSCAL[], double TOL[], double MAXRM[], int IER[]) {\r
                // INTEGER MAXDG,NQUAD,NZZ,IER\r
                // REAL BETA,TAU,H0VAL,TOL,MAXRM\r
                // REAL ACOEF(*),BCOEF(*),CSCAL(*)\r
@@ -6125,7 +6125,7 @@ public class SymmsIntegralMapping extends AlgorithmBase {
 \r
                while (true) {\r
 \r
-                       HTOL = 0.5 * TOL;\r
+                       HTOL = 0.5 * TOL[0];\r
                        K = 0;\r
                        for (J = 1; J <= NZZ; J++) {\r
                                XI[0] = (2.0 * ZZ[J - 1][0] + 1.0 - TAU[0]) / (1.0 + TAU[0]);\r
@@ -6168,7 +6168,7 @@ public class SymmsIntegralMapping extends AlgorithmBase {
                                MAXRM[0] = Math.max(MAXRM[0], TERM);\r
                        } // for (I=1; I <= LIM; I++)\r
 \r
-                       if (MAXRM[0] < TOL) {\r
+                       if (MAXRM[0] < TOL[0]) {\r
 \r
                                // ACCURACY IS ACHIEVED, BUT MAYBE TAU COULD BE INCREASED.\r
 \r
@@ -6188,17 +6188,17 @@ public class SymmsIntegralMapping extends AlgorithmBase {
                                else {\r
                                        break;\r
                                }\r
-                       } else { // MAXRM[0] >= TOL\r
+                       } else { // MAXRM[0] >= TOL[0]\r
 \r
                                // ACCURACY NOT ACHIEVED AND TAU NEEDS DECREASING.\r
 \r
                                if (TAU[0] == 1.0) {\r
-                                       TOL = HTOL;\r
+                                       TOL[0] = HTOL;\r
                                }\r
                                UPPER = TAU[0];\r
                                TAU[0] = 0.5 * (LOWER + UPPER);\r
                                continue;\r
-                       } // else MAXRM[0] >= TOL\r
+                       } // else MAXRM[0] >= TOL[0]\r
                } // while (true)\r
 \r
                // NORMAL TERMINATION\r
@@ -6224,7 +6224,7 @@ public class SymmsIntegralMapping extends AlgorithmBase {
        } // private double LGGAM\r
 \r
        private void DELEG7(double ZZ[][], int NZZ, double BETA, double TAU1[], double TAU2[], boolean T1FXD, int MAXDG,\r
-                       int NQUAD, double ACOEF[], double BCOEF[], double H0VAL, double REMND[][], double CSCAL[], double TOL,\r
+                       int NQUAD, double ACOEF[], double BCOEF[], double H0VAL, double REMND[][], double CSCAL[], double TOL[],\r
                        double MAXRM[], int IER[]) {\r
                // INTEGER MAXDG,NQUAD,IER,NZZ\r
                // REAL BETA,TAU1,TAU2,H0VAL,TOL,MAXRM\r
@@ -6392,7 +6392,7 @@ public class SymmsIntegralMapping extends AlgorithmBase {
 \r
                while (true) {\r
 \r
-                       HTOL = 0.5 * TOL;\r
+                       HTOL = 0.5 * TOL[0];\r
                        RR = (TAU2[0] - TAU1[0]) * 0.5;\r
                        MEAN = (TAU1[0] + TAU2[0]) * 0.5;\r
                        BB = (1.0 + MEAN) / RR;\r
@@ -6457,7 +6457,7 @@ public class SymmsIntegralMapping extends AlgorithmBase {
                                MAXRM[0] = Math.max(MAXRM[0], TERM);\r
                        } // for (I=1; I <= 2*MAXDG+2; I++)\r
 \r
-                       if (MAXRM[0] < TOL) {\r
+                       if (MAXRM[0] < TOL[0]) {\r
 \r
                                // ACCURACY IS ACHIEVED, BUT MAYBE TAU2 COULD BE INCREASED OR\r
                                // TAU1 DECREASED\r
@@ -6485,14 +6485,14 @@ public class SymmsIntegralMapping extends AlgorithmBase {
                                else {\r
                                        break;\r
                                }\r
-                       } // if (MAXRM[0] < TOL)\r
-                       else { // MAXRM[0] >= TOL\r
+                       } // if (MAXRM[0] < TOL[0])\r
+                       else { // MAXRM[0] >= TOL[0]\r
 \r
                                // ACCURACY NOT ACHIEVED AND TAU2 NEEDS DECREASING OR TAU1 NEEDS\r
                                // INCREASING.\r
 \r
                                if (FIRST) {\r
-                                       TOL = HTOL;\r
+                                       TOL[0] = HTOL;\r
                                        FIRST = false;\r
                                }\r
                                if (T1FXD) {\r
@@ -6503,7 +6503,7 @@ public class SymmsIntegralMapping extends AlgorithmBase {
                                        TAU1[0] = 0.5 * (LOWER + UPPER);\r
                                }\r
                                continue;\r
-                       } // else MAXRM[0] >= TOL\r
+                       } // else MAXRM[0] >= TOL[0]\r
                } // while (true)\r
 \r
                // NORMAL TERMINATION\r