EpetraExt Namespace Reference

EpetraExt::BlockCrsMatrix: A class for constructing a distributed block matrix. More...


Classes

class  EpetraExt::BlockCrsMatrix
class  EpetraExt::BlockMultiVector
class  EpetraExt::BlockUtility
class  EpetraExt::BlockVector
class  EpetraExt::LinearProblem_BlockJacobi
class  EpetraExt::CrsGraph_BTF
class  EpetraExt::CrsMatrix_BTF
class  EpetraExt::LinearProblem_BTF
class  EpetraExt::CrsGraph_MapColoring
class  EpetraExt::CrsGraph_MapColoringIndex
class  EpetraExt::CrsMatrixStruct
class  EpetraExt::MatrixMatrix
class  EpetraExt::EpetraExt_MatlabEngine
 A class which provides data and command access to Matlab from Epetra. More...
class  EpetraExt::CrsGraph_AMD
 EpetraExt::CrsGraph_AMD: A transform for Approximate Minimum Degree Reordering using Tim Daley's AMD Algorithm. More...
class  EpetraExt::LinearProblem_CrsSingletonFilter
 Epetra_CrsSingletonFilter: A class for explicitly eliminating matrix rows and columns. More...
class  EpetraExt::LinearProblem_GraphTrans
 EpetraExt::LinearProblem_GraphTrans: Adaptation of a Epetra_CrsGraph Transform to a Epetra_LinearProblem Transform. More...
class  EpetraExt::LinearProblem_MatrixTrans
 Adaptation of an Epetra_CrsMatrix Transform to a Epetra_LinearProblem Transform. More...
class  EpetraExt::CrsGraph_Overlap
struct  EpetraExt::Perm_traits< T >
struct  EpetraExt::Perm_traits< Epetra_CrsMatrix >
struct  EpetraExt::Perm_traits< Epetra_CrsGraph >
struct  EpetraExt::Perm_traits< Epetra_MultiVector >
class  EpetraExt::Permutation< T >
class  EpetraExt::CrsMatrix_Reindex
class  EpetraExt::LinearProblem_Reindex
class  EpetraExt::MultiVector_Reindex
class  EpetraExt::LinearProblem_Scale
class  EpetraExt::CrsMatrix_SolverMap
class  EpetraExt::LinearProblem_SolverMap
class  EpetraExt::LinearProblem_StaticCondensation
struct  EpetraExt::CrsGraph_SymmRCM
 Generates the symmetric RCM reordered version of a Epetra_CrsGraph. More...
class  EpetraExt::CrsGraph_SymmRCM::BFT
class  EpetraExt::Transform< T, U >
class  EpetraExt::StructuralTransform< T, U >
class  EpetraExt::SameTypeTransform< T >
class  EpetraExt::StructuralSameTypeTransform< T >
class  EpetraExt::InPlaceTransform< T >
class  EpetraExt::ViewTransform< T >
class  EpetraExt::Transform_Composite< T >
 Composition Class for Epetra Transform SameType Operators. More...
class  EpetraExt::CrsGraph_Transpose
 Transform to generate the explicit transpose of a Epetra_CrsGraph. More...
class  EpetraExt::RowMatrix_Transpose
 Transform to form the explicit transpose of a Epetra_RowMatrix. More...
class  EpetraExt::CrsGraph_View
 Generates a sub-block view of a Epetra_CrsGraph. More...
class  EpetraExt::CrsMatrix_View
 Generates a sub-block view of a Epetra_CrsMatrix. More...
class  EpetraExt::MultiVector_View
 Generates a sub-block view of a Epetra_MultiVector. More...
class  EpetraExt::Zoltan_CrsGraph
class  EpetraExt::ZoltanMpiComm
 EpetraExt::ZoltanMpiComm: The Epetra MPI Communication Class. More...
class  EpetraExt::ZoltanMpiCommData
 EpetraExt::ZoltanMpiCommData: The Epetra Mpi Communication Data Class. More...
class  EpetraExt::ZoltanMpiDistributor
 EpetraExt::ZoltanMpiDistributor: The Zoltanized Epetra MPI implementation of the Epetra_Distributor Gather/Scatter Setup Class. More...
