#include <AztecOO.h>
Collaboration diagram for AztecOO:
Public Member Functions | |
| int | SetPreconditioner (AZ_PRECOND *Prec) |
| AztecOO External Preconditioner Set (object). | |
| int | SetPreconditioner (AZ_PREC_FUN prec_function, void *prec_data) |
| AztecOO External Preconditioner Set (function and data). | |
| int | SetScaling (struct AZ_SCALING *Scaling) |
| AztecOO External Scaling Set. | |
| int | SetMatrixName (int label) |
| AztecOO Label Matrix for Aztec. | |
Constructors/destructors. | |
| AztecOO (Epetra_Operator *A, Epetra_MultiVector *X, Epetra_MultiVector *B) | |
| AztecOO Constructor. | |
| AztecOO (Epetra_RowMatrix *A, Epetra_MultiVector *X, Epetra_MultiVector *B) | |
| AztecOO Constructor. | |
| AztecOO (const Epetra_LinearProblem &LinearProblem) | |
| AztecOO Constructor. | |
| AztecOO () | |
| AztecOO Default constructor. | |
| AztecOO (const AztecOO &Solver) | |
| AztecOO Copy Constructor. | |
| virtual | ~AztecOO (void) |
| AztecOO Destructor. | |
Post-construction setup methods. | |
| int | SetProblem (const Epetra_LinearProblem &prob) |
| AztecOO Epetra_LinearProblem Set. | |
| int | SetUserOperator (Epetra_Operator *UserOperator) |
| AztecOO User Operator Set. | |
| int | SetUserMatrix (Epetra_RowMatrix *UserMatrix) |
| AztecOO User Matrix Set. | |
| int | SetLHS (Epetra_MultiVector *X) |
| AztecOO LHS Set. | |
| int | SetRHS (Epetra_MultiVector *B) |
| AztecOO RHS Set. | |
| int | SetPrecMatrix (Epetra_RowMatrix *PrecMatrix) |
| AztecOO Preconditioner Matrix Set. | |
| int | SetPrecOperator (Epetra_Operator *PrecOperator) |
| AztecOO External Preconditioner Set. | |
| int | SetStatusTest (AztecOO_StatusTest *StatusTest) |
| AztecOO External Convergence/Status Test Set. | |
Explicit preconditioner construction/assessment/destruction methods. | |
| int | ConstructPreconditioner (double &condest) |
| Forces explicit construction and retention of an AztecOO native preconditioner. | |
| int | DestroyPreconditioner () |
| Destroys a preconditioner computed using ConstructPreconditioner(). | |
| double | Condest () const |
| Returns the condition number estimate for the current preconditioner, if one exists, returns -1.0 if no estimate. | |
Check/Attribute Access Methods. | |
| int | CheckInput () const |
| Prints a summary of solver parameters, performs simple sanity checks. | |
| Epetra_LinearProblem * | GetProblem () const |
| Get a pointer to the Linear Problem used to construct this solver; returns zero if not available. | |
| Epetra_Operator * | GetUserOperator () const |
| Get a pointer to the user operator A. | |
| Epetra_RowMatrix * | GetUserMatrix () const |
| Get a pointer to the user matrix A. | |
| Epetra_Operator * | GetPrecOperator () const |
| Get a pointer to the preconditioner operator. | |
| Epetra_RowMatrix * | GetPrecMatrix () const |
| Get a pointer to the matrix used to construct the preconditioner. | |
| Epetra_MultiVector * | GetLHS () const |
| Get a pointer to the left-hand-side X. | |
| Epetra_MultiVector * | GetRHS () const |
| Get a pointer to the right-hand-side B. | |
Standard AztecOO option and parameter setting methods. | |
| int | SetParameters (Teuchos::ParameterList ¶meterlist, bool cerr_warning_if_unused=false) |
| Method to set options/parameters using a ParameterList object. | |
| int | SetAztecDefaults () |
| AztecOO function to restore default options/parameter settings. | |
| int | SetAztecOption (int option, int value) |
| AztecOO option setting function. | |
| int | SetAztecParam (int param, double value) |
| AztecOO param setting function. | |
| const int * | GetAllAztecOptions () const |
| AztecOO option setting function. | |
| const double * | GetAllAztecParams () const |
| AztecOO param setting function. | |
| int | SetAllAztecOptions (const int *options) |
| AztecOO option setting function. | |
| int | SetAllAztecParams (const double *params) |
| AztecOO param setting function. | |
Standard AztecOO solve methods. | |
| int | Iterate (int MaxIters, double Tolerance) |
| AztecOO iteration function. | |
| int | Iterate (Epetra_RowMatrix *A, Epetra_MultiVector *X, Epetra_MultiVector *B, int MaxIters, double Tolerance) |
| AztecOO iteration function. | |
Specialist AztecOO solve method. | |
| int | recursiveIterate (int MaxIters, double Tolerance) |
| AztecOO iteration functions. | |
| const double * | GetAztecStatus () const |
| Return the Aztec status after iterating. | |
Adaptive Solve methods. | |
| int | SetUseAdaptiveDefaultsTrue () |
| Force the AdaptiveIterate() method to use default adaptive strategy. | |
| int | SetAdaptiveParams (int NumTrials, double *athresholds, double *rthresholds, double condestThreshold, double maxFill, int maxKspace) |
| Set the parameter that control the AdaptiveIterate() method. | |
| int | AdaptiveIterate (int MaxIters, int MaxSolveAttempts, double Tolerance) |
| Attempts to solve the given linear problem using an adaptive strategy. | |
Post-solve access functions | |
| int | NumIters () const |
| Returns the total number of iterations performed on this problem. | |
| double | TrueResidual () const |
| Returns the true unscaled residual for this problem. | |
| double | ScaledResidual () const |
| Returns the true scaled residual for this problem. | |
| double | RecursiveResidual () const |
| Returns the recursive residual for this problem. | |
| int | GetAllAztecStatus (double *status) |
| AztecOO status extraction function. | |
Protected Member Functions | |
| int | AllocAzArrays () |
| void | DeleteAzArrays () |
| int | SetAztecVariables () |
| int | SetProblemOptions (ProblemDifficultyLevel PDL, bool ProblemSymmetric) |
| int | SetProcConfig (const Epetra_Comm &Comm) |
| void | DeleteMemory () |
Protected Attributes | |
| Epetra_LinearProblem * | Problem_ |
| Epetra_MultiVector * | X_ |
| Epetra_MultiVector * | B_ |
| Epetra_Vector * | ResidualVector_ |
| int | N_local_ |
| int | x_LDA_ |
| double * | x_ |
| int | b_LDA_ |
| double * | b_ |
| int * | proc_config_ |
| int * | options_ |
| double * | params_ |
| double * | status_ |
| AZ_MATRIX * | Amat_ |
| AZ_MATRIX * | Pmat_ |
| AZ_PRECOND * | Prec_ |
| AZ_SCALING * | Scaling_ |
| bool | Scaling_created_ |
| AztecOO_StatusTest * | StatusTest_ |
| AZ_CONVERGE_STRUCT * | conv_info_ |
| double | condest_ |
| bool | useAdaptiveDefaults_ |
| int | NumTrials_ |
| double | maxFill_ |
| int | maxKspace_ |
| double * | athresholds_ |
| double * | rthresholds_ |
| double | condestThreshold_ |
| bool | inConstructor_ |
| bool | procConfigSet_ |
| MatrixData * | UserMatrixData_ |
| MatrixData * | PrecMatrixData_ |
| OperatorData * | UserOperatorData_ |
| OperatorData * | PrecOperatorData_ |
Currently it accepts a Petra matrix, initial guess and RHS as separate arguments, or alternatively, accepts a Epetra_LinearProblem. If constructed using a Epetra_LinearProblem, AztecOO will infer some solver/preconditioner, etc., options and parameters. Users may override these choices and manually choose from among the full set of Aztec options using the SetAztecOption() and SetAztecParam() functions.
AztecOO will solve a linear systems of equations:
, using Epetra objects and the Aztec solver library, where
is an Epetra_Operator or Epetra_RowMatrix (note that the Epetra_Operator class is a base class for Epetra_RowMatrix so that Epetra_RowMatrix isa Epetra_Operator.)
and
are Epetra_MultiVector objects.
|
||||||||||||||||
|
AztecOO Constructor. Creates a AztecOO instance, passing in already-defined objects for the linear operator (as an Epetra_Operator), left-hand-side and right-hand-side. Note: Use of this constructor may prohibit use of native AztecOO preconditioners, since an Epetra_Operator is not necessarily an Epetra_RowMatrix and all AztecOO incomplete factorization preconditioners are based on having explicit access to matrix coefficients. Polynomial preconditioners are available if the Epetra_Operator passed in here has a non-trivial definition of the NormInf() method and HasNormInf() returns true. |
|
||||||||||||||||
|
AztecOO Constructor. Creates a AztecOO instance, passing in already-defined objects for the linear operator (as an Epetra_RowMatrix), left-hand-side and right-hand-side. Note: Use of this constructor allows full access to native AztecOO preconditioners, using the Epetra_RowMatrix A passed in here as the basis for computing the preconditioner. All AztecOO incomplete factorization preconditioners are based on having explicit access to matrix coefficients. Polynomial preconditioners are also available. It is possible to change the matrix used for computing incomplete factorization by calling the SetPrecMatrix() method. It is also possible to provide a user-supplied preconditioner by call SetPrecOperator(). |
|
|
AztecOO Constructor. Creates a AztecOO instance, using a Epetra_LinearProblem, passing in an already-defined Epetra_LinearProblem object. The Epetra_LinearProblem class is the preferred method for passing in the linear problem to AztecOO because this class provides scaling capabilities and self-consistency checks that are not available when using other constructors. Note: If the Epetra_LinearProblem passed in here has a non-trivial pointer to an Epetra_Matrix then use of this constructor allows full access to native AztecOO preconditioners, using the Epetra_RowMatrix A passed in here as the basis for computing the preconditioner. All AztecOO incomplete factorization preconditioners are based on having explicit access to matrix coefficients. Polynomial preconditioners are also available. It is possible to change the matrix used for computing incomplete factorization by calling the SetPrecMatrix() method. It is also possible to provide a user-supplied preconditioner by call SetPrecOperator(). If the Epetra_LinearProblems passed in here has only an Epetra_Operator, then use of this constructor may prohibit use of native AztecOO preconditioners, since an Epetra_Operator is not necessarily an Epetra_RowMatrix and all AztecOO incomplete factorization preconditioners are based on having explicit access to matrix coefficients. Polynomial preconditioners are available if the Epetra_Operator passed in here has a non-trivial definition of the NormInf() method and HasNormInf() returns true. |
|
|
AztecOO Copy Constructor. Makes copy of an existing AztecOO instance. |
|
|
AztecOO Destructor. Completely deletes a AztecOO object. |
|
|
Forces explicit construction and retention of an AztecOO native preconditioner. AztecOO typically constructs the preconditioner on the first call to the solve function. However, there are situations where we would like to compute the preconditioner ahead of time. One particular case is when we want to confirm that the preconditioner well-conditioned. This method allows us to precompute the preconditioner. It also provides a estimate of the condition number of the preconditioner. If condest is large, e.g., > 1.0e+14, it is likely the preconditioner will fail. In this case, using threshold values (available in the incomplete factorizations) can be used to reduce the condition number. Note: This method does not work for user-defined preconditioners (defined via calls to SetPrecOperator(). It will return with an error code of -1 for this case. |
|
|
Destroys a preconditioner computed using ConstructPreconditioner(). The ConstructPreconditioner() method creates a persistent preconditioner. In other words the preconditioner will be used by all calls to the Iterate() method. DestroyPreconditioner() deletes the current preconditioner and restores AztecOO to a state where the preconditioner will computed on first use of the preconditioner solve. |
|
|
AztecOO option setting function. Return a pointer to an array (size AZ_OPTIONS_SIZE) of all of the currently set aztec options. |
|
|
AztecOO param setting function. Return a pointer to an array (size AZ_PARAMS_SIZE) of all of the currently set aztec parameters. |
|
|
AztecOO status extraction function. Extract Aztec status array into user-provided array. The array must be of length AZ_STATUS_SIZE as defined in the az_aztec.h header file. |
|
|
Return the Aztec status after iterating. Returns pointer to the underlying Aztec Status array (of length AZ_STATUS_SIZE). See the Aztec documenation. |
|
||||||||||||||||||||||||
|
AztecOO iteration function. Iterates on the specified matrix and vectors until MaxIters or Tolerance is reached.. |
|
||||||||||||
|
AztecOO iteration function. Iterates on the current problem until MaxIters or Tolerance is reached. |
|
||||||||||||
|
AztecOO iteration functions. Iterates on the current problem until MaxIters or Tolerance is reached.. This one should be suitable for recursive invocations of Aztec. |
|
||||||||||||||||||||||||||||
|
Set the parameter that control the AdaptiveIterate() method. The AdaptiveIterate() method attempts to solve a given problem using multiple preconditioner and iterative method tuning parameters. There are defaults that are coded into AdaptiveIterate() method, but the defaults can be over-ridden by the use of the SetAdaptiveParams() method. Details of condition number management follow:
|
|
|
AztecOO option setting function. Set all Aztec option values using an existing Aztec options array. |
|
|
AztecOO param setting function. Set all Aztec parameter values using an existing Aztec params array. |
|
|
AztecOO function to restore default options/parameter settings. This function is called automatically within AztecOO's constructor, but if constructed using a Epetra_LinearProblem object, some options are reset based on the ProblemDifficultyLevel associated with the Epetra_LinearProblem. See the Aztec 2.1 User Guide for a complete list of these options.
|
|
||||||||||||
|
AztecOO option setting function. Set a specific Aztec parameter value. Example: problem.SetAztecOption(AZ_precond, AZ_Jacobi) See the Aztec 2.1 User Guide for a complete list of these options. |
|
||||||||||||
|
AztecOO param setting function. Set a specific Aztec parameter value. Example: problem.SetAztecParam(AZ_drop, 1.0E-6) See the Aztec 2.1 User Guide for a complete list of these parameters. |
|
|
AztecOO LHS Set. Associates an already defined Epetra_MultiVector (or Epetra_Vector) as the initial guess and location where the solution will be return. |
|
|
AztecOO Label Matrix for Aztec. This is used to label individual matrices within Aztec. This might be useful if several Aztec invocations are involved corresponding to different matrices. |
|
||||||||||||
|
Method to set options/parameters using a ParameterList object. This method extracts any mixture of options and parameters from a ParameterList object and uses them to set values in AztecOO's internal options and params arrays. This method may be called repeatedly. This method does not reset default values or previously-set values unless those values are contained in the current ParameterList argument. Note that if the method SetAztecDefaults() is called after this method has been called, any parameters set by this method will be lost. A ParameterList is a collection of named ParameterEntry objects. AztecOO recognizes names which mirror the macros defined in az_aztec_defs.h. In addition, it recognizes case insensitive versions of those names, with or without the prepended 'AZ_'. So the following are equivalent and valid: "AZ_solver", "SOLVER", "Solver". To set an entry in the Aztec options array, the type of the ParameterEntry value may be either a string or an int in some cases. E.g., if selecting the solver, the following are equivalent and valid: AZ_gmres (which is an int), "AZ_gmres" (which is a string) or "GMRES" (case-insensitive, 'AZ_' is optional). To set an entry in the Aztec params array, the type of the ParameterEntry value must be double. By default, this method will silently ignore parameters which have unrecognized names or invalid types. Users may set the optional argument specifying that warnings be printed for unused parameters. Alternatively, users may iterate the ParameterList afterwards and check the isUsed attribute on the ParameterEntry objects.
|
|
|
AztecOO Preconditioner Matrix Set. Associates an already defined Epetra_Matrix as the matrix that will be used by AztecOO when constructing native AztecOO preconditioners. By default, if AztecOO native preconditioners are used, the original operator matrix will be used as the source for deriving the preconditioner. However, there are instances where a user would like to have the preconditioner be defined using a different matrix than the original operator matrix. Another common situation is where the user may not have the operator in matrix form but has a matrix that approximates the operator and can be used as the basis for an incomplete factorization. This set method allows the user to pass any Epetra_RowMatrix to AztecOO for use in constructing an AztecOO native preconditioner, as long as the matrix implements the Epetra_RowMatrix pure virtual class, and has proper domain and range map dimensions. Epetra_CrsMatrix and Epetra_VbrMatrix objects can be passed in through this method. |
|
||||||||||||
|
AztecOO External Preconditioner Set (function and data). Associates an external function and data pointer with preconditioner |
|
|
AztecOO External Preconditioner Set (object). Associates an already defined Aztec preconditioner with this solve. |
|
|
AztecOO External Preconditioner Set. Associates an already defined Epetra_Operator as the preconditioner that will be called during iterations. This set method allows the user to pass any type of preconditioner to AztecOO, as long as the preconditioner implements the Epetra_Operator pure virtual class, and has proper domain and range map dimensions. Ifpack preconditioners can be passed in through this method. |
|
|
AztecOO Epetra_LinearProblem Set. Associates an already defined Epetra_LinearProblem as the problem that will be solved during iterations. This method allows the user to change which problem is being solved by an existing AztecOO object.
|
|
|
AztecOO RHS Set. Associates an already defined Epetra_MultiVector (or Epetra_Vector) as the right-hand-side of the linear system. |
|
|
AztecOO External Scaling Set. Associates an already defined Aztec scaling object with this solve. |
|
|
AztecOO External Convergence/Status Test Set. Assigns an already defined AztecOO_StatusTest object as the class that will determine when iterations should stop, either because convergence was reached or the iteration failed. This method allows a large variety of convergence tests to be used with AztecOO. The AztecOO_StatusTest class is a pure virtual class, so any class that implements its interface can be passed in to this set method. A number of pre-defined AztecOO_StatusTest derived classes are already available, including AztecOO_StatusTestCombo, a class that allows logical combinations of other status test objects for sophisticated convergence testing. |
|
|
AztecOO User Matrix Set. Associates an already defined Epetra_Matrix as the matrix that will be used by AztecOO as the linear operator when solving the linear system. Epetra_CrsMatrix and Epetra_VbrMatrix objects can be passed in through this method. This method also sets the preconditioner matrix to the matrix passed in here. |
|
|
AztecOO User Operator Set. Associates an already defined Epetra_Operator as the linear operator for the linear system system that will be solved during iterations. This set method allows the user to pass any type of linear operator to AztecOO, as long as the operator implements the Epetra_Operator pure virtual class, and has proper domain and range map dimensions. Epetra_CrsMatrix and Epetra_VbrMatrix objects can be passed in through this method. |
1.3.9.1