rectMatrixTest.cc File Reference

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <assert.h>
#include <string.h>
#include <math.h>
#include "Petra_Comm.h"
#include "Petra_Map.h"
#include "Petra_Time.h"
#include "Petra_RDP_MultiVector.h"
#include "Petra_RDP_Vector.h"
#include "Petra_RDP_CRS_Matrix.h"

Include dependency graph for rectMatrixTest.cc:

Go to the source code of this file.

Functions

Petra_RDP_CRS_Matrix * readMatrixIn (FILE *dataFile, Petra_Comm &Comm)
Petra_RDP_CRS_Matrix * readRectMatrixIn (FILE *dataFile, Petra_Comm &Comm)
Petra_RDP_Vector * readVectorIn (FILE *dataFile, Petra_Comm &Comm)
void matVecTest (Petra_RDP_CRS_Matrix *Aptr, Petra_RDP_Vector *xptr, Petra_RDP_Vector *bptr)
int main (int argc, char *argv[])


Function Documentation

Petra_RDP_CRS_Matrix * readMatrixIn FILE *  dataFile,
Petra_Comm &  Comm
 

Read in the matrix B (16x24 in little example) Assuming following file format: line 1 Number of rows in F line 2: max of elements in vector NumNz line 3:numnz+2 d (number of nonzeros per row) next line is total number of nonzeros rest is d d g (i,j,s) matlab sparse format

read in i,j,s values for B matrix -- vh next line is number of nonzeros rest is d d g

number of nonzeros in matrix and length of i,j,s

now fill in the matrix values row by row

i.e., for each row...

set number of entries, values, column indices

Definition at line 119 of file rectMatrixTest.cc.

Petra_RDP_CRS_Matrix * readRectMatrixIn FILE *  dataFile,
Petra_Comm &  Comm
 

Read in the rectangular matrix Assuming following file format: line 1 Number of rows line 2: max of elements in vector NumNz line 3:numnz+2 d (number of nonzeros per row) next line is total number of nonzeros rest is d d g (i,j,s) matlab sparse format

read in i,j,s values for B matrix -- vh next line is number of nonzeros rest is d d g

number of nonzeros in matrix and length of i,j,s

now fill in the matrix values row by row

i.e., for each row...

set number of entries, values, column indices

Definition at line 219 of file rectMatrixTest.cc.

Petra_RDP_Vector * readVectorIn FILE *  dataFile,
Petra_Comm &  Comm
 

Read in a vector. Assuming following file format: line 1 Length of (dense) vector line 2 is number of nonzero elements in vector rest is d g (i, s) indices/values of non-zeros

Definition at line 326 of file rectMatrixTest.cc.

void matVecTest Petra_RDP_CRS_Matrix *  Aptr,
Petra_RDP_Vector *  xptr,
Petra_RDP_Vector *  bptr
 

Definition at line 372 of file rectMatrixTest.cc.

int main int  argc,
char *  argv[]
 

Definition at line 62 of file rectMatrixTest.cc.


Generated on Thu Sep 18 12:38:03 2008 for Epetra Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1