00001 #ifndef AMESOS_CONTROL_H 00002 #define AMESOS_CONTROL_H 00003 00004 #include "Teuchos_ParameterList.hpp" 00005 using namespace Teuchos; 00016 class Amesos_Control 00017 { 00018 public: 00020 Amesos_Control() 00021 { 00022 AddToDiag_ = 0.0; 00023 AddZeroToDiag_ = false; 00024 rcond_threshold_ = 1e-12; 00025 refactorize_ = false; 00026 MaxProcesses_ = -1; 00027 ScaleMethod_ = 0; 00028 Reindex_ = 0; 00029 } 00030 00032 ~Amesos_Control() {}; 00033 00034 void SetControlParameters( const Teuchos::ParameterList &ParameterList ) ; 00035 00037 double AddToDiag_; 00038 00039 00040 bool refactorize_; // if true, and if the Symbolic and Numeric 00041 // objects have already been created, then 00042 // attempt to "refactorize" (factor the matrix 00043 // with no changes to the pivot order since the 00044 // last call the klu_btf_factor). 00045 00048 double rcond_threshold_; // if we refactorize, the factorization may suffer 00049 // in numeric quality. We compute rcond = 00050 // min (abs (diag (U))) / max (abs (diag (U))). 00051 // If this ratio is <= rcond_threshold_, then 00052 // the "refactorization" is scrapped, and we factor 00053 // with full partial pivoting instead. 00054 00055 int ScaleMethod_; // most methods (KLU, UMFPACK, Mumps, ...) can scale 00056 // the input matrix prior to factorization. This can 00057 // improve pivoting, reduce fill-in, and lead to a 00058 // better quality factorization. The options are: 00059 // 0: no scaling 00060 // 1: use the default method for the specific package 00061 // 2: use the method's 1st alternative (if it has one) 00062 // 3: use the method's 2nd alternative, and so on. 00063 // 00064 // Amesos_Klu is, at present, the only code which implements this 00065 00067 bool AddZeroToDiag_; 00068 00070 00076 int MatrixProperty_; 00077 00078 int MaxProcesses_; // default is -1 ; If positive, distribute 00079 // problem over MaxProcesses 00082 bool Reindex_ ; 00083 00084 00085 }; 00086 00087 #endif