Ejemplo n.º 1
0
        public double InterpCircularPart(double x, double y, double z)
        {
            double[] fForGrigZ = new double[this.zC.Length];

            for (int iZ = 0; iZ < fForGrigZ.Length; iZ++)
            {
                double[] fForGridY = new double[this.yC.Length];
                for (int iY = 0; iY < fForGridY.Length; iY++)
                {
                    MathLib.Spline31D splineX = new MathLib.Spline31D(this.xC, this.fC[iZ][iY]);
                    fForGridY[iY] = splineX.Interp(x);
                }
                MathLib.Spline31D splineY = new MathLib.Spline31D(this.yC, fForGridY, 0, 0);
                fForGrigZ[iZ] = splineY.Interp(y);
            }

            MathLib.PolynomInterpolator pi = new MathLib.PolynomInterpolator(this.zC, fForGrigZ);

            double val = pi.Interp(z) / 100;

            return(val);
        }
Ejemplo n.º 2
0
        public double InterpTotal(double x, double y, double z)
        {
            double[] fForGrigZ = new double[this.zT.Length];

            for (int iZ = 0; iZ < fForGrigZ.Length; iZ++)
            {
                double[] fForGridY = new double[this.yT.Length];
                for (int iY = 0; iY < fForGridY.Length; iY++)
                {
                    MathLib.Spline31D splineX = new MathLib.Spline31D(this.xT, this.fT[iZ][iY]);
                    fForGridY[iY] = splineX.Interp(x);
                }
                MathLib.Spline31D splineY = new MathLib.Spline31D(this.yT, fForGridY, 0, 0);
                fForGrigZ[iZ] = splineY.Interp(y);
            }

            MathLib.PolynomInterpolator pi = new MathLib.PolynomInterpolator(this.zT, fForGrigZ);

            double val = pi.Interp(z);

            return(val);
        }
Ejemplo n.º 3
0
        public double InterpLinearPart(double x, double y, double z)
        {
            double[] fForGrigZ = new double[this.zL.Length];

            for (int iZ = 0; iZ < fForGrigZ.Length; iZ++)
            {
                double[] fForGridY = new double[this.yL.Length];
                for (int iY = 0; iY < fForGridY.Length; iY++)
                {
                    MathLib.Spline31D splineX = new MathLib.Spline31D(this.xL, this.fL[iZ][iY]);
                    fForGridY[iY] = Math.Log10(splineX.Interp(x) + 100);
                }

                MathLib.Spline31D splineY = new MathLib.Spline31D(this.yL, fForGridY);//, 0, 0);
                fForGrigZ[iZ] = splineY.Interp(y);
            }

            MathLib.PolynomInterpolator pi = new MathLib.PolynomInterpolator(this.zL, fForGrigZ);

            double val = (Math.Pow(10, pi.Interp(z)) - 100) / 100;

            return(val);
        }