/[escript]/trunk/paso/src/Options.cpp
ViewVC logotype

Diff of /trunk/paso/src/Options.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6798 by aellery, Wed Nov 21 06:54:51 2018 UTC revision 6799 by aellery, Mon Mar 25 05:53:58 2019 UTC
# Line 37  Options::Options(const bp::object& optio Line 37  Options::Options(const bp::object& optio
37      package = mapEscriptOption(sb.getPackage());      package = mapEscriptOption(sb.getPackage());
38      verbose = sb.isVerbose();      verbose = sb.isVerbose();
39      symmetric = sb.isSymmetric();      symmetric = sb.isSymmetric();
40        hermitian = sb.isHermitian();
41      tolerance = sb.getTolerance();      tolerance = sb.getTolerance();
42      absolute_tolerance = sb.getAbsoluteTolerance();      absolute_tolerance = sb.getAbsoluteTolerance();
43      inner_tolerance = sb.getInnerTolerance();      inner_tolerance = sb.getInnerTolerance();
# Line 51  Options::Options(const bp::object& optio Line 52  Options::Options(const bp::object& optio
52      truncation = sb.getTruncation();      truncation = sb.getTruncation();
53      restart = sb._getRestartForC();      restart = sb._getRestartForC();
54      sweeps = sb.getNumSweeps();      sweeps = sb.getNumSweeps();
     pre_sweeps = sb.getNumPreSweeps();  
     post_sweeps = sb.getNumPostSweeps();  
     level_max = sb.getLevelMax();  
     min_coarse_matrix_size = sb.getMinCoarseMatrixSize();  
     coarsening_threshold = sb.getCoarseningThreshold();  
55      accept_failed_convergence = sb.acceptConvergenceFailure();      accept_failed_convergence = sb.acceptConvergenceFailure();
     coarsening_method = mapEscriptOption(sb.getCoarsening());  
     smoother = mapEscriptOption(sb.getSmoother());  
56      relaxation_factor = sb.getRelaxationFactor();      relaxation_factor = sb.getRelaxationFactor();
57      use_local_preconditioner = sb.useLocalPreconditioner();      use_local_preconditioner = sb.useLocalPreconditioner();
     min_coarse_sparsity = sb.getMinCoarseMatrixSparsity();  
58      refinements = sb.getNumRefinements();      refinements = sb.getNumRefinements();
     coarse_matrix_refinements = sb.getNumCoarseMatrixRefinements();  
     usePanel = sb.usePanel();  
     diagonal_dominance_threshold = sb.getDiagonalDominanceThreshold();  
59  }  }
60    
61  void Options::setDefaults()  void Options::setDefaults()
# Line 74  void Options::setDefaults() Line 64  void Options::setDefaults()
64      method = PASO_DEFAULT;      method = PASO_DEFAULT;
65      package = PASO_DEFAULT;      package = PASO_DEFAULT;
66      symmetric = false;      symmetric = false;
67        hermitian = false;
68      reordering = PASO_NO_REORDERING;      reordering = PASO_NO_REORDERING;
69      tolerance = 1.e-8;      tolerance = 1.e-8;
70      absolute_tolerance = 0.;      absolute_tolerance = 0.;
# Line 87  void Options::setDefaults() Line 78  void Options::setDefaults()
78      restart = -1;      restart = -1;
79      truncation = 20;      truncation = 20;
80      sweeps = 2;      sweeps = 2;
     pre_sweeps = 2;  
     post_sweeps = 2;  
     coarsening_threshold = 0.25;  
     min_coarse_matrix_size = 500;  
     level_max = 100;  
81      accept_failed_convergence = false;      accept_failed_convergence = false;
     coarsening_method = PASO_DEFAULT;  
82      relaxation_factor = 0.95;      relaxation_factor = 0.95;
     smoother = PASO_GS;  
83      use_local_preconditioner = false;      use_local_preconditioner = false;
     min_coarse_sparsity = 0.05;  
84      refinements = 2;      refinements = 2;
     coarse_matrix_refinements = 0;  
     diagonal_dominance_threshold = 0.5;  
     cycle_type = 1;  
     usePanel = true;  