class  EpetraExt::ZoltanQuery

Functions

double sparsedot (double *u, int *u_ind, int u_len, double *v, int *v_ind, int v_len)
int dumpCrsMatrixStruct (const CrsMatrixStruct &M)
int mult_A_B (CrsMatrixStruct &Aview, CrsMatrixStruct &Bview, Epetra_CrsMatrix &C)
int mult_A_Btrans (CrsMatrixStruct &Aview, CrsMatrixStruct &Bview, Epetra_CrsMatrix &C)
int mult_Atrans_B (CrsMatrixStruct &Aview, CrsMatrixStruct &Bview, Epetra_CrsMatrix &C)
int mult_Atrans_Btrans (CrsMatrixStruct &Aview, CrsMatrixStruct &Bview, Epetra_CrsMatrix &C)
int import_and_extract_views (const Epetra_CrsMatrix &M, const Epetra_Map &targetMap, CrsMatrixStruct &Mview)
int distribute_list (const Epetra_Comm &Comm, int lenSendList, const int *sendList, int &maxSendLen, int *&recvList)
Epetra_Mapcreate_map_from_imported_rows (const Epetra_Map *map, int totalNumSend, int *sendRows, int numProcs, int *numSendPerProc)
int form_map_union (const Epetra_Map *map1, const Epetra_Map *map2, const Epetra_Map *&mapunion)
Epetra_Mapfind_rows_containing_cols (const Epetra_CrsMatrix &M, const Epetra_Map *colmap)
std::string EpetraExt_Version ()
int MatrixMarketFileToMap (const char *filename, const Epetra_Comm &comm, Epetra_Map *&map)
 Constructs an Epetra_BlockMap object from a Matrix Market format file.
int MatrixMarketFileToBlockMap (const char *filename, const Epetra_Comm &comm, Epetra_BlockMap *&map)
 Constructs an Epetra_BlockMap object from a Matrix Market format file.
int MatrixMarketFileToRowMap (const char *filename, const Epetra_Comm &comm, Epetra_BlockMap *&rowmap)
int MatrixMarketFileToBlockMaps (const char *filename, const Epetra_Comm &comm, Epetra_BlockMap *&rowmap, Epetra_BlockMap *&colmap, Epetra_BlockMap *&rangemap, Epetra_BlockMap *&domainmap)
int BlockMapToMatrixMarketFile (const char *filename, const Epetra_BlockMap &map, const char *mapName, const char *mapDescription, bool writeHeader)
 Writes an Epetra_BlockMap or Epetra_Map object to a Matrix Market format file.
int BlockMapToHandle (FILE *handle, const Epetra_BlockMap &map)
 Writes an Epetra_BlockMap or Epetra_Map object to a file handle.
int writeBlockMap (FILE *handle, int length, const int *v1, const int *v2, bool doSizes)
int MatrixMarketFileToCrsMatrix (const char *filename, const Epetra_Map &rowMap, Epetra_CrsMatrix *&A)
 Constructs an Epetra_CrsMatrix object from a Matrix Market format file, only row map specified.
int MatrixMarketFileToCrsMatrix (const char *filename, const Epetra_Map &rowMap, const Epetra_Map &colMap, Epetra_CrsMatrix *&A)
 Constructs an Epetra_CrsMatrix object from a Matrix Market format file, both row and column map specified.
