Exemplo n.º 1
0
        public static void ScalingCircle2D(
            //[Values(1)]
            [Values(1, 2, 3, 4)]
            int dgDegree
            ) //
        {
            int sz = ilPSP.Environment.MPIEnv.MPI_Size;

            if (sz > 1)
            {
                return;// deactivate for multiple procs.
            }
            var Controls = new List <XdgPoisson3Control>();

            int[] ResS = null;
            switch (dgDegree)
            {
//#if DEBUG
//                case 1: ResS = new int[] { 8, 16, 32, 64 }; break;
//#else
            case 1: ResS = new int[] { 8, 9, 16, 17, 32, 33, 64, 65, 128 }; break;

            case 2: ResS = new int[] { 8, 9, 16, 17, 32, 33, 64, 65 }; break;

            case 3: ResS = new int[] { 8, 9, 16, 17, 32, 33, 64 }; break;

            case 4: ResS = new int[] { 8, 9, 16, 17, 32, 33 }; break;

//#endif
            default: throw new NotImplementedException();
            }

            foreach (int res in ResS)
            {
                var C = HardCodedControl.Circle(Resolution: res, p: dgDegree);
                C.LinearSolver.SolverCode = Code.classic_pardiso;
                C.savetodb = false;

                Controls.Add(C);
            }

            /*
             * Für p = 1:
             * Slope for TotCondNo-Var0: 2.153e00
             * Slope for InnerCondNo-Var0: 2.59e00
             * Slope for StencilCondNo-innerUncut-Var0: 1.486e-01
             * Slope for StencilCondNo-innerCut-Var0: 9.957e-02
             * Slope for StencilCondNo-bndyUncut-Var0: 1.226e-04
             * Slope for StencilCondNo-bndyCut-Var0: 0e00
             */

            ConditionNumberScalingTest.Perform(Controls, plotAndWait: true, title: "ScalingCircle2D");
        }
Exemplo n.º 2
0
        public static void SolverTest([Values(Code.exp_softpcg_mg
                                              //, "pcg+schwarz", "pcg+mg+schwarz", "gmres+mg+schwarz", "ono+mg+schwarz"
                                              )] Code SolverName)
        {
            using (var solver = new XdgPoisson3Main()) {
                var C = HardCodedControl.Circle(solver: SolverName);


                solver.Init(C);
                solver.RunSolverMode();
            }
        }