Пример #1
0
        public Sparse_MSG_Solver(ref GlobalMatrix _GM)
        {
            F_list = new List <double>(new double[Size]);
            if (InsertedInfo.Sparse && InsertedInfo.Sparse_MSG)
            {
                Console.WriteLine(this.ToString() + " initiated");

                GM = _GM;
                gg = GM.gg;
                fe = GM.fe;
                lm = GM.lm;

                if (!InsertedInfo.Test_another_matrix)
                {
                    Size     = fe.Size;
                    al       = Shared_Field.CopyListCC(GM.al);
                    au       = Shared_Field.CopyListCC(GM.au);
                    F_sparse = Shared_Field.CopyVectorFromToDouble(GM.F_sparse);
                }
                else
                {
                    Size     = GM.Test_Size;
                    al       = Shared_Field.CopyListCC(GM.Test_al);
                    au       = Shared_Field.CopyListCC(GM.Test_au);
                    F_sparse = Shared_Field.CopyVectorFromToDouble(GM.F_test);
                }

                Solve();

                Shared_Field.Save_vector(Answer, "dd84ai_RGR_output_X0_sparse_MSG.txt");
                Shared_Field.Show_three_elements_from_vector(Answer);
            }
        }
Пример #2
0
        public Sparse_Straight_Solver(ref GlobalMatrix _GM)
        {
            F = new List <double>(new double[Size]);
            if (InsertedInfo.Sparse && InsertedInfo.Sparse_Straight)
            {
                Console.WriteLine(this.ToString() + " initiated");
                GM = _GM;
                gg = GM.gg;
                fe = GM.fe;
                lm = GM.lm;

                if (!InsertedInfo.Test_another_matrix)
                {
                    Size     = fe.Size;
                    al       = Shared_Field.CopyListCC(GM.al);
                    au       = Shared_Field.CopyListCC(GM.au);
                    F_sparse = Shared_Field.CopyVectorFrom(GM.F_sparse);
                }
                else
                {
                    al       = Shared_Field.CopyListCC(GM.Test_al);
                    au       = Shared_Field.CopyListCC(GM.Test_au);
                    Size     = GM.Test_Size;
                    F_sparse = Shared_Field.CopyVectorFrom(GM.F_test);
                }



                Solve();
            }
        }
Пример #3
0
        public Dense_Straight_Solver(ref GlobalMatrix _GM)
        {
            F_list = new List <double>(new double[Size]);
            if (InsertedInfo.Dense)
            {
                Console.WriteLine(this.ToString() + " initiated");

                GM = _GM;
                gg = GM.gg;
                fe = GM.fe;
                lm = GM.lm;

                if (InsertedInfo.Test_another_matrix)
                {
                    Size    = GM.Test_Size;
                    A       = Shared_Field.CopyMatrixFrom(GM.Test_dense);
                    F_local = Shared_Field.CopyVectorFrom(GM.F_test);
                }
                else
                {
                    Size    = fe.Size;
                    A       = Shared_Field.CopyMatrixFrom(GM.A_dense);
                    F_local = Shared_Field.CopyVectorFrom(GM.F_dense);
                }

                Solve();

                Shared_Field.Save_vector(Answer, "dd84ai_RGR_output_X0_dense_Straight_LU.txt");
                Shared_Field.Show_three_elements_from_vector(Answer);
            }
        }
Пример #4
0
 public LocalMatrixes(ref Greed_Grid _greed)
 {
     Console.WriteLine(this.ToString() + " initiated");
     gg = _greed;
     Put_References(ref gg.OS_X, ref gg.OS_Y, ref gg.OS_Z);
     Console.Write("");
 }
Пример #5
0
 public FE(ref Greed_Grid _greedy_grid)
 {
     Console.WriteLine(this.ToString() + " initiated");
     greedy_grid = _greedy_grid;
     Generating_FE_List(ref greedy_grid.OS_X, ref greedy_grid.OS_Y, ref greedy_grid.OS_Z);
     Size = (greedy_grid.OS_X.Count()) *
            (greedy_grid.OS_Y.Count()) *
            (greedy_grid.OS_Z.Count());
     Console.WriteLine($"Size = {Size}");
 }
Пример #6
0
        public Trilinear_Basis_Functions(ref GlobalMatrix _GM, List <double> _Vector_Answer, List <InsertedInfo.Point3D> Points, string name)
        {
            Console.WriteLine(this.ToString() + " initiated");
            GM            = _GM;
            gg            = GM.gg;
            fe            = GM.fe;
            lm            = GM.lm;
            Vector_Answer = _Vector_Answer;

            Save_and_Show(Points, name);
        }
Пример #7
0
        public GlobalMatrix(ref FE _fe, ref LocalMatrixes _locmat)
        {
            Console.WriteLine(this.ToString() + " initiated");
            fe = _fe;
            gg = fe.greedy_grid;
            lm = _locmat;

            if (InsertedInfo.Test_another_matrix)
            {
                Test_Size = 6;
                fill_test_test_dense();
                make_it_sparse();
            }
            Wrapped_Global_Matrix_Constructer();
        }