int MatrixMarketFileToCrsMatrix (const char *filename, const Epetra_Map &rowMap, const Epetra_Map &colMap, const Epetra_Map &rangeMap, const Epetra_Map &domainMap, Epetra_CrsMatrix *&A)
int MatrixMarketFileToCrsMatrixHandle (const char *filename, Epetra_CrsMatrix *A, const Epetra_Map *rangeMap, const Epetra_Map *domainMap)
int mm_read_unsymmetric_sparse (const char *fname, int *M_, int *N_, int *nz_, double **val_, int **I_, int **J_)
int mm_is_valid (MM_typecode matcode)
int mm_read_banner (FILE *f, MM_typecode *matcode)
int mm_write_mtx_crd_size (FILE *f, int M, int N, int nz)
int mm_read_mtx_crd_size (FILE *f, int *M, int *N, int *nz)
int mm_read_mtx_array_size (FILE *f, int *M, int *N)
int mm_write_mtx_array_size (FILE *f, int M, int N)
int mm_read_mtx_crd_data (FILE *f, int M, int N, int nz, int I[], int J[], double val[], MM_typecode matcode)
int mm_read_mtx_crd_entry (FILE *f, int *I, int *J, double *real, double *imag, MM_typecode matcode)
int mm_read_mtx_crd (char *fname, int *M, int *N, int *nz, int **I, int **J, double **val, MM_typecode *matcode)
int mm_write_banner (FILE *f, MM_typecode matcode)
int mm_write_mtx_crd (char fname[], int M, int N, int nz, int I[], int J[], double val[], MM_typecode matcode)
char * mm_typecode_to_str (MM_typecode matcode)
int MatrixMarketFileToMultiVector (const char *filename, const Epetra_BlockMap &map, Epetra_MultiVector *&A)
 Constructs an Epetra_MultiVector object from a Matrix Market format file.
int MultiVectorToMatlabFile (const char *filename, const Epetra_MultiVector &A)
 Writes an Epetra_MultiVector object to a file that is compatible with Matlab.
int MultiVectorToMatrixMarketFile (const char *filename, const Epetra_MultiVector &A, const char *matrixName, const char *matrixDescription, bool writeHeader)
 Writes an Epetra_MultiVector object to a Matrix Market format file.
int MultiVectorToMatlabHandle (FILE *handle, const Epetra_MultiVector &A)
 Writes an Epetra_MultiVector object that is compatible with Matlab to a file handle.
int MultiVectorToMatrixMarketHandle (FILE *handle, const Epetra_MultiVector &A)
 Writes an Epetra_MultiVector object that is compatible with Matrix Market array format to a file handle.
int MultiVectorToHandle (FILE *handle, const Epetra_MultiVector &A, bool mmFormat)
int writeMultiVector (FILE *handle, const Epetra_MultiVector &A, bool mmFormat)
int RowMatrixToMatlabFile (const char *filename, const Epetra_RowMatrix &A)
 Writes an Epetra_RowMatrix object to a file that is compatible with Matlab.
int RowMatrixToMatrixMarketFile (const char *filename, const Epetra_RowMatrix &A, const char *matrixName, const char *matrixDescription, bool writeHeader)
 Writes an Epetra_RowMatrix object to a Matrix Market format file.
int RowMatrixToHandle (FILE *handle, const Epetra_RowMatrix &A)
 Writes an Epetra_RowMatrix object to a format file that is compatible with Matlab.
int writeRowMatrix (FILE *handle, const Epetra_RowMatrix &A)
int MatrixMarketFileToVector (const char *filename, const Epetra_BlockMap &map, Epetra_Vector *&A)
 Constructs an Epetra_Vector object from a Matrix Market format file.
int VectorToMatlabFile (const char *filename, const Epetra_Vector &A)
 Writes an Epetra_Vector object to a file that is compatible with Matlab.
int VectorToMatrixMarketFile (const char *filename, const Epetra_Vector &A, const char *matrixName, const char *matrixDescription, bool writeHeader)
 Writes an Epetra_Vector object to a Matrix Market format file.
int VectorToHandle (FILE *handle, const Epetra_Vector &A)
 Writes an Epetra_Vector object to a format file that is compatible with Matlab.
int writeVector (FILE *handle, const Epetra_Vector &A)


Detailed Description

EpetraExt::BlockCrsMatrix: A class for constructing a distributed block matrix.

The EpetraExt::BlockCrsMatrix allows construction of a block matrix made up of Epetra_CrsMatrix blocks as well as access to the full systems as a Epetra_CrsMatrix. It derives from and extends the Epetra_CrsMatrix class

Constructing EpetraExt::BlockCrsMatrix objects


Function Documentation

