Epetra_Util.cpp File Reference

#include "Epetra_Util.h"
#include "Epetra_Object.h"
#include "Epetra_Comm.h"
#include "Epetra_Directory.h"
#include "Epetra_Map.h"
#include "Epetra_LocalMap.h"
#include "Epetra_CrsGraph.h"
#include "Epetra_CrsMatrix.h"
#include "Epetra_MultiVector.h"
#include "Epetra_IntVector.h"
#include "Epetra_Import.h"
Include dependency graph for Epetra_Util.cpp:

Go to the source code of this file.


int Epetra_Util_binary_search (int item, const int *list, int len, int &insertPoint)
 Utility function to perform a binary-search on a list of data.
int Epetra_Util_ExtractHbData (Epetra_CrsMatrix *A, Epetra_MultiVector *LHS, Epetra_MultiVector *RHS, int &M, int &N, int &nz, int *&ptr, int *&ind, double *&val, int &Nrhs, double *&rhs, int &ldrhs, double *&lhs, int &ldlhs)
 Harwell-Boeing data extraction routine.

Function Documentation

int Epetra_Util_binary_search ( int  item,
const int *  list,
int  len,
int &  insertPoint 

Utility function to perform a binary-search on a list of data.

Important assumption: data is assumed to be sorted.

item to be searched for
list to be searched in
len Length of list
insertPoint Input/Output. If item is found, insertPoint is not referenced. If item is not found, insertPoint is set to the offset at which item should be inserted in list such that order (sortedness) would be maintained.
offset Location in list at which item was found. -1 if not found.

Definition at line 296 of file Epetra_Util.cpp.

int Epetra_Util_ExtractHbData ( Epetra_CrsMatrix A,
Epetra_MultiVector LHS,
Epetra_MultiVector RHS,
int &  M,
int &  N,
int &  nz,
int *&  ptr,
int *&  ind,
double *&  val,
int &  Nrhs,
double *&  rhs,
int &  ldrhs,
double *&  lhs,
int &  ldlhs 

Harwell-Boeing data extraction routine.

This routine will extract data from an existing Epetra_Crs Matrix, and optionally from related rhs and lhs objects in a form that is compatible with software that requires the Harwell-Boeing data format. The matrix must be passed in, but the RHS and LHS arguments may be set to zero (either or both of them). For each of the LHS or RHS arguments, if non-trivial and contain more than one vector, the vectors must have strided access. If both LHS and RHS are non-trivial, they must have the same number of vectors. If the input objects are distributed, the returned matrices will contain the local part of the matrix and vectors only.

A (In) Epetra_CrsMatrix.
LHS (In) Left hand side multivector. Set to zero if none not available or needed.
RHS (In) Right hand side multivector. Set to zero if none not available or needed.
M (Out) Local row dimension of matrix.
N (Out) Local column dimension of matrix.
nz (Out) Number of nonzero entries in matrix.
ptr (Out) Offsets into ind and val arrays pointing to start of each row's data.
ind (Out) Column indices of the matrix, in compressed form.
val (Out) Matrix values, in compressed form corresponding to the ind array.
Nrhs (Out) Number of right/left hand sides found (if any) in RHS and LHS.
rhs (Out) Fortran-style 2D array of RHS values.
ldrhs (Out) Stride between columns of rhs.
lhs (Out) Fortran-style 2D array of LHS values.
ldrhs (Out) Stride between columns of lhs.

Definition at line 329 of file Epetra_Util.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 09:58:44 2011 for Epetra Package Browser (Single Doxygen Collection) by  doxygen 1.6.3