escript
Revision_
|
#include <SolverOptions.h>
Public Member Functions | |
SolverBuddy () | |
~SolverBuddy () | |
std::string | getSummary () const |
const char * | getName (int key) const |
void | resetDiagnostics (bool all=false) |
void | updateDiagnosticsPy (const std::string &key, const boost::python::object &value) |
void | updateDiagnostics (const std::string &key, bool value) |
void | updateDiagnostics (const std::string &key, int value) |
void | updateDiagnostics (const std::string &key, double value) |
double | getDiagnostics (const std::string name) const |
bool | hasConverged () const |
void | setPreconditioner (int preconditioner) |
SolverOptions | getPreconditioner () const |
void | setSolverMethod (int method) |
SolverOptions | getSolverMethod () const |
void | setPackage (int package) |
SolverOptions | getPackage () const |
void | setReordering (int ordering) |
SolverOptions | getReordering () const |
void | setRestart (int restart) |
int | getRestart () const |
int | _getRestartForC () const |
void | setTruncation (int truncation) |
int | getTruncation () const |
void | setInnerIterMax (int iter_max) |
int | getInnerIterMax () const |
void | setIterMax (int iter_max) |
int | getIterMax () const |
void | setNumSweeps (int sweeps) |
int | getNumSweeps () const |
void | setTolerance (double rtol) |
double | getTolerance () const |
void | setAbsoluteTolerance (double atol) |
double | getAbsoluteTolerance () const |
void | setInnerTolerance (double rtol) |
double | getInnerTolerance () const |
void | setDropTolerance (double drop_tol) |
double | getDropTolerance () const |
void | setDropStorage (double drop) |
double | getDropStorage () const |
void | setRelaxationFactor (double factor) |
double | getRelaxationFactor () const |
bool | isComplex () const |
void | setComplex (bool complex) |
bool | isSymmetric () const |
void | setSymmetryOn () |
void | setSymmetryOff () |
void | setSymmetry (bool symmetry) |
bool | isHermitian () const |
void | setHermitianOn () |
void | setHermitianOff () |
void | setHermitian (bool hermitian) |
bool | isVerbose () const |
void | setVerbosityOn () |
void | setVerbosityOff () |
void | setVerbosity (bool verbose) |
bool | adaptInnerTolerance () const |
void | setInnerToleranceAdaptionOn () |
void | setInnerToleranceAdaptionOff () |
void | setInnerToleranceAdaption (bool adaption) |
bool | acceptConvergenceFailure () const |
void | setAcceptanceConvergenceFailureOn () |
void | setAcceptanceConvergenceFailureOff () |
void | setAcceptanceConvergenceFailure (bool acceptance) |
bool | useLocalPreconditioner () const |
void | setLocalPreconditionerOn () |
void | setLocalPreconditionerOff () |
void | setLocalPreconditioner (bool local) |
void | setNumRefinements (int refinements) |
int | getNumRefinements () const |
void | setODESolver (int solver) |
SolverOptions | getODESolver () const |
void | setTrilinosParameter (const std::string &name, const boost::python::object &value) |
boost::python::dict | getTrilinosParameters () const |
void | setDim (int dim) |
int | getDim () |
bool | using_default_method () const |
Protected Attributes | |
boost::python::dict | trilinosParams |
SolverOptions | target |
SolverOptions | package |
SolverOptions | method |
SolverOptions | preconditioner |
SolverOptions | ode_solver |
SolverOptions | reordering |
int | sweeps |
double | tolerance |
double | absolute_tolerance |
double | inner_tolerance |
double | drop_tolerance |
double | drop_storage |
int | iter_max |
int | inner_iter_max |
int | truncation |
int | restart |
bool | is_complex |
bool | symmetric |
bool | hermitian |
bool | verbose |
bool | adapt_inner_tolerance |
bool | accept_convergence_failure |
double | relaxation |
bool | use_local_preconditioner |
int | refinements |
int | dim |
int | num_iter |
int | num_level |
int | num_inner_iter |
double | time |
double | set_up_time |
double | net_time |
double | residual_norm |
bool | converged |
int | preconditioner_size |
bool | time_step_backtracking_used |
double | coarse_level_sparsity |
int | num_coarse_unknowns |
int | cum_num_inner_iter |
int | cum_num_iter |
double | cum_time |
double | cum_set_up_time |
double | cum_net_time |
bool | using_default_solver_method |
escript::SolverBuddy::SolverBuddy | ( | ) |
References resetDiagnostics().
escript::SolverBuddy::~SolverBuddy | ( | ) |
int escript::SolverBuddy::_getRestartForC | ( | ) | const |
Returns the number of iterations steps after which GMRES performs a restart. If -1 is returned no restart is performed.
References getRestart().
bool escript::SolverBuddy::acceptConvergenceFailure | ( | ) | const |
Returns true
if a failure to meet the stopping criteria within the given number of iteration steps does not raise an exception. This is useful if a solver is used in a non-linear context where the non-linear solver can continue even if the returned solution does not necessarily meet the stopping criteria. One can use the hasConverged
method to check if the last call to the solver was successful.
true
if a failure to achieve convergence is accepted. References accept_convergence_failure.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
bool escript::SolverBuddy::adaptInnerTolerance | ( | ) | const |
Returns true
if the tolerance of the inner solver is selected automatically. Otherwise the inner tolerance set by setInnerTolerance
is used.
true
if inner tolerance adaption is chosen. References adapt_inner_tolerance.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
double escript::SolverBuddy::getAbsoluteTolerance | ( | ) | const |
Returns the absolute tolerance for the solver
References absolute_tolerance.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
double escript::SolverBuddy::getDiagnostics | ( | const std::string | name | ) | const |
Returns the diagnostic information for the given name
. Possible values are:
name | name of diagnostic information to return |
References converged, cum_net_time, cum_num_inner_iter, cum_num_iter, cum_set_up_time, cum_time, net_time, num_inner_iter, num_iter, preconditioner_size, residual_norm, set_up_time, time, and time_step_backtracking_used.
Referenced by BOOST_PYTHON_MODULE().
int escript::SolverBuddy::getDim | ( | ) |
Returns the dimension of the problem we are solving.
References dim.
Referenced by BOOST_PYTHON_MODULE().
double escript::SolverBuddy::getDropStorage | ( | ) | const |
Returns the maximum allowed increase in storage for ILUT
References drop_storage.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
double escript::SolverBuddy::getDropTolerance | ( | ) | const |
Returns the relative drop tolerance in ILUT
References drop_tolerance.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
int escript::SolverBuddy::getInnerIterMax | ( | ) | const |
Returns maximum number of inner iteration steps
References inner_iter_max.
Referenced by BOOST_PYTHON_MODULE().
double escript::SolverBuddy::getInnerTolerance | ( | ) | const |
Returns the relative tolerance for an inner iteration scheme
References inner_tolerance.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
int escript::SolverBuddy::getIterMax | ( | ) | const |
Returns maximum number of iteration steps
References iter_max.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
const char * escript::SolverBuddy::getName | ( | int | key | ) | const |
Returns the name of a given key
key | a valid key from SolverOptions |
References escript::SO_DEFAULT, escript::SO_INTERPOLATION_CLASSIC, escript::SO_INTERPOLATION_CLASSIC_WITH_FF_COUPLING, escript::SO_INTERPOLATION_DIRECT, escript::SO_METHOD_BICGSTAB, escript::SO_METHOD_CGLS, escript::SO_METHOD_CGS, escript::SO_METHOD_CHOLEVSKY, escript::SO_METHOD_CR, escript::SO_METHOD_DIRECT, escript::SO_METHOD_DIRECT_MUMPS, escript::SO_METHOD_DIRECT_PARDISO, escript::SO_METHOD_DIRECT_SUPERLU, escript::SO_METHOD_DIRECT_TRILINOS, escript::SO_METHOD_GMRES, escript::SO_METHOD_HRZ_LUMPING, escript::SO_METHOD_ITERATIVE, escript::SO_METHOD_LSQR, escript::SO_METHOD_MINRES, escript::SO_METHOD_NONLINEAR_GMRES, escript::SO_METHOD_PCG, escript::SO_METHOD_PRES20, escript::SO_METHOD_ROWSUM_LUMPING, escript::SO_METHOD_TFQMR, escript::SO_ODESOLVER_BACKWARD_EULER, escript::SO_ODESOLVER_CRANK_NICOLSON, escript::SO_ODESOLVER_LINEAR_CRANK_NICOLSON, escript::SO_PACKAGE_MKL, escript::SO_PACKAGE_PASO, escript::SO_PACKAGE_TRILINOS, escript::SO_PACKAGE_UMFPACK, escript::SO_PRECONDITIONER_AMG, escript::SO_PRECONDITIONER_GAUSS_SEIDEL, escript::SO_PRECONDITIONER_ILU0, escript::SO_PRECONDITIONER_ILUT, escript::SO_PRECONDITIONER_JACOBI, escript::SO_PRECONDITIONER_NONE, escript::SO_PRECONDITIONER_REC_ILU, escript::SO_PRECONDITIONER_RILU, escript::SO_REORDERING_DEFAULT, escript::SO_REORDERING_MINIMUM_FILL_IN, escript::SO_REORDERING_NESTED_DISSECTION, escript::SO_REORDERING_NONE, escript::SO_TARGET_CPU, and escript::SO_TARGET_GPU.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
int escript::SolverBuddy::getNumRefinements | ( | ) | const |
Returns the number of refinement steps to refine the solution when a direct solver is applied.
References refinements.
Referenced by BOOST_PYTHON_MODULE().
int escript::SolverBuddy::getNumSweeps | ( | ) | const |
Returns the number of sweeps in a Jacobi or Gauss-Seidel/SOR preconditioner.
References sweeps.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
SolverOptions escript::SolverBuddy::getODESolver | ( | ) | const |
Returns the key of the solver method for ODEs.
References ode_solver.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
SolverOptions escript::SolverBuddy::getPackage | ( | ) | const |
Returns the solver package key
References package.
Referenced by BOOST_PYTHON_MODULE(), getSummary(), ripley::RipleyDomain::getSystemMatrixTypeId(), dudley::DudleyDomain::getSystemMatrixTypeId(), and finley::FinleyDomain::getSystemMatrixTypeId().
SolverOptions escript::SolverBuddy::getPreconditioner | ( | ) | const |
Returns the key of the preconditioner to be used.
References preconditioner.
Referenced by BOOST_PYTHON_MODULE(), getSummary(), ripley::RipleyDomain::getSystemMatrixTypeId(), dudley::DudleyDomain::getSystemMatrixTypeId(), and finley::FinleyDomain::getSystemMatrixTypeId().
double escript::SolverBuddy::getRelaxationFactor | ( | ) | const |
Returns the relaxation factor used to add dropped elements in RILU to the main diagonal.
References relaxation.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
SolverOptions escript::SolverBuddy::getReordering | ( | ) | const |
Returns the key of the reordering method to be applied if supported by the solver.
References reordering.
Referenced by BOOST_PYTHON_MODULE().
int escript::SolverBuddy::getRestart | ( | ) | const |
Returns the number of iterations steps after which GMRES performs a restart. 0 means no restart is performed.
References restart.
Referenced by _getRestartForC(), BOOST_PYTHON_MODULE(), and getSummary().
SolverOptions escript::SolverBuddy::getSolverMethod | ( | ) | const |
Returns key of the solver method to be used.
References method.
Referenced by BOOST_PYTHON_MODULE(), getSummary(), ripley::RipleyDomain::getSystemMatrixTypeId(), dudley::DudleyDomain::getSystemMatrixTypeId(), finley::FinleyDomain::getSystemMatrixTypeId(), and setPackage().
std::string escript::SolverBuddy::getSummary | ( | ) | const |
Returns a string reporting the current settings
References acceptConvergenceFailure(), adaptInnerTolerance(), getAbsoluteTolerance(), getDropStorage(), getDropTolerance(), getInnerTolerance(), getIterMax(), getName(), getNumSweeps(), getODESolver(), getPackage(), getPreconditioner(), getRelaxationFactor(), getRestart(), getSolverMethod(), getTolerance(), getTruncation(), isHermitian(), isSymmetric(), isVerbose(), escript::SO_DEFAULT, escript::SO_METHOD_GMRES, escript::SO_PACKAGE_PASO, escript::SO_PACKAGE_TRILINOS, escript::SO_PRECONDITIONER_GAUSS_SEIDEL, escript::SO_PRECONDITIONER_ILUT, escript::SO_PRECONDITIONER_RILU, and useLocalPreconditioner().
Referenced by BOOST_PYTHON_MODULE().
double escript::SolverBuddy::getTolerance | ( | ) | const |
Returns the relative tolerance for the solver
References tolerance.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
bp::dict escript::SolverBuddy::getTrilinosParameters | ( | ) | const |
Returns a boost python dictionary of set Trilinos parameters.
References trilinosParams.
Referenced by BOOST_PYTHON_MODULE().
int escript::SolverBuddy::getTruncation | ( | ) | const |
Returns the number of residuals in GMRES to be stored for orthogonalization.
References truncation.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
bool escript::SolverBuddy::hasConverged | ( | ) | const |
Returns true
if the last solver call has been finalized successfully.
References converged.
Referenced by BOOST_PYTHON_MODULE().
bool escript::SolverBuddy::isComplex | ( | ) | const |
Checks if the coefficient matrix is set to be complex-valued.
References is_complex.
Referenced by BOOST_PYTHON_MODULE(), ripley::RipleyDomain::getSystemMatrixTypeId(), dudley::DudleyDomain::getSystemMatrixTypeId(), and finley::FinleyDomain::getSystemMatrixTypeId().
bool escript::SolverBuddy::isHermitian | ( | ) | const |
Checks if the coefficient matrix is indicated to be Hermitian.
References hermitian.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
bool escript::SolverBuddy::isSymmetric | ( | ) | const |
Checks if symmetry of the coefficient matrix is indicated.
References symmetric.
Referenced by BOOST_PYTHON_MODULE(), getSummary(), ripley::RipleyDomain::getSystemMatrixTypeId(), dudley::DudleyDomain::getSystemMatrixTypeId(), and finley::FinleyDomain::getSystemMatrixTypeId().
bool escript::SolverBuddy::isVerbose | ( | ) | const |
Returns true
if the solver is expected to be verbose.
References verbose.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
void escript::SolverBuddy::resetDiagnostics | ( | bool | all = false | ) |
Resets the diagnostics
all | if all is true all diagnostics including accumulative counters are reset. |
References coarse_level_sparsity, converged, cum_net_time, cum_num_inner_iter, cum_num_iter, cum_set_up_time, cum_time, net_time, num_coarse_unknowns, num_inner_iter, num_iter, num_level, preconditioner_size, residual_norm, set_up_time, time, and time_step_backtracking_used.
Referenced by BOOST_PYTHON_MODULE(), and SolverBuddy().
void escript::SolverBuddy::setAbsoluteTolerance | ( | double | atol | ) |
Sets the absolute tolerance for the solver
atol | absolute tolerance |
References absolute_tolerance.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setAcceptanceConvergenceFailure | ( | bool | acceptance | ) |
Sets the flag to indicate the acceptance of a failure of convergence.
acceptance | If true , any failure to achieve convergence is accepted. |
References setAcceptanceConvergenceFailureOff(), and setAcceptanceConvergenceFailureOn().
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setAcceptanceConvergenceFailureOff | ( | ) |
Switches the acceptance of a failure of convergence off
References accept_convergence_failure.
Referenced by BOOST_PYTHON_MODULE(), and setAcceptanceConvergenceFailure().
void escript::SolverBuddy::setAcceptanceConvergenceFailureOn | ( | ) |
Switches the acceptance of a failure of convergence on
References accept_convergence_failure.
Referenced by BOOST_PYTHON_MODULE(), and setAcceptanceConvergenceFailure().
void escript::SolverBuddy::setComplex | ( | bool | complex | ) |
Sets the complex flag for the coefficient matrix to flag
.
complex | If true, the complex flag is set otherwise reset. |
References is_complex.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setDim | ( | int | dim | ) |
Sets the dimension of the problem we are solving.
References dim.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setDropStorage | ( | double | drop | ) |
Sets the maximum allowed increase in storage for ILUT. An increase of 2 would mean that a doubling of the storage needed for the coefficient matrix is allowed during ILUT factorization.
drop | allowed storage increase |
References drop_storage.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setDropTolerance | ( | double | drop_tol | ) |
Sets the relative drop tolerance in ILUT
drop_tol | drop tolerance |
References drop_tolerance.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setHermitian | ( | bool | hermitian | ) |
Sets the Hermitian flag for the coefficient matrix to flag
.
Hermitian | If true, the symmetry flag is set otherwise reset. |
References setHermitianOff(), and setHermitianOn().
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setHermitianOff | ( | ) |
Clears the Hermitian flag for the coefficient matrix.
References hermitian.
Referenced by BOOST_PYTHON_MODULE(), and setHermitian().
void escript::SolverBuddy::setHermitianOn | ( | ) |
Sets the symmetry flag to indicate that the coefficient matrix is Hermitian.
References hermitian.
Referenced by BOOST_PYTHON_MODULE(), and setHermitian().
void escript::SolverBuddy::setInnerIterMax | ( | int | iter_max | ) |
Sets the maximum number of iteration steps for the inner iteration.
iter_max | maximum number of inner iterations |
References inner_iter_max, and iter_max.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setInnerTolerance | ( | double | rtol | ) |
Sets the relative tolerance for an inner iteration scheme for instance on the coarsest level in a multi-level scheme.
rtol | inner relative tolerance |
References inner_tolerance.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setInnerToleranceAdaption | ( | bool | adaption | ) |
Sets the flag to indicate automatic selection of the inner tolerance.
adaption | If true , the inner tolerance is selected automatically |
References setInnerToleranceAdaptionOff(), and setInnerToleranceAdaptionOn().
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setInnerToleranceAdaptionOff | ( | ) |
Switches the automatic selection of inner tolerance off
References adapt_inner_tolerance.
Referenced by BOOST_PYTHON_MODULE(), and setInnerToleranceAdaption().
void escript::SolverBuddy::setInnerToleranceAdaptionOn | ( | ) |
Switches the automatic selection of inner tolerance on
References adapt_inner_tolerance.
Referenced by BOOST_PYTHON_MODULE(), and setInnerToleranceAdaption().
void escript::SolverBuddy::setIterMax | ( | int | iter_max | ) |
Sets the maximum number of iteration steps
iter_max | maximum number of iteration steps |
References iter_max.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setLocalPreconditioner | ( | bool | local | ) |
Sets the flag to use local preconditioning
local | If true , local proconditioning on each MPI rank is applied |
References setLocalPreconditionerOff(), and setLocalPreconditionerOn().
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setLocalPreconditionerOff | ( | ) |
Sets the flag to use local preconditioning to off
References use_local_preconditioner.
Referenced by BOOST_PYTHON_MODULE(), and setLocalPreconditioner().
void escript::SolverBuddy::setLocalPreconditionerOn | ( | ) |
Sets the flag to use local preconditioning to on
References use_local_preconditioner.
Referenced by BOOST_PYTHON_MODULE(), and setLocalPreconditioner().
void escript::SolverBuddy::setNumRefinements | ( | int | refinements | ) |
Sets the number of refinement steps to refine the solution when a direct solver is applied.
refinements | number of refinements |
References refinements.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setNumSweeps | ( | int | sweeps | ) |
Sets the number of sweeps in a Jacobi or Gauss-Seidel/SOR preconditioner.
sweeps | number of sweeps |
References sweeps.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setODESolver | ( | int | solver | ) |
Sets the solver method for ODEs.
solver | key of the ODE solver method to be used, should be in SO_ODESOLVER_CRANK_NICOLSON , SO_ODESOLVER_BACKWARD_EULER , SO_ODESOLVER_LINEAR_CRANK_NICOLSON |
References method, ode_solver, escript::SO_ODESOLVER_BACKWARD_EULER, escript::SO_ODESOLVER_CRANK_NICOLSON, and escript::SO_ODESOLVER_LINEAR_CRANK_NICOLSON.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setPackage | ( | int | package | ) |
Sets the solver package to be used as a solver.
package | key of the solver package to be used, should be in SO_DEFAULT , SO_PACKAGE_CUSP , SO_PACKAGE_PASO , SO_PACKAGE_MKL , SO_PACKAGE_UMFPACK , SO_PACKAGE_TRILINOS |
References getSolverMethod(), package, setSolverMethod(), escript::SO_DEFAULT, escript::SO_PACKAGE_MKL, escript::SO_PACKAGE_PASO, escript::SO_PACKAGE_TRILINOS, and escript::SO_PACKAGE_UMFPACK.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setPreconditioner | ( | int | preconditioner | ) |
Sets the preconditioner to be used.
preconditioner | key of the preconditioner to be used, one of SO_PRECONDITIONER_ILU0 , SO_PRECONDITIONER_ILUT , SO_PRECONDITIONER_JACOBI , SO_PRECONDITIONER_AMG , SO_PRECONDITIONER_AMLI , SO_PRECONDITIONER_REC_ILU , SO_PRECONDITIONER_GAUSS_SEIDEL , SO_PRECONDITIONER_RILU , SO_PRECONDITIONER_NONE |
References preconditioner, escript::SO_PRECONDITIONER_AMG, escript::SO_PRECONDITIONER_GAUSS_SEIDEL, escript::SO_PRECONDITIONER_ILU0, escript::SO_PRECONDITIONER_ILUT, escript::SO_PRECONDITIONER_JACOBI, escript::SO_PRECONDITIONER_NONE, escript::SO_PRECONDITIONER_REC_ILU, and escript::SO_PRECONDITIONER_RILU.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setRelaxationFactor | ( | double | factor | ) |
Sets the relaxation factor used to add dropped elements in RILU to the main diagonal.
factor | relaxation factor |
References relaxation.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setReordering | ( | int | ordering | ) |
Sets the key of the reordering method to be applied if supported by the solver. Some direct solvers support reordering to optimize compute time and storage use during elimination.
ordering | selects the reordering strategy, should be in SO_REORDERING_NONE , SO_REORDERING_MINIMUM_FILL_IN , SO_REORDERING_NESTED_DISSECTION , 'SO_REORDERING_DEFAULT` |
References reordering, escript::SO_REORDERING_DEFAULT, escript::SO_REORDERING_MINIMUM_FILL_IN, escript::SO_REORDERING_NESTED_DISSECTION, and escript::SO_REORDERING_NONE.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setRestart | ( | int | restart | ) |
Sets the number of iterations steps after which GMRES performs a restart.
restart | number of iteration steps after which to perform a restart. If 0 no restart is performed. |
References restart.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setSolverMethod | ( | int | method | ) |
Sets the solver method to be used. Use method
=SO_METHOD_DIRECT
to indicate that a direct rather than an iterative solver should be used and use method
=SO_METHOD_ITERATIVE
to indicate that an iterative rather than a direct solver should be used.
method | key of the solver method to be used, should be in SO_DEFAULT , SO_METHOD_DIRECT , SO_METHOD_DIRECT_MUMPS , SO_METHOD_DIRECT_PARDISO , SO_METHOD_DIRECT_SUPERLU , SO_METHOD_DIRECT_TRILINOS , SO_METHOD_CHOLEVSKY , SO_METHOD_PCG , SO_METHOD_CR , SO_METHOD_CGS , SO_METHOD_BICGSTAB , SO_METHOD_GMRES , SO_METHOD_PRES20 , SO_METHOD_ROWSUM_LUMPING , SO_METHOD_HRZ_LUMPING , SO_METHOD_ITERATIVE , SO_METHOD_LSQR , SO_METHOD_NONLINEAR_GMRES , SO_METHOD_TFQMR , SO_METHOD_MINRES |
References method, escript::SO_DEFAULT, escript::SO_METHOD_BICGSTAB, escript::SO_METHOD_CGLS, escript::SO_METHOD_CGS, escript::SO_METHOD_CHOLEVSKY, escript::SO_METHOD_CR, escript::SO_METHOD_DIRECT, escript::SO_METHOD_DIRECT_MUMPS, escript::SO_METHOD_DIRECT_PARDISO, escript::SO_METHOD_DIRECT_SUPERLU, escript::SO_METHOD_DIRECT_TRILINOS, escript::SO_METHOD_GMRES, escript::SO_METHOD_HRZ_LUMPING, escript::SO_METHOD_ITERATIVE, escript::SO_METHOD_LSQR, escript::SO_METHOD_MINRES, escript::SO_METHOD_NONLINEAR_GMRES, escript::SO_METHOD_PCG, escript::SO_METHOD_PRES20, escript::SO_METHOD_ROWSUM_LUMPING, and escript::SO_METHOD_TFQMR.
Referenced by BOOST_PYTHON_MODULE(), and setPackage().
void escript::SolverBuddy::setSymmetry | ( | bool | symmetry | ) |
Sets the symmetry flag for the coefficient matrix to flag
.
symmetry | If true, the symmetry flag is set otherwise reset. |
References setSymmetryOff(), and setSymmetryOn().
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setSymmetryOff | ( | ) |
Clears the symmetry flag for the coefficient matrix.
References symmetric.
Referenced by BOOST_PYTHON_MODULE(), and setSymmetry().
void escript::SolverBuddy::setSymmetryOn | ( | ) |
Sets the symmetry flag to indicate that the coefficient matrix is symmetric.
References symmetric.
Referenced by BOOST_PYTHON_MODULE(), and setSymmetry().
void escript::SolverBuddy::setTolerance | ( | double | rtol | ) |
Sets the relative tolerance for the solver
rtol | relative tolerance |
References tolerance.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setTrilinosParameter | ( | const std::string & | name, |
const boost::python::object & | value | ||
) |
Sets a Trilinos preconditioner/solver parameter.
References trilinosParams.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setTruncation | ( | int | truncation | ) |
Sets the number of residuals in GMRES to be stored for orthogonalization. The more residuals are stored the faster GMRES converges but more memory is required.
References truncation.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setVerbosity | ( | bool | verbose | ) |
Sets the verbosity flag for the solver to flag
.
verbose | If true , the verbosity of the solver is switched on. |
References setVerbosityOff(), setVerbosityOn(), and verbose.
Referenced by BOOST_PYTHON_MODULE().
void escript::SolverBuddy::setVerbosityOff | ( | ) |
Switches the verbosity of the solver off.
References verbose.
Referenced by BOOST_PYTHON_MODULE(), and setVerbosity().
void escript::SolverBuddy::setVerbosityOn | ( | ) |
Switches the verbosity of the solver on.
References verbose.
Referenced by BOOST_PYTHON_MODULE(), and setVerbosity().
void escript::SolverBuddy::updateDiagnostics | ( | const std::string & | key, |
bool | value | ||
) |
References converged, and time_step_backtracking_used.
void escript::SolverBuddy::updateDiagnostics | ( | const std::string & | key, |
double | value | ||
) |
References coarse_level_sparsity, cum_net_time, cum_set_up_time, cum_time, net_time, residual_norm, set_up_time, and time.
void escript::SolverBuddy::updateDiagnostics | ( | const std::string & | key, |
int | value | ||
) |
References cum_num_inner_iter, cum_num_iter, num_coarse_unknowns, num_inner_iter, num_iter, and num_level.
void escript::SolverBuddy::updateDiagnosticsPy | ( | const std::string & | key, |
const boost::python::object & | value | ||
) |
Updates diagnostic information
key | name of diagnostic (a python string in the list "num_iter", "num_level", "num_inner_iter", "time", "set_up_time", "net_time", "residual_norm", "converged"). |
value | new value of the diagnostic information |
References coarse_level_sparsity, converged, cum_net_time, cum_num_inner_iter, cum_num_iter, cum_set_up_time, cum_time, net_time, num_coarse_unknowns, num_inner_iter, num_iter, num_level, residual_norm, set_up_time, time, and time_step_backtracking_used.
Referenced by BOOST_PYTHON_MODULE().
bool escript::SolverBuddy::useLocalPreconditioner | ( | ) | const |
Returns true
if the preconditoner is applied locally on each MPI rank. This reduces communication costs and speeds up the application of the preconditioner but at the cost of more iteration steps. This can be an advantage on clusters with slower interconnects.
References use_local_preconditioner.
Referenced by BOOST_PYTHON_MODULE(), and getSummary().
bool escript::SolverBuddy::using_default_method | ( | ) | const |
True if we are using the default solver settings
References using_default_solver_method.
|
protected |
Referenced by getAbsoluteTolerance(), and setAbsoluteTolerance().
|
protected |
|
protected |
Referenced by adaptInnerTolerance(), setInnerToleranceAdaptionOff(), and setInnerToleranceAdaptionOn().
|
protected |
Referenced by resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by getDiagnostics(), hasConverged(), resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by getDiagnostics(), resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by getDiagnostics(), resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by getDiagnostics(), resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by getDiagnostics(), resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by getDiagnostics(), resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by getDropStorage(), and setDropStorage().
|
protected |
Referenced by getDropTolerance(), and setDropTolerance().
|
protected |
Referenced by isHermitian(), setHermitianOff(), and setHermitianOn().
|
protected |
Referenced by getInnerIterMax(), and setInnerIterMax().
|
protected |
Referenced by getInnerTolerance(), and setInnerTolerance().
|
protected |
Referenced by isComplex(), and setComplex().
|
protected |
Referenced by getIterMax(), setInnerIterMax(), and setIterMax().
|
protected |
Referenced by getSolverMethod(), setODESolver(), and setSolverMethod().
|
protected |
Referenced by getDiagnostics(), resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by getDiagnostics(), resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by getDiagnostics(), resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by getODESolver(), and setODESolver().
|
protected |
Referenced by getPackage(), and setPackage().
|
protected |
Referenced by getPreconditioner(), and setPreconditioner().
|
protected |
Referenced by getDiagnostics(), and resetDiagnostics().
|
protected |
Referenced by getNumRefinements(), and setNumRefinements().
|
protected |
Referenced by getRelaxationFactor(), and setRelaxationFactor().
|
protected |
Referenced by getReordering(), and setReordering().
|
protected |
Referenced by getDiagnostics(), resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by getRestart(), and setRestart().
|
protected |
Referenced by getDiagnostics(), resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by getNumSweeps(), and setNumSweeps().
|
protected |
Referenced by isSymmetric(), setSymmetryOff(), and setSymmetryOn().
|
protected |
|
protected |
Referenced by getDiagnostics(), resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by getDiagnostics(), resetDiagnostics(), updateDiagnostics(), and updateDiagnosticsPy().
|
protected |
Referenced by getTolerance(), and setTolerance().
|
protected |
Referenced by getTrilinosParameters(), and setTrilinosParameter().
|
protected |
Referenced by getTruncation(), and setTruncation().
|
protected |
Referenced by setLocalPreconditionerOff(), setLocalPreconditionerOn(), and useLocalPreconditioner().
|
protected |
Referenced by using_default_method().
|
protected |
Referenced by isVerbose(), setVerbosity(), setVerbosityOff(), and setVerbosityOn().