int EpetraExt::BlockMapToHandle FILE *  handle,
const Epetra_BlockMap blockMap
 

Writes an Epetra_BlockMap or Epetra_Map object to a file handle.

This function takes an Epetra_BlockMap or Epetra_Map object and writes it to the specified file handle.

Parameters:
handle (In) A C-style file handle, already opened. On exit, the file associated with this handle will have appended to it a row for each multivector row.
blockMap (In) An Epetra_BlockMap object containing the user object to be dumped to file.
Returns:
Returns 0 if no error, -1 if any problems with file system.

int EpetraExt::BlockMapToMatrixMarketFile const char *  filename,
const Epetra_BlockMap blockMap,
const char *  mapName = 0,
const char *  mapDescription = 0,
bool  writeHeader = true
 

Writes an Epetra_BlockMap or Epetra_Map object to a Matrix Market format file.

This function takes an Epetra_BlockMap or Epetra_Map object and writes it to the specified file. The map can be distributed or serial. The user can provide a strings containing the object name, a description, and specify that header information should or should not be printed to the file.

Special information is encoded in the comment field of this map that allows for identical reproduction of the map, including distribution across processors and element size information.

The first column of the output file will be the list of GIDs in the map. If the block map has non-uniform sizes, a second column will be generated containing the element sizes.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contained any requested header information followed by the map GIDs. A second column may be present if the BlockMap has nonuniform sizes.
blockMap (In) An Epetra_BlockMap Object containing the user map to be dumped to file.
mapName (In) A C-style string pointer to a name that will be stored in the comment field of the file. This is not a required argument. Note that it is possible to pass in the method A.Label().
mapDescription (In) A C-style string pointer to a map description that will be stored in the comment field of the file.
writeHeader (In) If true, the header will be written, otherwise only the map entries will be written.
Returns:
Returns 0 if no error, -1 if any problems with file system.

int EpetraExt::MatrixMarketFileToBlockMap const char *  filename,
const Epetra_Comm comm,
Epetra_BlockMap *&  blockMap
 

Constructs an Epetra_BlockMap object from a Matrix Market format file.

This function constructs an Epetra_BlockMap or Epetra_Map object by reading a Matrix Market file. If the file was created using the EpetraExt::BlockMapOut functions, special information was encoded in the comment field of this map that allows for identical reproduction of the map, including distribution across processors and element size information. If the same of processors is being used to create the object as were used to write it, the object will be an exact reproduction of the original. Otherwise, a uniform distribution of the GIDs will be created.

The first column of the input file will must be the list of GIDs in the map. If the block map has non-uniform sizes, a second column must contain the element sizes.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contained any requested header information followed by the map GIDs. A second column may be present if the BlockMap has nonuniform sizes.
comm (In) An Epetra_Comm object describing the parallel machine.
blockMap (Out) An Epetra_BlockMap object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system, returns 1 if number of processors differs from file creator.

int EpetraExt::MatrixMarketFileToBlockMaps const char *  filename,
const Epetra_Comm comm,
Epetra_BlockMap *&  rowmap,
Epetra_BlockMap *&  colmap,
Epetra_BlockMap *&  rangemap,
Epetra_BlockMap *&  domainmap
 

Constructs row,col,range and domain maps from a matrix-market matrix file.

int EpetraExt::MatrixMarketFileToCrsMatrix const char *  filename,
const Epetra_Map rowMap,
const Epetra_Map colMap,
const Epetra_Map rangeMap,
const Epetra_Map domainMap,
Epetra_CrsMatrix *&  A
 

Reads an Epetra_CrsMatrix object from a matrix-market file, but uses the specified maps for constructing and 'FillComplete()'ing the matrix. Successfully creates rectangular matrices.

int EpetraExt::MatrixMarketFileToCrsMatrix const char *  filename,
const Epetra_Map rowMap,
const Epetra_Map colMap,
Epetra_CrsMatrix *&  A
 

Constructs an Epetra_CrsMatrix object from a Matrix Market format file, both row and column map specified.

This function constructs an Epetra_CrsMatrix object by reading a Matrix Market file.

