| GEOS
    | 
Facilitates exporting Hypre matrix and associated vector objects (either in parallel or serial). More...
#include <HypreExport.hpp>
| Public Member Functions | |
| HypreExport () | |
| Parallel export constructor.  More... | |
| HypreExport (HypreMatrix const &mat, integer targetRank) | |
| Single-rank export constructor.  More... | |
| ~HypreExport () | |
| Destructor. | |
| template<typename OFFSET_TYPE , typename COLUMN_TYPE > | |
| void | exportCRS (HypreMatrix const &mat, arrayView1d< OFFSET_TYPE > const &rowOffsets, arrayView1d< COLUMN_TYPE > const &colIndices, arrayView1d< real64 > const &values) const | 
| Export the matrix into CRS arrays provided by the user.  More... | |
| void | exportVector (HypreVector const &vec, arrayView1d< real64 > const &values) const | 
| Export the target vector into an array provided by the user.  More... | |
| void | importVector (arrayView1d< const real64 > const &values, HypreVector &vec) const | 
| Import the target vector from an array provided by the user.  More... | |
Facilitates exporting Hypre matrix and associated vector objects (either in parallel or serial).
Definition at line 37 of file HypreExport.hpp.
| geos::HypreExport::HypreExport | ( | ) | 
Parallel export constructor.
Use this constructor when exporting local part of the matrix on each rank.
| geos::HypreExport::HypreExport | ( | HypreMatrix const & | mat, | 
| integer | targetRank | ||
| ) | 
Single-rank export constructor.
| mat | matrix to export, only used to infer parallel partitioning info (doesn't need to be filled yet) | 
| targetRank | the rank to gather matrix on | 
Use this constructor when exporting the whole matrix on a single rank.
| void geos::HypreExport::exportCRS | ( | HypreMatrix const & | mat, | 
| arrayView1d< OFFSET_TYPE > const & | rowOffsets, | ||
| arrayView1d< COLUMN_TYPE > const & | colIndices, | ||
| arrayView1d< real64 > const & | values | ||
| ) | const | 
Export the matrix into CRS arrays provided by the user.
| OFFSET_TYPE | row pointer offset type | 
| COLUMN_TYPE | column index type | 
| mat | the source matrix | 
| rowOffsets | array view to user-managed array of row pointers | 
| colIndices | array view to user-managed array of column indices | 
| values | array view to user-managed array of matrix values | 
This function must be called on all ranks in the matrix's communicator. Only target rank needs to provide meaningful pointer parameters when doing single-rank export.
| void geos::HypreExport::exportVector | ( | HypreVector const & | vec, | 
| arrayView1d< real64 > const & | values | ||
| ) | const | 
Export the target vector into an array provided by the user.
| vec | the source vector, must be compatible with matrix row distribution | 
| values | array view to user-managed array of vector values | 
This method can be used to extract data from vectors associated with the original matrix. It is mostly useful for single-rank export (gather) of vector values. In parallel users can just call vec.extractLocalVector() and obtain values without copying.
This function must be called on all ranks in the matrix/vector communicator. Only target rank needs to provide meaningful pointer parameter when doing single-rank export.
| void geos::HypreExport::importVector | ( | arrayView1d< const real64 > const & | values, | 
| HypreVector & | vec | ||
| ) | const | 
Import the target vector from an array provided by the user.
| values | array view to user-managed array of vector values | 
| vec | the target vector, must be compatible with matrix row distribution | 
This method can be used to populate data into vectors associated with the original matrix. It is mostly useful for single-rank import (scatter) of vector values. In parallel users can just call vec.extractLocalVector() and populate values without copying.
This function must be called on all ranks in the matrix/vector communicator. Only target rank needs to provide meaningful pointer parameter when doing single-rank import.