This class provides access to the Pardiso (MKL version 10.3 and compatible) sparse direct solver with out-of-core solve support. Access is provided for float and double scalar types, in both real and complex. Access to to Pardiso's 64-bit integer routines is also provided.
Throws an appropriate runtime error in the event that error < 0 .
Parameters
phase
the phase for which this error is being checked. The meaning of a particular error value may depend on which phase was last performed
error
the error value returned by PardisoMKL for the given phase.
We broadcast the input value from the rank=0 image to all others before checking the value. Before doing this we convert the error into an int value which allow us to easily broadcast its value to all process images without having to enable Teuchos long long support in the case where the user is making use of pardiso_64. The valid values of error certainly fit within an int.
Sets the internal mtype_ member. Errors are thrown for unacceptable scalar/mtype combinations.
Parameters
mtype
the type of the matrix. This may come as input from the interface user, or may be set to the default value in case mtype == 0 on entry to this function.
Rearranges the rows and columns of the matrix A to minimize the amount of fill-in of the non-zero entries of the matrix. Pre-ordering may or may not be supported by the underlying solver. If not supported, a call to this method simply does nothing.
In addition to performing symbolic factorization on the matrix A, the call to symbolicFactorization() implies that no change will be made to the non-zero structure of the underlying matrix without a subsequent call to symbolicFactorization().
Precondition
Postcondition
Symbolic factorization will be performed (or marked to be performed) allowing numericFactorization() and solve() to be called.
In addition to performing numeric factorization on the matrix A, the call to numericFactorization() implies that no change will be made to the underlying matrix values without a subsequent call to numericFactorization().
Precondition
The non-zero structure of the matrix should not have changed since the last call to symbolicFactorization(). Other changes can have arbitrary consequences.
The distribution of the matrix should not have changed since the last call to symbolicFactorization().
Postcondition
Numeric factorization will be performed (or marked to be performed) allowing solve() to be performed correctly despite a potential change in the matrix values (though not in the non-zero structure).
This overload of solve uses the given X and B vectors when solving. This X and B are used in place of any X and B that were given upon construction of the Amesos2 solver instance and are used only for this solve.
If a permanent change of X and B are required, see the setX() and setB() methods.
Postcondition
The (multi)vector X contains the solution to the system
The X and B given at construction time (if any) are unchanged.
This overload of solve uses the given X and B vectors when solving. This X and B are used in place of any X and B that were given upon construction of the Amesos2 solver instance and are used only for this solve.
If a permanent change of X and B are required, see the setX() and setB() methods.
Postcondition
The (multi)vector X contains the solution to the system
The X and B given at construction time (if any) are unchanged.
Returns true if the solver can handle this matrix shape.
Returns true if the matrix shape is one that the underlying concrete sparse direct solver can handle. Classes that work only on square matrices should return false for rectangular matrices. Classes that work only on symmetric matrices would return false for non-symmetric matrices. etc.
An RCP to a matrix will will be used for future computation steps
[in]
keep_phase
This parameter tells the solver what state it should keep. For example, you may want to replace the matrix but keep the symbolic factorization because you know the structure of the new matrix is the same as the structure of the old matrix. In this case you would pass Amesos2::SYMBFACT as this parameter.
The default value for the second parameter is Amesos2::CLEAN, which means that the internal state of the solver will be completely reset. It will be as if no previous computational steps were performed.
An raw C pointer to a matrix will will be used for future computation steps.
[in]
keep_phase
This parameter tells the solver what state it should keep. For example, you may want to replace the matrix but keep the symbolic factorization because you know the structure of the new matrix is the same as the structure of the old matrix. In this case you would pass Amesos2::SYMBFACT as this parameter.
The default value for the second parameter is Amesos2::CLEAN, which means that the internal state of the solver will be completely reset. It will be as if no previous computational steps were performed.
The setParameters method is consistent over all concrete solvers. It accepts general status and control parameters, as well as parameters specific to a given solver. If the solver does not recognize the parameter, then it will simply be ignored
Note
The ParameterList must be named "Amesos2". A list with any other name will be ignored.
Postcondition
Internal variables controlling the factorization and solve will be updated and take effect on all subsequent calls to numericFactorization() and solve().
All parameters whose value is to differ from the default values must be included in parameterList. Parameters not specified in parameterList revert to their default values.
Return a const parameter list of all of the valid parameters that this->setParameterList(...) will accept.
Note
Check the documentation for your concrete solver to see a complete list of the values that each parameter may take. A solver may also recognize multiple data types as arguments for a particular parameters (eg. recognizing "YES" and "NO" as well as true and false ).
Prints timing information about the current solver.
The Amesos2::SolverCore base class takes care of tracking total time spent in the Amesos2 interface. Concrete solver interface class are responsible for reporting other timing statistics, which include time spent in:
Redistribution of matrix objects,
Conversion of matrix objects to solver-specific formats,
Redistribution of multi-vector objects,
Conversion of multi-vector objects to solver formats,
Called whenever it would be necessary to refresh a solver's internal storage of the matrix A, which is whenever a phase is called that is equal to or below the current call.
For example, say a user has just previously called solve(), then calls numericFactorization(). Since the solve phase is greater than the numericFactorization phase, this is an indication that the internal store of A needs refreshing, since the user (assuming the user know what she's doing) wouldn't otherwise need to call numericFactorization following a solve.