Parameters:
filename (In) A filename, including path if desired. The matrix to be read should be in this file in Matrix Market coordinate format.
rowMap (In) An Epetra_Map object describing the desired row distribution of the matrix.
colMap (In) An Epetra_Map object describing the desired column distribution of the matrix.
A (Out) An Epetra_CrsMatrix object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system.

int EpetraExt::MatrixMarketFileToCrsMatrix const char *  filename,
const Epetra_Map rowMap,
Epetra_CrsMatrix *&  A
 

Constructs an Epetra_CrsMatrix object from a Matrix Market format file, only row map specified.

This function constructs an Epetra_CrsMatrix object by reading a Matrix Market file.

Parameters:
filename (In) A filename, including path if desired. The matrix to be read should be in this file in Matrix Market coordinate format.
rowMap (In) An Epetra_Map object describing the desired row distribution of the matrix.
A (Out) An Epetra_CrsMatrix object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system.

int EpetraExt::MatrixMarketFileToMap const char *  filename,
const Epetra_Comm comm,
Epetra_Map *&  map
 

Constructs an Epetra_BlockMap object from a Matrix Market format file.

This function constructs an Epetra_BlockMap or Epetra_Map object by reading a Matrix Market file. If the file was created using the EpetraExt::BlockMapOut functions, special information was encoded in the comment field of this map that allows for identical reproduction of the map, including distribution across processors and element size information. If the same of processors is being used to create the object as were used to write it, the object will be an exact reproduction of the original. Otherwise, a uniform distribution of the GIDs will be created.

The first column of the input file will must be the list of GIDs in the map. If the block map has non-uniform sizes, a second column must contain the element sizes.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contained any requested header information followed by the map GIDs. A second column may be present if the BlockMap has nonuniform sizes.
comm (In) An Epetra_Comm object describing the parallel machine.
map (Out) An Epetra_Map object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system, -2 if file contained nontrivial Epetra_BlockMap, 1 if number of processors differs from file creator.

int EpetraExt::MatrixMarketFileToMultiVector const char *  filename,
const Epetra_BlockMap map,
Epetra_MultiVector *&  A
 

Constructs an Epetra_MultiVector object from a Matrix Market format file.

This function constructs an Epetra_MultiVector object by reading a Matrix Market file.

Parameters:
filename (In) A filename, including path if desired. The multivector to be read should be in this file in Matrix Market array format.
map (In) An Epetra_Map or Epetra_BlockMap object describing the desired distribution of the multivector.
A (Out) An Epetra_MultiVector object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system.

int EpetraExt::MatrixMarketFileToVector const char *  filename,
const Epetra_BlockMap map,
Epetra_Vector *&  A
 

Constructs an Epetra_Vector object from a Matrix Market format file.

This function constructs an Epetra_Vector object by reading a Matrix Market file.

Parameters:
filename (In) A filename, including path if desired. The matrix to be read should be in this file in Matrix Market array format.
map (In) An Epetra_Map or Epetra_BlockMap object describing the desired distribution of the vector.
A (Out) An Epetra_Vector object constructed from file contents.
Warning:
User must delete!!.
Returns:
Returns 0 if no error, -1 if any problems with file system.

int EpetraExt::MultiVectorToMatlabFile const char *  filename,
const Epetra_MultiVector A
 

Writes an Epetra_MultiVector object to a file that is compatible with Matlab.

This function takes any matrix that implements the Epetra_MultiVector interface and writes it to the specified file. The matrix can be distributed or serial. This function is a convenience wrapper around MultiVectorToMatrixMarketFile. The following Matlab commands can be used to read the resulting file and convert to it to a Matlab sparse matrix:

  1. load filename;
For example:
  1. load A.dat;
The above produces a dense matrix A with each vector in the multivector as a column in A.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contain a row for each row of the multivector.
A (In) An Epetra_MultiVector Object containing the user matrix to be dumped to file.
Returns:
Returns 0 if no error, -1 if any problems with file system.

int EpetraExt::MultiVectorToMatlabHandle FILE *  handle,
const Epetra_MultiVector A
 

