Exemplo n.º 1
0
 private void ParseSolvers(ParseTreeNode node, FvSolutionData rawData)
 {
     foreach (ParseTreeNode rootEntryNode in node.FindDictEntries(null))
     {
         var s = new MLinearSolver();
         s.Name = rootEntryNode.GetEntryIdentifier();
         rawData.Solvers.Add(s);
         ParseSolver(rootEntryNode.ChildNodes[2], s);
     }
 }
Exemplo n.º 2
0
 private void ParseSolvers(ParseTreeNode node, FvSolutionData rawData)
 {
     foreach (ParseTreeNode rootEntryNode in node.FindDictEntries(null))
     {
         var s = new MLinearSolver();
         s.Name = rootEntryNode.GetEntryIdentifier();
         rawData.Solvers.Add(s);
         ParseSolver(rootEntryNode.ChildNodes[2], s);
     }
 }
Exemplo n.º 3
0
        private void ParseSolver(ParseTreeNode node, MLinearSolver s)
        {
            foreach (ParseTreeNode rootEntryNode in node.FindDictEntries(null))
            {
                var identifier = rootEntryNode.GetEntryIdentifier();
                switch (identifier)
                {
                case "solver":
                    s.solver = rootEntryNode.GetBasicValEnum <LinearSolver>();
                    break;

                case "smoother":
                    s.smoother = rootEntryNode.GetBasicValEnum <Smoother>();
                    break;

                case "agglomerator":
                    s.agglomerator = rootEntryNode.GetBasicValEnum <Agglomerator>();
                    break;

                case "tolerance":
                    s.tolerance = rootEntryNode.GetBasicValDecimal();
                    break;

                case "relTol":
                    s.relTol = rootEntryNode.GetBasicValDecimal();
                    break;

                case "nPreSweeps":
                    s.nPreSweeps = rootEntryNode.GetBasicValInt();
                    break;

                case "nPostSweeps":
                    s.nPostSweeps = rootEntryNode.GetBasicValInt();
                    break;

                case "nFinestSweeps":
                    s.nFinestSweeps = rootEntryNode.GetBasicValInt();
                    break;

                case "cacheAgglomeration":
                    s.cacheAgglomeration = rootEntryNode.GetBasicValBool();
                    break;

                case "nCellsInCoarsestLevel":
                    s.nCellsInCoarsestLevel = rootEntryNode.GetBasicValInt();
                    break;

                case "mergeLevels":
                    s.mergeLevels = rootEntryNode.GetBasicValInt();
                    break;
                }
            }
        }
Exemplo n.º 4
0
 private void ParseSolver(ParseTreeNode node, MLinearSolver s)
 {
     foreach (ParseTreeNode rootEntryNode in node.FindDictEntries(null))
     {
         var identifier = rootEntryNode.GetEntryIdentifier();
         switch (identifier)
         {
             case "solver":
                 s.solver = rootEntryNode.GetBasicValEnum<LinearSolver>();
                 break;
             case "smoother":
                 s.smoother = rootEntryNode.GetBasicValEnum<Smoother>();
                 break;
             case "agglomerator":
                 s.agglomerator = rootEntryNode.GetBasicValEnum<Agglomerator>();
                 break;
             case "tolerance":
                 s.tolerance = rootEntryNode.GetBasicValDecimal();
                 break;
             case "relTol":
                 s.relTol = rootEntryNode.GetBasicValDecimal();
                 break;
             case "nPreSweeps":
                 s.nPreSweeps = rootEntryNode.GetBasicValInt();
                 break;
             case "nPostSweeps":
                 s.nPostSweeps = rootEntryNode.GetBasicValInt();
                 break;
             case "nFinestSweeps":
                 s.nFinestSweeps = rootEntryNode.GetBasicValInt();
                 break;
             case "cacheAgglomeration":
                 s.cacheAgglomeration = rootEntryNode.GetBasicValBool();
                 break;
             case "nCellsInCoarsestLevel":
                 s.nCellsInCoarsestLevel = rootEntryNode.GetBasicValInt();
                 break;
             case "mergeLevels":
                 s.mergeLevels = rootEntryNode.GetBasicValInt();
                 break;
         }
     }
 }