85      ode_solver = PASO_LINEAR_CRANK_NICOLSON;      ode_solver = PASO_LINEAR_CRANK_NICOLSON;
86    
87      // diagnostic values      // diagnostic values
# Line 146  void Options::show() const Line 125  void Options::show() const
125          << "\tmethod = " << name(method) << " (" << method << ")" << std::endl          << "\tmethod = " << name(method) << " (" << method << ")" << std::endl
126          << "\tpackage = " << name(package) << " (" << package << ")" << std::endl          << "\tpackage = " << name(package) << " (" << package << ")" << std::endl
127          << "\tsymmetric = " << symmetric << std::endl          << "\tsymmetric = " << symmetric << std::endl
128            << "\thermitian = " << hermitian << std::endl
129          << "\treordering = " << name(reordering) << " (" << reordering << ")" << std::endl          << "\treordering = " << name(reordering) << " (" << reordering << ")" << std::endl
130          << "\ttolerance = " << tolerance << std::endl          << "\ttolerance = " << tolerance << std::endl
131          << "\tabsolute_tolerance = " << absolute_tolerance << std::endl          << "\tabsolute_tolerance = " << absolute_tolerance << std::endl
# Line 159  void Options::show() const Line 139  void Options::show() const
139          << "\trestart = " << restart << std::endl          << "\trestart = " << restart << std::endl
140          << "\ttruncation = " << truncation << std::endl          << "\ttruncation = " << truncation << std::endl
141          << "\tsweeps = " << sweeps << std::endl          << "\tsweeps = " << sweeps << std::endl
         << "\tpre_sweeps = " << pre_sweeps << std::endl  
         << "\tpost_sweeps = " << post_sweeps << std::endl  
         << "\tcoarsening_threshold = " << coarsening_threshold << std::endl  
         << "\tlevel_max = " << level_max << std::endl  
142          << "\taccept_failed_convergence = " << accept_failed_convergence << std::endl          << "\taccept_failed_convergence = " << accept_failed_convergence << std::endl
         << "\tcoarsening_method = " << name(coarsening_method) << " (" << coarsening_method << ")" << std::endl  
143          << "\trelaxation_factor = " << relaxation_factor << std::endl          << "\trelaxation_factor = " << relaxation_factor << std::endl
144          << "\tuse_local_preconditioner = " << use_local_preconditioner << std::endl          << "\tuse_local_preconditioner = " << use_local_preconditioner << std::endl
         << "\tmin_coarse_sparsity = " << min_coarse_sparsity << std::endl  
145          << "\trefinements = " << refinements << std::endl          << "\trefinements = " << refinements << std::endl
         << "\tcoarse_matrix_refinements = " << coarse_matrix_refinements << std::endl  
         << "\tcycle_type = " << cycle_type << std::endl  
146          << "\tode_solver = " << ode_solver << std::endl;          << "\tode_solver = " << ode_solver << std::endl;
147  }  }
148    
# Line 437  int Options::mapEscriptOption(int escrip Line 409  int Options::mapEscriptOption(int escrip
409          case escript::SO_ODESOLVER_LINEAR_CRANK_NICOLSON:          case escript::SO_ODESOLVER_LINEAR_CRANK_NICOLSON:
410              return PASO_LINEAR_CRANK_NICOLSON;              return PASO_LINEAR_CRANK_NICOLSON;
411    
         case escript::SO_INTERPOLATION_CLASSIC:  
             return PASO_CLASSIC_INTERPOLATION;  
         case escript::SO_INTERPOLATION_CLASSIC_WITH_FF_COUPLING:  
             return PASO_CLASSIC_INTERPOLATION_WITH_FF_COUPLING;  
         case escript::SO_INTERPOLATION_DIRECT:  
             return PASO_DIRECT_INTERPOLATION;  
   
412          case escript::SO_REORDERING_DEFAULT:          case escript::SO_REORDERING_DEFAULT:
413              return PASO_DEFAULT_REORDERING;              return PASO_DEFAULT_REORDERING;
414          case escript::SO_REORDERING_MINIMUM_FILL_IN:          case escript::SO_REORDERING_MINIMUM_FILL_IN:

Legend:
Removed from v.6798  
changed lines
  Added in v.6799

  ViewVC Help
Powered by ViewVC 1.1.26