Writes an Epetra_MultiVector object that is compatible with Matlab to a file handle.

This function takes an Epetra_MultiVector and writes it to the specified file handle.

Parameters:
handle (In) A C-style file handle, already opened. On exit, the file associated with this handle will have appended to it a row for each multivector row.
A (In) An Epetra_MultiVector Object containing the user object to be dumped to file.
Returns:
Returns 0 if no error, -1 if any problems with file system.

int EpetraExt::MultiVectorToMatrixMarketFile const char *  filename,
const Epetra_MultiVector A,
const char *  matrixName = 0,
const char *  matrixDescription = 0,
bool  writeHeader = true
 

Writes an Epetra_MultiVector object to a Matrix Market format file.

This function takes an Epetra_MultiVector object and writes it to the specified file. The multivector can be distributed or serial. The user can provide a strings containing the object name, a description, and specify that header information should or should not be printed to the file.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contained any requested header information followed by the matrix coefficients. The file will contain a row for each entry. All entries for a column are listed before going to the next column.
A (In) An Epetra_MultiVector Object containing the user matrix to be dumped to file.
matrixName (In) A C-style string pointer to a name that will be stored in the comment field of the file. This is not a required argument. Note that it is possible to pass in the method A.Label().
matrixDescription (In) A C-style string pointer to a matrix description that will be stored in the comment field of the file.
writeHeader (In) If true, the header will be written, otherwise only the matrix entries will be written.
Returns:
Returns 0 if no error, -1 if any problems with file system.

int EpetraExt::MultiVectorToMatrixMarketHandle FILE *  handle,
const Epetra_MultiVector A
 

Writes an Epetra_MultiVector object that is compatible with Matrix Market array format to a file handle.

This function takes an Epetra_MultiVector and writes it to the specified file handle.

Parameters:
handle (In) A C-style file handle, already opened. On exit, the file associated with this handle will have appended to it a row for each multivector row.
A (In) An Epetra_MultiVector Object containing the user object to be dumped to file.
Returns:
Returns 0 if no error, -1 if any problems with file system.

int EpetraExt::RowMatrixToHandle FILE *  handle,
const Epetra_RowMatrix A
 

Writes an Epetra_RowMatrix object to a format file that is compatible with Matlab.

This function takes any matrix that implements the Epetra_RowMatrix interface and writes it to the specified file handle. The matrix can be distributed or serial. This function is a convenience wrapper around RowMatrixToMatrixMarketFile.

Parameters:
handle (In) A C-style file handle, already opened. On exit, the file associated with this handle will have appended to it a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_RowMatrix Object containing the user matrix to be dumped to file. Any object that implements the Epetra_RowMatrix interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface.
Returns:
Returns 0 if no error, -1 if any problems with file system.

int EpetraExt::RowMatrixToMatlabFile const char *  filename,
const Epetra_RowMatrix A
 

Writes an Epetra_RowMatrix object to a file that is compatible with Matlab.

This function takes any matrix that implements the Epetra_RowMatrix interface and writes it to the specified file. The matrix can be distributed or serial. This function is a convenience wrapper around RowMatrixToMatrixMarketFile. The following Matlab commands can be used to read the resulting file and convert to it to a Matlab sparse matrix:

  1. load filename;
  2. matrix_name = spconvert(filename_root);
For example:
  1. load A.dat;
  2. A = spconvert(filename_root);
The above produces a sparse matrix A.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contain a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_RowMatrix Object containing the user matrix to be dumped to file. Any object that implements the Epetra_RowMatrix interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface.
Returns:
Returns 0 if no error, -1 if any problems with file system.

int EpetraExt::RowMatrixToMatrixMarketFile const char *  filename,
const Epetra_RowMatrix A,
const char *  matrixName = 0,
const char *  matrixDescription = 0,
bool  writeHeader = true
 

Writes an Epetra_RowMatrix object to a Matrix Market format file.

