Exemplo n.º 1
0
        public double[] GetApproximateSolution()
        {
            var points = GetPointsForSolution();
            var result = new double[points.Count];

            var mU = new ZeydelSlarSolver().Gaus(GetMatrix(), GetVector());

            for (var i = 0; i < points.Count; ++i)
            {
                result[i] = TrapezeMethod(points[i], mU);
            }

            return(result);
        }
Exemplo n.º 2
0
        public double[] GetApproximateFmmSolution()
        {
            var fmm    = new FastMultipoleMethod();
            var mU     = new ZeydelSlarSolver().Gaus(GetMatrix(), GetVector());
            var points = GetMixedPoints(mU);

            var actualSolution = fmm.MethodsSingleLevel(points)
                                 .Where(p => Math.Abs(p.Key.AdditionalValue) < Double.Epsilon)
                                 .OrderBy(p => p.Key.Order)
                                 .Select(p => p.Value / (-2 * _m))
                                 .ToArray();

            return(actualSolution);
        }