Epetra Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions
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.

Macros

#define __cplusplus
 

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[])
 

Macro Definition Documentation

#define __cplusplus

Definition at line 59 of file rectMatrixTest.cc.

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 131 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 231 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 338 of file rectMatrixTest.cc.

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

Definition at line 384 of file rectMatrixTest.cc.

int main ( int  argc,
char *  argv[] 
)

Definition at line 74 of file rectMatrixTest.cc.