This function takes any matrix that implements the Epetra_RowMatrix interface and writes it to the specified file. The matrix can be distributed or serial. The user can provide a strings containing the matrix name, a matrix description, and specify that header information should or should not be printed to the file.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contained any requested header information followed by the matrix coefficients. The file will contain a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_RowMatrix Object containing the user matrix to be dumped to file. Any object that implements the Epetra_RowMatrix interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface.
matrixName (In) A C-style string pointer to a name that will be stored in the comment field of the file. This is not a required argument. Note that it is possible to pass in the method A.Label() if the matrix is one of the four types: Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix.
matrixDescription (In) A C-style string pointer to a matrix description that will be stored in the comment field of the file.
writeHeader (In) If true, the header will be written, otherwise only the matrix entries will be written.
Returns:
Returns 0 if no error, -1 if any problems with file system.

double EpetraExt::sparsedot double *  u,
int *  u_ind,
int  u_len,
double *  v,
int *  v_ind,
int  v_len
 

Method for internal use... sparsedot forms a dot-product between two sparsely-populated 'vectors'. Important assumption: assumes the indices in u_ind and v_ind are sorted.

int EpetraExt::VectorToHandle FILE *  handle,
const Epetra_Vector A
 

Writes an Epetra_Vector object to a format file that is compatible with Matlab.

This function takes any matrix that implements the Epetra_Vector interface and writes it to the specified file handle. The matrix can be distributed or serial. This function is a convenience wrapper around VectorToMatrixMarketFile.

Parameters:
handle (In) A C-style file handle, already opened. On exit, the file associated with this handle will have appended to it a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_Vector Object containing the user matrix to be dumped to file. Any object that implements the Epetra_Vector interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface.
Returns:
Returns 0 if no error, -1 if any problems with file system.

int EpetraExt::VectorToMatlabFile const char *  filename,
const Epetra_Vector A
 

Writes an Epetra_Vector object to a file that is compatible with Matlab.

This function takes any matrix that implements the Epetra_Vector interface and writes it to the specified file. The matrix can be distributed or serial. This function is a convenience wrapper around VectorToMatrixMarketFile. The following Matlab commands can be used to read the resulting file and convert to it to a Matlab sparse matrix:

  1. load filename;
  2. matrix_name = spconvert(filename_root);
For example:
  1. load A.dat;
  2. A = spconvert(filename_root);
The above produces a sparse matrix A.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contain a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_Vector Object containing the user matrix to be dumped to file. Any object that implements the Epetra_Vector interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface.
Returns:
Returns 0 if no error, -1 if any problems with file system.

int EpetraExt::VectorToMatrixMarketFile const char *  filename,
const Epetra_Vector A,
const char *  matrixName = 0,
const char *  matrixDescription = 0,
bool  writeHeader = true
 

Writes an Epetra_Vector object to a Matrix Market format file.

This function takes any matrix that implements the Epetra_Vector interface and writes it to the specified file. The matrix can be distributed or serial. The user can provide a strings containing the matrix name, a matrix description, and specify that header information should or should not be printed to the file.

Parameters:
filename (In) A filename, including path if desired. If a file with this name already exists, it will be deleted. On exit, this file will contained any requested header information followed by the matrix coefficients. The file will contain a row for each matrix entry The first column is the global row index, using base 1, the second column is the global column index of the entry, the third value is the matrix value for that entry.
A (In) An Epetra_Vector Object containing the user matrix to be dumped to file. Any object that implements the Epetra_Vector interface can be passed in. In particular, the Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix and Epetra_MsrMatrix classes are compatible with this interface.
matrixName (In) A C-style string pointer to a name that will be stored in the comment field of the file. This is not a required argument. Note that it is possible to pass in the method A.Label() if the matrix is one of the four types: Epetra_CrsMatrix, Epetra_VbrMatrix, Epetra_FECrsMatrix, Epetra_FEVbrMatrix.
matrixDescription (In) A C-style string pointer to a matrix description that will be stored in the comment field of the file.
writeHeader (In) If true, the header will be written, otherwise only the matrix entries will be written.
Returns:
Returns 0 if no error, -1 if any problems with file system.


Generated on Thu Sep 18 12:41:38 2008 for EpetraExt by doxygen 1.3.9.1