#include <Epetra_CrsSingletonFilter.h>
Constructors/Destructor | |
| Epetra_CrsSingletonFilter () | |
| Epetra_CrsSingletonFilter default constructor. | |
| virtual | ~Epetra_CrsSingletonFilter () |
| Epetra_CrsSingletonFilter Destructor. | |
Analyze methods | |
| int | Analyze (Epetra_RowMatrix *FullMatrix) |
| Analyze the input matrix, removing row/column pairs that have singletons. | |
| bool | SingletonsDetected () const |
| Returns true if singletons were detected in this matrix (must be called after Analyze() to be effective). | |
Reduce methods | |
| int | ConstructReducedProblem (Epetra_LinearProblem *Problem) |
| Return a reduced linear problem based on results of Analyze(). | |
| int | UpdateReducedProblem (Epetra_LinearProblem *Problem) |
| Update a reduced linear problem using new values. | |
Methods to construct Full System Solution | |
| int | ComputeFullSolution () |
| Compute a solution for the full problem using the solution of the reduced problem, put in LHS of FullProblem(). | |
Filter Statistics | |
| int | NumRowSingletons () const |
| Return number of rows that contain a single entry, returns -1 if Analysis not performed yet. | |
| int | NumColSingletons () const |
| Return number of columns that contain a single entry that are not associated with singleton row, returns -1 if Analysis not performed yet. | |
| int | NumSingletons () const |
| Return total number of singletons detected, returns -1 if Analysis not performed yet. | |
| double | RatioOfDimensions () const |
| Returns ratio of reduced system to full system dimensions, returns -1.0 if reduced problem not constructed. | |
| double | RatioOfNonzeros () const |
| Returns ratio of reduced system to full system nonzero count, returns -1.0 if reduced problem not constructed. | |
Attribute Access Methods | |
| Epetra_LinearProblem * | FullProblem () const |
| Returns pointer to the original unreduced Epetra_LinearProblem. | |
| Epetra_LinearProblem * | ReducedProblem () const |
| Returns pointer to the derived reduced Epetra_LinearProblem. | |
| Epetra_RowMatrix * | FullMatrix () const |
| Returns pointer to Epetra_CrsMatrix from full problem. | |
| Epetra_CrsMatrix * | ReducedMatrix () const |
| Returns pointer to Epetra_CrsMatrix from full problem. | |
| Epetra_MapColoring * | RowMapColors () const |
| Returns pointer to Epetra_MapColoring object: color 0 rows are part of reduced system. | |
| Epetra_MapColoring * | ColMapColors () const |
| Returns pointer to Epetra_MapColoring object: color 0 columns are part of reduced system. | |
| Epetra_Map * | ReducedMatrixRowMap () const |
| Returns pointer to Epetra_Map describing the reduced system row distribution. | |
| Epetra_Map * | ReducedMatrixColMap () const |
| Returns pointer to Epetra_Map describing the reduced system column distribution. | |
| Epetra_Map * | ReducedMatrixDomainMap () const |
| Returns pointer to Epetra_Map describing the domain map for the reduced system. | |
| Epetra_Map * | ReducedMatrixRangeMap () const |
| Returns pointer to Epetra_Map describing the range map for the reduced system. | |
Protected Member Functions | |
| Epetra_CrsMatrix * | FullCrsMatrix () const |
| const Epetra_Map & | FullMatrixRowMap () const |
| const Epetra_Map & | FullMatrixColMap () const |
| const Epetra_Map & | FullMatrixDomainMap () const |
| const Epetra_Map & | FullMatrixRangeMap () const |
| void | InitializeDefaults () |
| int | ComputeEliminateMaps () |
| int | Setup (Epetra_LinearProblem *Problem) |
| int | InitFullMatrixAccess () |
| int | GetRow (int Row, int &NumIndices, int *&Indices) |
| int | GetRowGCIDs (int Row, int &NumIndices, double *&Values, int *&GlobalIndices) |
| int | GetRow (int Row, int &NumIndices, double *&Values, int *&Indices) |
| int | CreatePostSolveArrays (const Epetra_IntVector &RowIDs, const Epetra_MapColoring &RowMapColors, const Epetra_IntVector &ColProfiles, const Epetra_IntVector &NewColProfiles, const Epetra_IntVector &ColHasRowWithSingleton) |
| int | ConstructRedistributeExporter (Epetra_Map *SourceMap, Epetra_Map *TargetMap, Epetra_Export *&RedistributeExporter, Epetra_Map *&RedistributeMap) |
Protected Attributes | |
| Epetra_LinearProblem * | FullProblem_ |
| Epetra_LinearProblem * | ReducedProblem_ |
| Epetra_RowMatrix * | FullMatrix_ |
| Epetra_CrsMatrix * | FullCrsMatrix_ |
| Epetra_CrsMatrix * | ReducedMatrix_ |
| Epetra_MultiVector * | ReducedRHS_ |
| Epetra_MultiVector * | ReducedLHS_ |
| Epetra_Map * | ReducedMatrixRowMap_ |
| Epetra_Map * | ReducedMatrixColMap_ |
| Epetra_Map * | ReducedMatrixDomainMap_ |
| Epetra_Map * | ReducedMatrixRangeMap_ |
| Epetra_Map * | OrigReducedMatrixDomainMap_ |
| Epetra_Import * | Full2ReducedRHSImporter_ |
| Epetra_Import * | Full2ReducedLHSImporter_ |
| Epetra_Export * | RedistributeDomainExporter_ |
| int * | ColSingletonRowLIDs_ |
| int * | ColSingletonColLIDs_ |
| int * | ColSingletonPivotLIDs_ |
| double * | ColSingletonPivots_ |
| int | AbsoluteThreshold_ |
| double | RelativeThreshold_ |
| int | NumMyRowSingletons_ |
| int | NumMyColSingletons_ |
| int | NumGlobalRowSingletons_ |
| int | NumGlobalColSingletons_ |
| double | RatioOfDimensions_ |
| double | RatioOfNonzeros_ |
| bool | HaveReducedProblem_ |
| bool | UserDefinedEliminateMaps_ |
| bool | AnalysisDone_ |
| bool | SymmetricElimination_ |
| Epetra_MultiVector * | tempExportX_ |
| Epetra_MultiVector * | tempX_ |
| Epetra_MultiVector * | tempB_ |
| Epetra_MultiVector * | RedistributeReducedLHS_ |
| int * | Indices_ |
| Epetra_SerialDenseVector | Values_ |
| Epetra_MapColoring * | RowMapColors_ |
| Epetra_MapColoring * | ColMapColors_ |
| bool | FullMatrixIsCrsMatrix_ |
| int | MaxNumMyEntries_ |
Private Member Functions | |
| Epetra_CrsSingletonFilter (const Epetra_CrsSingletonFilter &Problem) | |
| Copy constructor (defined as private so it is unavailable to user). | |
| Epetra_CrsSingletonFilter & | operator= (const Epetra_CrsSingletonFilter &Problem) |
The Epetra_CrsSingletonFilter class takes an existing Epetra_LinearProblem object, analyzes it structure and explicitly eliminates singleton rows and columns from the matrix and appropriately modifies the RHS and LHS of the linear problem. The result of this process is a reduced system of equations that is itself an Epetra_LinearProblem object. The reduced system can then be solved using any solver that is understands an Epetra_LinearProblem. The solution for the full system is obtained by calling ComputeFullSolution().
Singleton rows are defined to be rows that have a single nonzero entry in the matrix. The equation associated with this row can be explicitly eliminated because it involved only one variable. For example if row i has a single nonzero value in column j, call it A(i,j), we can explicitly solve for x(j) = b(i)/A(i,j), where b(i) is the ith entry of the RHS and x(j) is the jth entry of the LHS.
Singleton columns are defined to be columns that have a single nonzero entry in the matrix. The variable associated with this column is fully dependent, meaning that the solution for all other variables does not depend on it. If this entry is A(i,j) then the ith row and jth column can be removed from the system and x(j) can be solved after the solution for all other variables is determined.
By removing singleton rows and columns, we can often produce a reduced system that is smaller and far less dense, and in general having better numerical properties.
The basic procedure for using this class is as follows:
Definition at line 103 of file Epetra_CrsSingletonFilter.h.
|
|
Epetra_CrsSingletonFilter default constructor.
Definition at line 43 of file Epetra_CrsSingletonFilter.cpp. |
|
|
Epetra_CrsSingletonFilter Destructor.
Definition at line 47 of file Epetra_CrsSingletonFilter.cpp. |
|
|
Copy constructor (defined as private so it is unavailable to user).
|
|
|
Analyze the input matrix, removing row/column pairs that have singletons. Analyzes the user's input matrix to determine rows and columns that should be explicitly eliminated to create the reduced system. Look for rows and columns that have single entries. These rows/columns can easily be removed from the problem. The results of calling this method are two MapColoring objects accessible via RowMapColors() and ColMapColors() accessor methods. All rows/columns that would be eliminated in the reduced system have a color of 1 in the corresponding RowMapColors/ColMapColors object. All kept rows/cols have a color of 0. Definition at line 128 of file Epetra_CrsSingletonFilter.cpp. |
|
|
Returns true if singletons were detected in this matrix (must be called after Analyze() to be effective).
Definition at line 130 of file Epetra_CrsSingletonFilter.h. |
|
|
Return a reduced linear problem based on results of Analyze(). Creates a new Epetra_LinearProblem object based on the results of the Analyze phase. A pointer to the reduced problem is obtained via a call to ReducedProblem().
Definition at line 262 of file Epetra_CrsSingletonFilter.cpp. |
|
|
Update a reduced linear problem using new values. Updates an existing Epetra_LinearProblem object using new matrix, LHS and RHS values. The matrix structure must be identical to the matrix that was used to construct the original reduced problem.
Definition at line 431 of file Epetra_CrsSingletonFilter.cpp. |
|
|
Compute a solution for the full problem using the solution of the reduced problem, put in LHS of FullProblem(). After solving the reduced linear system, this method can be called to compute the solution to the original problem, assuming the solution for the reduced system is valid. The solution of the unreduced, original problem will be in the LHS of the original Epetra_LinearProblem. Definition at line 563 of file Epetra_CrsSingletonFilter.cpp. |
|
|
Return number of rows that contain a single entry, returns -1 if Analysis not performed yet.
Definition at line 165 of file Epetra_CrsSingletonFilter.h. |
|
|
Return number of columns that contain a single entry that are not associated with singleton row, returns -1 if Analysis not performed yet.
Definition at line 168 of file Epetra_CrsSingletonFilter.h. |
|
|
Return total number of singletons detected, returns -1 if Analysis not performed yet. Return total number of singletons detected across all processors. This method will not return a valid result until after the Analyze() method is called. The dimension of the reduced system can be computed by subtracting this number from dimension of full system.
Definition at line 176 of file Epetra_CrsSingletonFilter.h. |
|
|
Returns ratio of reduced system to full system dimensions, returns -1.0 if reduced problem not constructed.
Definition at line 179 of file Epetra_CrsSingletonFilter.h. |
|
|
Returns ratio of reduced system to full system nonzero count, returns -1.0 if reduced problem not constructed.
Definition at line 182 of file Epetra_CrsSingletonFilter.h. |
|
|
Returns pointer to the original unreduced Epetra_LinearProblem.
Definition at line 189 of file Epetra_CrsSingletonFilter.h. |
|
|
Returns pointer to the derived reduced Epetra_LinearProblem.
Definition at line 192 of file Epetra_CrsSingletonFilter.h. |
|
|
Returns pointer to Epetra_CrsMatrix from full problem.
Definition at line 195 of file Epetra_CrsSingletonFilter.h. |
|
|
Returns pointer to Epetra_CrsMatrix from full problem.
Definition at line 198 of file Epetra_CrsSingletonFilter.h. |
|
|
Returns pointer to Epetra_MapColoring object: color 0 rows are part of reduced system.
Definition at line 201 of file Epetra_CrsSingletonFilter.h. |
|
|
Returns pointer to Epetra_MapColoring object: color 0 columns are part of reduced system.
Definition at line 204 of file Epetra_CrsSingletonFilter.h. |
|
|
Returns pointer to Epetra_Map describing the reduced system row distribution.
Definition at line 207 of file Epetra_CrsSingletonFilter.h. |
|
|
Returns pointer to Epetra_Map describing the reduced system column distribution.
Definition at line 210 of file Epetra_CrsSingletonFilter.h. |
|
|
Returns pointer to Epetra_Map describing the domain map for the reduced system.
Definition at line 213 of file Epetra_CrsSingletonFilter.h. |
|
|
Returns pointer to Epetra_Map describing the range map for the reduced system.
Definition at line 216 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 224 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 226 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 227 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 228 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 229 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 75 of file Epetra_CrsSingletonFilter.cpp. |
|
|
|
|
|
|
|
|
Definition at line 610 of file Epetra_CrsSingletonFilter.cpp. |
|
||||||||||||||||
|
Definition at line 623 of file Epetra_CrsSingletonFilter.cpp. |
|
||||||||||||||||||||
|
Definition at line 651 of file Epetra_CrsSingletonFilter.cpp. |
|
||||||||||||||||||||
|
Definition at line 636 of file Epetra_CrsSingletonFilter.cpp. |
|
||||||||||||||||||||||||
|
Definition at line 662 of file Epetra_CrsSingletonFilter.cpp. |
|
||||||||||||||||||||
|
Definition at line 524 of file Epetra_CrsSingletonFilter.cpp. |
|
|
|
|
|
Definition at line 247 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 248 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 249 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 250 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 251 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 252 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 253 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 255 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 256 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 257 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 258 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 259 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 260 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 261 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 262 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 264 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 265 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 266 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 267 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 270 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 271 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 273 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 274 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 275 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 276 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 277 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 278 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 280 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 281 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 282 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 283 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 285 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 286 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 287 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 288 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 289 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 290 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 292 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 293 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 294 of file Epetra_CrsSingletonFilter.h. |
|
|
Definition at line 295 of file Epetra_CrsSingletonFilter.h. |
1.3.9.1