Ejemplo n.º 1
0
        public void Solve()
        {
            mb        = new MeshBuilder(Info.Points.Length);
            NodeCount = mb.Build(Info.Mesh);

            mb.BuildBoundary(Info.FB);

            pb = new PortraitBuilder(NodeCount, Info.Mesh);
            MatrixPortrait mp = new MatrixPortrait();

            pb.Build(mp);

            IMatrix A = new SymmetricSparseMatrix(NodeCount, mp);

            double[] B = new double[NodeCount];

            SLAEInfoDelta slaeinfo = new SLAEInfoDelta();

            slaeinfo.Points           = Info.Points;
            slaeinfo.Mesh             = Info.Mesh;
            slaeinfo.R0               = Info.R0;
            slaeinfo.Z0               = Info.Z0;
            slaeinfo.DeltaCoefficient = Info.DeltaCoefficient;

            sb = new SLAEBuilderDelta(slaeinfo);
            sb.Build(A, B);
            sb.AddBoundary(A, B, Info.FB);

            Console.WriteLine("Start Solving SLAE");
            Weights = Solver.Solve(A, B);
        }
Ejemplo n.º 2
0
        public SLAEBuilderDelta(SLAEInfoDelta info)
        {
            Info = info;

            local  = new double[FEMInfo.BasisSize, FEMInfo.BasisSize];
            localb = new double[FEMInfo.BasisSize];

            BuildPatterns();
        }